Create HTML5 Vertical Endless Runner cross platform games

Using Phaser framework and other FREE software
Endless runner games are gaining more and more popularity and they are really easy to code.
I will take you by hand through the creation of a complete HTML5 vertical endless runner cross platform game with a lot of features and room for customization.
100 pages + 31 source code examples with a free update to come in a few days.

PhysInjector game prototype in only 100 lines of code

Emanuele Feronato Actionscript 3, Box2D, Flash, Game design

Some days ago I showed you a new Box2D library called PhysInjector, now it’s time to let you see how can you make a fully working physics game prototype in only 100 lines of code, braces and classes included.

It’s (not that) vaguely based on my BarBalance game, an old game which I sold to FOG.

In this prototype, which would need to be a bit optimized but I wanted to keep it with only 100 lines of code, you have to create boxes by clicking with mouse button above the black line. Boxes will fall on the balance at the bottom of the screen, which color represents the next box you are about to create.

When two boxes of the same color collide, they become a bit transparent, and when a box turns completely transparent, it disappears. If a box falls down the balance, you lose a life. Lose al lives and it’s game over.

Give it a go:

Although the game is made by only 100 lines, it features:

* Static bodies
* Dynamic bodies
* Sensors
* Revolute joints
* Motors
* Collision detection
* Score
* Lives
* 8 different box colors
* Increasing difficulty

All these features in just a few lines are possible thanks to PhysInjector which allowed me to add Box2D physics in a snap.

This is the source code.

During next days, I will show you how to create the same thing using the standard Box2D library, and we’ll then count the lines.

Download the source code of the entire project. What’s your best score?

Stay up to date
Follow me on the social networks and never miss a post.

Official Emanuele Feronato Facebook page

Official Emanuele Feronato Twitter account

From null to full HTML5 cross platform game

I will take you by hand from the bare bones of JavaScript programming through the creation of a full cross platform HTML5 game, with detailed explainations and source code.

If you don't know where to start, then From null to full HTML5 cross platform game is the book for you.

Comments 6

  1. Luna

    Hi Emanuele! Thanks for your contributions. I’m making my first game and it is almost entirely on knowledge that I learned from you!

    I have an unrelated question – How do you code the Rate this post stars in flash cs6? I want to add something similar to my site.

    I’m a BIG fan

  2. reyco1

    it doesn’t at the moment, but that is very simple to add to the PhysicsObject class. It’s in the next release. If you really need it now, hit me up and I will send you a stable pre-release

  3. Every

    Hi Emanuele!
    Today,I liked it when I see the library!I’m learning it by your demo.It’s very good.But I’m failed when I want to replace the box by my Sprite.Could you teach my how can I do?Thanks.
    I’m your new fan.

Leave a Reply

Your email address will not be published. Required fields are marked *