Create a Flash game like The Impossible Line – Final prototype

As promised, here is the final prototype of The Impossible Line game.

In first step I showed you how to draw following mouse movement.

In second step I showed you how to create the collision radar.

In this big update I am introducing the remaining features:

* Goal: you now have to reach the green circle at the right of the stage.

* Death: happens when you hit a wall.

* Light powerup: in the original game you activate it with an icon, in this version you have to touch it to activate it. I am using the same principle seen in the second step to create the radar, together with some gradient fill to achieve quite the same effect you can see in the original game.

* Replay: once you win or lose the game, you can see the replay of your action. This is an amazing feature which can be done just recording player position at every frame by storing it into a vector, then moving the player according to vector values.

To make everything fit into a quite small and still readable full commented script, I removed some basic features introduce at step 1 such as drawing and rotating.

You should be able to add them by yourself in a matter of seconds. Here is the script:

And this is the result:

Move the white circle to the green circle avoiding white walls and looking at the red radar. Get the yellow circle to turn on the light. Refresh once you win or die.

Download the source code. Next time, I am going to show you how to port it to iPad using Starling.

  • Dear Emanuele Feronato,

    please do not show people how to copy our game and then port to ipad…it’s not nice.
    Instead please show them how to make original games.
    many thanks

    Adam (production Director Mi)

  • Ashwin

    Wonderful… thanks for making Actionscript 3 tutorials in this pro HTML5 driven times !!!

  • Nix

    Emanuele can you make flash as3 level editor tutorials?
    Why? It will be unique tutorial, I cant find any as3 level editor tutorials, there are a few source code for basic level editor but not tuts, its alomost useless.
    Why level editor?
    Look it this website
    This guy created only two flash games with level editor, only 2, and sometimes there are 250 users online. His website is better than most other flash website with hundrets flash games.

  • Wow! Thank you for such detailed step-by-step tutorial! It’s very useful for all starting game developers who want to develop their own HTML5 game! Wish there were more such resources when I started