Create a Flash game like Rebuild Chile – Step 4: removing debris

Time to see the feature that will allow you to complete a level: removing debris.

Debris can be removed in two ways:

1) Pushing them off the stage through an hole in the border walls

2) Calling an helicopter and removing them on the fly

Obviously pro players will prefer the first option.

First, we need two new tile types: border wall and hole in border wall. The border wall is unwalkable, while the hole in the border wall is still unwalkable but debris can be pushed on it. Once on this tile, the debris disappear.

Also, pressing “H” you can call an helicopter, select a debris with arrow keys and removing pressin SPACEBAR or trying to make it without the helicopter pressing “H” again.

This is the complete, fully commented code:

And this is the result:

original game.

Download the source code.

I enjoyed the making of this prototype so much that I am planning a game based on it, maybe with more options such as more ways to remove debris, and a different theme.

Any idea?

  • neo

    Super awesome :)

  • Bivis

    Very nice!
    Your “Create a Flash Game like…” posts r very useful!
    Keep the good blog!

  • Hello.

    I wrote a couple Facebook games in FBML and since they are in the process of deprecating it, I want to move into Flash games. I have flash experience, but I was wondering if you would be interested in colaborating on a game. I have the design roughed out already and could make all the graphics, database, php calls, etc. Any interest? Please mail me.

  • manoj

    very good tutorial :)

    but your coding style (everything in single .as file) is absolutely wrong, i know as long as you are making money with single .as file games its ok… but it will be much much better if you adopt OOPS concept… because many new aspirants game developer takes lesson from this( i m also one of those :) )

  • Emanuele Feronato

    You’re absolutely right, but it’s easier to comment for a tutorial purpose.

    And none of my AS3 games is on a single .as, as well as some examples you can find around the blog

    • You don’t publish your games in one file? I’ve been trying how to figure out how to get everything to work in one file (instead of multiple ones such as Kongregate’s Shootorial game/tutorial). Guess I should stop doing that.

      Thanks for the site – it’s fantastic.

  • Me

    Thanks, love it when you teach us how to create new games, helps me a lot :)

  • GreenPuffle92

    Thanks, when Rebuild Chile came out, I was wondering how to make it, :D

  • sam319

    Thank u, it’s useful for me:)

  • Awesome!
    Make a game with a snowy/icy background and you use a snowmobile to move iceblocks!
    Then when you do, you can make your own ‘Mini-Town’!

    :D

  • Wilson Silva

    This level took me 6 key presses to finish. I’m a pro :D

  • thanks very much dude

  • Hi, my name is Rennan.

    I´ve tried to use your files at download link. But, Helicoper function didn´t work. Have any problem at it?

  • Ryan

    hey , i like to ask what if we want to change the size of the debris. can we do that and how?