Git Product home page Git Product logo

vietnux / classic-arcade-game-clone-frogger Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sagarj590/classic-arcade-game-clone-frogger

0.0 0.0 0.0 239 KB

# Classic-Arcade-Game ## Project Requirements You will be provided with visual assets and a game loop engine; using these tools you must add a number of entities to the game including the player characters and enemies to recreate the classic arcade game "Frogger". ## How to play the game - Use arrow keys 'up', 'right', 'down' and 'left' to move the boy on the grass, to get him to the river without colliding with the bugs on the stone path. - If the boy collides with the bugs, he has to go back to the start point either by refreshing or hitting "Play Again" button. - If you successfully move the boy with no collisions, you win the game and twinkling animation appears. - If you want to reset the game, please refresh the page. ## How I learnt to make the game run - We don't see anything when the game starts we dont see anything on the screen after loading the HTML file. This is because `allEnemies` is not defined. - There are three `.js` files in the js folder, one `.html` and `.css` files each. - The `app.js` has a lot of things. It has various commands for enemies' & player's upate and render functions. - The `engine.js` is assigned to immediately invoked function. It executes the game. It has the kickoff point `main()`. It also defines other variables that set the canvas' width and height. The `onReady()` acts as push function. - The `resources.js` takes array of images.For every instance in the array we call underbar load on url. It is the 'else' block that makes new image and defines onload function which is to be executed once only. Once loading is done, cache `url` to `false` and all images load. ## Resources - Understanding the [engine.js](https://plus.google.com/u/0/events/cupbs3pbne7qkuqok4g0ldhntic?authkey=COGW25b5jbv3-AE) - [You Don't Know JS](https://github.com/getify/You-Dont-Know-JS/blob/master/README.md) - www.w3schools.com/js - [Markdown Basics](http://markdown-guide.readthedocs.io/en/latest/basics.html) - [Online Markdown Editor](https://dillinger.io/)

CSS 2.76% HTML 2.60% JavaScript 94.64%

classic-arcade-game-clone-frogger's Introduction

Classic-Arcade-Game-Clone-Frogger

Project Requirements

You will be provided with visual assets and a game loop engine; using these tools you must add a number of entities to the game including the player characters and enemies to recreate the classic arcade game "Frogger".

How I learnt to make the game run

  • We don't see anything when the game starts we dont see anything on the screen after loading the HTML file. This is because allEnemies is not defined.
  • There are three .js files in the js folder, one .html and .css files each.
  • The app.js has a lot of things. It has various commands for enemies' & player's upate and render functions.
  • The engine.js is assigned to immediately invoked function. It executes the game. It has the kickoff point main(). It also defines other variables that set the canvas' width and height. The onReady() acts as push function.
  • The resources.js takes array of images.For every instance in the array we call underbar load on url. It is the 'else' block that makes new image and defines onload function which is to be executed once only. Once loading is done, cache url to false and all images load.

Installation / How to run the application

  • Click download ZIP on the right of the screen, then extract the zip file to your computer.
  • Locate where you unzipped the files in the repo.
  • Click index.html to open the game in your browser and enjoy the app !!!

How to play the game

  • Use arrow keys up, down, right and left to move the boy on the grass, to get him to the river without colliding with the bugs on the stone path.
  • If the boy collides with the bugs, he has to go back to the start point. This can be done either by refreshing or hitting "Play Again" button.
  • If you successfully move the boy with no collisions, you win the game and twinkling animation appears.
  • If you want to reset the game, please refresh the page.

Resources

classic-arcade-game-clone-frogger's People

Contributors

sagarj590 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.