Code Monkey home page Code Monkey logo

musk-simulator's Introduction

There’s a platform for a rocket ship to land on at the bottom of the screen.

You start with a finite amount of fuel in the rocket and
the goal of the game is to try and land the rocket on the platform while conserving the most amount of fuel possible.

After landing you are reset above the platform with a random direction that you have to correct and land.



To move the rocket, you use the arrow keys. Up arrow turns on the thruster and
the left and right arrows rotate the ship. When the up arrow is pressed, the spaceship png changes to the
spaceship thrust png.

The thruster reduces or increases the rocket speed in the direction the ship is pointing.

For example, if the rocket is pointed directly horizontal, there will be no change in vertical velocity,
only a large change in horizontal velocity.
q
If the rocket is pointed 45 degrees above horizontal the changes in vertical and horizontal velocity
will be equal




For UI, there is a fuel bar that decreases as you use your thruster
There is also a text box that says: Number of consecutive landings
There is also a text box that says: High score
            this is the largest number of consecutive landings achieved this far
For multiplayer mode there is also the score of player one and player two


The game consists of multiple consecutive "landings"
A landing is one instance of the rocket randomly starting above the platform and the player attempting to
land on the platform.


For multiplayer, there are two rockets, both with separate, randomly determined velocity speeds and velocity directions

The first person to land their rocket on the platform will win a point. The aim of the game is to get to the platform first,
but you also have to conserve fuel because once you run out, if the other player still has fuel left, they get to try and
land their ship without competition until they run out of fuel.

One player uses WASD, the other uses arrow keys



In order to safely land the rocket, you need to have no horizontal velocity and a very small vertical velocity.
If there is any horizontal velocity or too high of vertical velocity, the rocket explodes and your fuel is cut in half


The platform height and width will be randomly determined at the start of each landing.

musk-simulator's People

Contributors

crypto-god-pablo avatar jcahill1479 avatar saf-ari avatar sircase avatar

Stargazers

 avatar

Watchers

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