Install Circle Chain on your iPhone for free and get the source code!! 645 downloads to go - last updated: April 21, 2012

Basic Circle Chain engine using StencylWorks

In my various attempts to port Circle Chain to iPhone I couldn’t forget to create the basic engine with StencylWorks, and as usual it was very easy.

Let me show how does it work. First, we need to create a scene and an actor, the green circle.

Since StencylWorks automatically adds Box2D physics to actors, we need to disable it:

Then the scene behavior will just place ten green circles:

Finally, the behavior attached to the green circle actor will handle the entire movement, assigning to each circle a random position and a random direction and moving it around the screen:

And if you are running StencylWorks on a Mac, you can even test it in the official SDK simulator, as you can see here:

But testing is not over, I promise I’ll explore all possible ways to easily convert your Flash blockbusters into iPhone apps.

Stay tuned.

Rate this post: 1 Star2 Stars3 Stars4 Stars5 Stars (5 votes, average: 5.00 out of 5)
Loading ... Loading ...
Be my fan on Facebook and follow me on Twitter! Exclusive content for my Facebook fans and Twitter followers

This post has 3 comments

  1. Orlando

    on March 1, 2012 at 4:34 am

    Thanks Emanuele. What do you think about the options iStencyl gives to create universal content, like Atlases. What I do not like, but I am really new creating mobil apps, is you have to create twice the content, for instance, for IPad and IPhone, and then switch Atlases according to the device. Is this a fine strategy?

  2. Jon

    on March 2, 2012 at 9:43 am

    Hi Orlando.

    In StencylWorks 2.0, we handle that case automatically and have added a new mode called “Universal 2X” that renders the game at double-resolution on the iPad, using the 2x graphics. You no longer need to use the separate graphics approach, unless you’re optimizing the game for iPad separately.

  3. M

    on March 10, 2012 at 4:06 am

    Great tutorial, please add more!