kooltheba / arcade-game-clone Goto Github PK
View Code? Open in Web Editor NEWThis project forked from udacity/frontend-nanodegree-arcade-game
Classic Arcade Game Clone Challenge
Home Page: https://kooltheba.github.io/arcade-game-clone/
This project forked from udacity/frontend-nanodegree-arcade-game
Classic Arcade Game Clone Challenge
Home Page: https://kooltheba.github.io/arcade-game-clone/
The Player
function, which initiates the Player
by:
this.sprite
to the appropriate image
in the image folder (use the code from the Enemy
function as an example on how to do that)Player
initial locationrender
method for the Player
(use the code from the render method for the Enemy
)handleInput
method, which should receive user input, allowedKeys
(the key which was pressed) and move the Player
according to that input. In particular:
Player
to the left, right key to the right, up should move the Player
up and down should move the Player
downPlayer
cannot move off screen (so you will need to check for that and handle appropriately)Player
reaches the water the game should be reset by moving the Player
back to the initial location (you can write a separate reset Player
method to handle that)update
method for the Player
(can be similar to the one for the Enemy
)Documentation
In this game you have a Player and Enemies (bugs). The goal of the player is to reach the water, without colliding into any one of the enemies.
README
file is included detailing all steps required to successfully run the application.expectations
console
ReferenceError: allEnemies is not defined
ReferenceError: player is not defined
Uncaught TypeError: player.update is not a function
Uncaught TypeError: player.render is not a function
Player
(you need to implement)The Enemy
function, which initiates the Enemy
by:
this.sprite
to the appropriate image in the image folder (already provided)Enemy
initial location (you need to implement)Enemy
speed (you need to implement)The update method for the Enemy
:
Enemy
location (you need to implement)More:
Inside the app.js
file, you will need to implement the Player
and the Enemy
classes, using Object-Oriented JavaScript. Be sure to review all code comments written in app.js
. Part of the code for the Enemy
is provided to you, and you will need to complete the following:
The Enemy
function, which initiates the Enemy
by:
this.sprite
to the appropriate image in the image folder (already provided)Enemy
initial location (you need to implement)Enemy
speed (you need to implement)The update method for the Enemy
:
Enemy
location (you need to implement)Player
(you need to implement)You can add your own Enemy
methods as needed. You will also need to implement the Player
class, and you can use the Enemy
class as an example on how to get started. At minimum you should implement the following:
The Player
function, which initiates the Player
by:
this.sprite
to the appropriate image
in the image folder (use the code from the Enemy
function as an example on how to do that)Player
initial locationThe update
method for the Player
(can be similar to the one for the Enemy
)
The render
method for the Player
(use the code from the render method for the Enemy
)
The handleInput
method, which should receive user input, allowedKeys
(the key which was pressed) and move the Player
according to that input. In particular:
Player
to the left, right key to the right, up should move the Player
up and down should move the Player
downPlayer
cannot move off screen (so you will need to check for that and handle appropriately)Player
reaches the water the game should be reset by moving the Player
back to the initial location (you can write a separate reset Player
method to handle that)You can add your own Player
methods as needed as well. Once you have completed implementing the Player
and Enemy
, you should instantiate them by:
Player
objectallEnemies
Beyond that, feel free to add additional functionality to the game. You can add more code to the app.js
file and to the Enemy
and Player
classes to accomplish that.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.