Incomplete Game Prototype: Gravity

Screenshot of GravityLast week, I created a small prototype in JavaScript, using the HTML5 Canvas element.

My original idea was simple:

  • The player shoots a projectile at a target in space.
  • Between the player and the target are some gravity wells.
  • Consequently, the player has to take gravity into account when aiming.

My goal was to finish this project in less than 10 hours. I didn’t get as far as I hoped in that time, but I’m still happy with the result. I managed to get the core physics done and working with JavaScript and the Canvas API was more fun than I expected.

I also implemented a simple entity system for this game. I’m pretty sure I’ll use this in future projects and extend it further.

But enough talk. You can check out the source code at GitHub or watch a live version of the prototype (won’t work without a current version of Chrome, Firefox, Opera or Safari).

Advertisement

2 responses to this post.

  1. Posted by adam on March 9, 2011 at 12:04

    Can you pull the entity system source out into a github project of its own, and add it to http://entity-systems.wikidot.com/ ?

  2. Will do, but it’s really basic and incomplete right now.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.