Create a Flash game like ColorFill – part 1

If you play all successful Flash games (and you should, if you want to be a Flash game developer), surely you played ColorFill.

ColorFill

In this game, you have to fill 80% of the stage with colors while avoiding collisions with enemies.

Play the game a bit then follow this prototype

The main idea to create this game is based upon the “vertical state” of arrows. I designed the arrows as horizontal ones, but if the player presses SPACE, I rotate them by 90 degrees so the left one becomes the up one and the right one becomes the down one.

There’s not any more difficulty in this first part, when I still don’t fill the area once I successfully draw a line.

Some previous concepts from Create a flash draw game like Line Rider or others – part 2 are involved in order to determine collisions between the ball and the line.

And this is the result:

Now next challenge is painting the area just closed with the line and manage new stage bounds.

Any ideas? I have a lot… meanwhile download the source code.

  • sorby

    There’s a glitch where if you press space while the arrows are moving to the sides, it makes the arrows move vertically.

  • Niall Lavigne

    Nice idea for a tutorial, I look forward to the second part.

  • Very nice post, you should make more of these “make a game like __” tutorials.
    They are very useful. :)

    Also, I sent you an email some time ago, you haven’t replied to me. It was about some nice prototype. :)

    PS:
    Yes, I admit it I am ADVERTISING!

    eaglevision.890m.com/blog

  • Kesh

    if you push space and click it messes up, fix that bug boy!

  • Kesh, I wouldn’t call that a bug. I’d call it a whole new game!

  • Kesh, I wouldn’t call that a bug. I’d call it a whole new game!

    So true…

    I love the “Create a game like X” tutorials! It’s probaly the best way of learning

  • Hi Emanuele, I am Kokosan the guy who made colorfill.
    Your approach is nice, I coded the game with AS3 and so far I used the same one..
    Can’ t wait to see how you ll do for the rest of the game (calculate the area was tough for me). I am pretty sure it will be more clean than my code.
    Anyway, I learn stuff from your tutorials so keep up the good work! (but please don’ t add powerups in your tutorial, at least not before I make colorfill 2:)
    Best
    Kokosan

  • Pingback: Playing with getPixel : Emanuele Feronato - italian geek and PROgrammer()

  • hey, since it wasn’t mentioned, color fill is basically a remake of a game included with windows 3.1

    I can’t think of the name of it, but it was right along side mine sweeper, which has continued to be a game included with windows.

    the game i am thinking of had red and white balls bouncing around, and the splitting arrow looked a lot more like a scroll bar.. and if a ball hit the end of the splitter it bounced off, but you still lost if it hit the middle of the splitting line that was being drawn… also you could not destroy the balls by sectioning them off, it would just be put into its own section at that point.

    anyway, thought it should be noted that the game concept has been around.

    glad to see color fill, and the slight differences including variety of enemies.