项目作者: joeyzhang1989

项目描述 :
Classic-Arcade-Game
高级语言: JavaScript
项目地址: git://github.com/joeyzhang1989/Classic-Arcade-Game-Clone.git
创建时间: 2016-10-02T03:50:21Z
项目社区:https://github.com/joeyzhang1989/Classic-Arcade-Game-Clone

开源协议:MIT License

下载


Classic Arcade Game Clone

Project Overview

Project #3 of Udacity’s Front-End Web Developer Nanodegree. The task was to recreate the classic arcade game [Frogger]with provided visual assets and a game loop engine by

1.Implementing the player and enemy entities using Pseudo classical Classes Pattern
2. Adding the correspoding code to support the additional functions

How to use

Locally

1. Clone this repo:

  1. $ git clone https://github.com/joeyzhang1989/Classic-Arcade-Game-Clone.git
  2. `

2. Serve the application:

  1. $ python -m SimpleHTTPServer

You can use the Python SimpleHTTPServer to serve this webpage game on your local machine.
3. Open the application:

  1. $ open "http://localhost:8000"

Example

*Pseudo classical Classes Pattern

  1. var Player = function (x,y) {
  2. this.x = x;
  3. this.y = y;
  4. this.sprite = 'images/char-boy.png';
  5. this.xNow = x;
  6. this.yNow = y;
  7. };
  8. //Update the player position
  9. Player.prototype.update = function () {
  10. this.xNow = this.x;
  11. this.yNow = this.y;
  12. };
  13. var Enemy = function(x,y) {
  14. this.x = x;
  15. this.y = y;
  16. this.sprite = 'images/enemy-bug.png';
  17. };

License

This project is a public domain work, dedicated using
MIT. Feel free to do
whatever you want with it.