Skip to content

devarrowsmith/platformer-00

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Platformer 00 🕹

Background

I wanted to try making a game with an event loop and basic physics.
I used this tutorial to create the basic game, then I added some elements of my own.
You can play the game here. The game is not yet responsive and only works on desktop devices.


Controls

  • Jump: Up arrow key
  • Move left/right: Left/right arrow keys

Motivation

Having read about event loops in JavaScript I thought it would be fun to try one out. This was an opportunity to try some new algorithms, think about event sequence and create my first platform game.

I aimed to:

  • Create a platform game
  • Use an event loop to create a continuously responsive interface
  • Practice conditional methods
  • Implement some simple physics
  • Use JavaScript, HTML and CSS in a different context

Screenshots

Screenshot 1 of the platform game. The player, an orange square, jumps between blue platforms dotted with obstacles. To the right of the screen is a goal area marked by two green dots. Retry and New Level buttons are positioned at the bottom of the screen. Screenshot 2 of the platform game. The player, an orange square, jumps from a high platform and is falling to a platform near the bottom of the screen. Screenshot 3 of the platform game. The player, an orange square, jumps up a staircase of platforms. Screenshot 4 of the platform game. A colorful particle explosion occurs in the middle of the game screen. This is a still of the win animation.


Installation

The game is hosted on Github Pages and can be run from there.

To run the game locally:

  1. Clone this repo (Here's a guide on cloning repos).
  2. Navigate to index.html within the cloned directory. Open this in a browser.

Framework

Built with JavaScript and HTML. Styled with CSS.


Next Steps

  • Show the controls in the game window.
  • Make the app responsive.
  • Add mobile controls.
  • Add some extra graphics that show on key events like falling and enemy collisions.
  • Add more enemy types. Ideas include...
    • Ziggy: Moves left and right over a platform
    • Tag: Follows the player's x-location but is confined to a platform
    • Buzzy: Slowly floats towards the player. Not confined to platforms
    • Spacey: Orbits a platform
    • Sentry: Fires small projectiles at the player, but only shoots from right to left. Bound to the leftmost edge of a platform
  • Add a difficulty controller that modifies the number and type of enemies generated.
  • Add a tracker that shows how many wins and losses you've had.

Credits

The core of this game (the canvas, player character, controls, platform generation and jump physics) were produced using a tutorial provided by the team at Edpresso. Additional elements were created by myself.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published