Sunday, February 8, 2015

Osmosis: A short game in Phaser.js


This was one of my earlier phaser experiments. You start the game as a molecule and the goal is to become more massive by absorbing smaller particles. This game is based on the well known Osmos with a twist. Its a gravity simulation game where the game world expands with the player. You win the game when you become a black hole.

Spheres that are more massive absorb spheres that are less massive. Spheres that appear red are more massive than you and should be avoided. Spheres that appear blue are less massive and safe to absorb. Use the mouse or touchscreen to propel matter from your sphere but be aware that locomotion comes at a price. You sphere will slowly lose mass as it is ejected. In other words, the blue sphere that you were moving towards may not be blue by the time you get to it!

The source code is about 500 lines of code. Feel free to fork it on github.

No comments:

Post a Comment