Giter Site home page Giter Site logo

platformer's Introduction

Platformer

An intro to video game programming featuring Halle in a configurable platformer

Setup

  1. Fork this repository on GitHub by clicking the Fork button at the top right of this repository webpage.

  2. Clone the project into a Cloud9 workspace.

  3. From the bash terminal in the console view, cut and paste the following command:

     git remote add upstream [email protected]:OperationSpark/platformer.git
    

    This will allow you to pull changes added to the origin / master - the original Operation Spark Platformer repository.

  4. Open the index.html file and press the green Run button at the top of your Cloud9 workspace. This will start a web server hosting your game, and a new pane will open up on the console view at the bottom of your Cloud9 workspace. Click on the link that appears in the console view, then select open. This will open a new brower tab running your game.

Objective

The idear is to design one level of a platformer game. You will create the platforms, add cannons, and collectables that Halle must collect.

It's up to you to design a level that is challenging but doable. Consider tweening platforms, cannons, and collectables.

Where to Code?

Open up 3 files:

  1. js/init/platform.js: Follow the instructions in outlined in the file to design all required platforms for the game level.
  2. js/init/cannon.js: Follow the instructions in outlined in the file to design all required cannons for the game level.
  3. js/init/collectable.js: Follow the instructions in outlined in the file to design all required collectables for the game level.

You see instructions on where to write your code - keep your code in between the areas ALL YOUR CODE GOES BELOW HERE and ALL YOUR CODE GOES ABOVE HERE. This will help you make less errors. For example:

        ////////////////////////////////////////////////////////////////////////
        // ALL YOUR CODE GOES BELOW HERE ///////////////////////////////////////
        
        collectable.create(type.steve, 200, 170, 6, 0.7);
        
        // ALL YOUR CODE GOES ABOVE HERE ///////////////////////////////////////
        ////////////////////////////////////////////////////////////////////////

Code a little, save your work (Command / Ctrl + s), switch back to the tab running your game and refresh the page (Command / Ctrl + r) to see your work!

Have fun!

Pushing your work back to GitHub

After you've designed your level, run (cut and paste) the three following commands:

  1. Add all your changes to a changeset:

     git add -A
    
  2. Commit your changeset:

     git commit -m"create awesome platformer game"
    
  3. Push your changeset to your GitHub forked repository:

     git push
    

Great work! Pat yourselve on the back and show off your game!

Remember that when you comeback to Cloud9, the webserver might have stopped, so to restart it, you must open the index.html file and press the green Run button. (See step 4 in the Setup section, above).

platformer's People

Contributors

jfraboni avatar magdalenemc 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.