Retro Style Platform Runner Game for mobile with EaselJS (Part 4) – adjusting to mobile displays

The 4th part of my series on creating an EaselJS-Game is about adjusting the game to different display-sizes, which is very important when targeting mobile devices. To visualize, what the result is going to look like – I added the following two iframes, to demonstrate how the game adjusts to a different screen-/stage-size.



Open this http://demos.indiegamr.com/jumpy/part4/index_nearestNeighbor.html in a new browser-window and see how it adjusts to your window-size as you reload the page after resizing the window.
Continue reading

Retro Style Platform Runner Game for mobile with EaselJS (Part 3) – adding movement & more collision

So this is going to be Part3 of my series on creating a retro style platform runner game for mobile devices. Originally I wanted to write about adding animations in this part, however I rethought the who whole part and find it more suitable to first add some movement and make the collision detection complete, as it is still just a very basic algorithm in the previous part.

So this is going to be the result of this part:

Continue reading

Retro Style Platform Runner Game for mobile with EaselJS (Part 2)

This is Part 2 of my tutorial on How to create a Runner Game for mobile with EaselJS – in this part i’m going to cover the collision-detection between two objects in EaselJS.

Types of Collision Detection


There are several types of collision detection methods, I’m going to explain two of the most commong ways to detect a collision – if you want more/detailed information on the subject I would encourage you to google for it or try this article as an introduction to the topic.

1) Distance Based- or Circle-Collision

This is probably the simplest type of collision detection. What you basically have to do is to set a collision-radius for each object, then calculate the distance between the objects and see if the distrance is lower than the radii combined. However the following image shows, that this kind of detection won’t be suitable for our platform game:


Continue reading

getBounds() method for EaselJS DisplayObjects

Please correct me if I’m wrong here, but I was looking for a method or property to retrieve the boundaries of a DisplayObject in EaselJS – however I was not able to find it – so I wrote  my own method for this, maybe this will help someone and hopefully a method like this will be implemented into the framework in the future. If someone knows about the existence of such a method, please post it in the comments, so I can update this post.

Update (12-06-2012): I updated the snipped to work with the current easelJS version, it also includes rotation now.

Update (03-14-2013): Please refer to the following library: https://github.com/olsn/Collision-Detection-for-EaselJS it contains the getBounds()-method and is regularly updated and contains bugfixes

Continue reading

Retro Style Platform Runner Game for mobile with EaselJS (Part 1)

Editors Note: The tutorial is a little bit outdated now, but it still works. However if you would like to learn more on this topic and get a more detailed verison plus all the extras and resources, you should check out my ebook: From Zero to the Appstore – Blueprints for an HTML5 Game.

Here I’m starting a series of 4 articles on how to create a small game with EaselJS that “can” run on your mobile device (unfortunately it won’t run on all mobile devices) – however I also plan on a future posting on how to use technologies like cocoonJS to create a WELL-PERFORMING native app from this.

The FINAL result


The result is going to look similar to this (but with better code!) – In case you take a look at the source-code: This is NOT a good example on how to code cleanly – I did this as a quick mashup to try out a few things. – You can also do another jump, while in the air:

To test this on your mobile device, point your mobile browser to: http://demos.indiegamr.com/jumpy Continue reading