Build 10 games and learn game development along the way in this fast paced game development course

Get the source code of 12 commercial games, loaded 50+ million times, and learn the secrets of game design

Learn how to make a successful Flash game from a real world example. Fully commented source code

Create realistic Flash physics games from scratch with advanced features, from Angry Birds to Crush the Castle

Flash math game in less than 2KB

Sometimes I make some experiments about fitting complete games into a ridiculously small amount of space.

I already published a complete Flash Sokoban game in less than 2KB and a complete Bejeweled game in less than 2KB, this time I want to show you an original math game concept made in less than 2KB (well, actually exactly 2KB).

The game is similar to Globez, you must draw a path with the mouse to select circles. Every circle has a number in it, and the sum of all selected circles must match one of the shrinking circles on the right. Once a circle on the right becomes too small, it’s game over.

I managed to include backtracking, a “not that flat” scoring system and a level progression. Unfortunately the game has no “Play again” button but all in all we are talking about a 2KB game.

Here is the game, I am curious to know your best score:

And here is the script, probably there are still some bytes to save:

I was able to save some space by replacing Point type with an Object with x and y variables.

A full version of the game with some more features is due in some days.

Download the source code.

Rate this post: 1 Star2 Stars3 Stars4 Stars5 Stars (12 votes, average: 4.67 out of 5)
Loading ... Loading ...
Learn how to make a successful commercial Flash game from a real world example: get the fully commented source code of Globez, a Flash game played millions of times which generated a four figure income. Limited copies available.

Get it now
Be my fan on Facebook and follow me on Twitter! Exclusive content for my Facebook fans and Twitter followers

This post has 14 comments

  1. YopSolo

    on November 4, 2013 at 8:55 pm

    (985 pts)
    good game idea
    but please use more kb for selectable = false on textfields and a bigger font size :)

  2. jakubgondek

    on November 4, 2013 at 11:09 pm

    1234
    Lvl: 3

    Surprisingly playable.

  3. Wadeck

    on November 5, 2013 at 5:43 pm

    You can save kb from “;” and “public” no ? Dunno if you consider the spaces when you count the weight, but you can show a code beautified + code minified in order to reduce weight but keep readable code.

  4. Emanuele Feronato

    on November 5, 2013 at 10:44 pm

    Wadek, if I omit “public” bytes count increases, quite weird isn’t it

  5. Visitor

    on November 6, 2013 at 1:00 am

    Hi,
    Please can you suggest some good italian websites to submit flash games?
    If you can provide submit page link.
    Thanks

  6. Wadeck

    on November 6, 2013 at 11:51 am

    Interesting point to know :)

  7. Lo Sauer

    on November 8, 2013 at 9:35 am

    Very nice. And great work. You should participate in a Hackathons with code-size limits of 512By, 1kb, 4k and so on.

  8. Zimmerstein

    on November 10, 2013 at 3:21 pm

    Hi there Emanuele! I keep getting your blog when googling for flash related stuff (really liked the monetization series (and I’m still damn curious how big was your deal with newgrounds)). Also I like all the tools you introduced to me!

    Only thing which could be better would be if your coding style used more spaces :D

    Cheers

  9. Creating your own backgrounds with Adobe Photoshop Scripting - Emanuele Feronato

    on November 12, 2013 at 12:02 am

    [...] bit different: I was looking for a background full of numbers to use in the enhanced version of my Flash math game in less than 2KB so I started googling a bit until I stumbled upon a series of images like these [...]

  10. Ed Moore

    on November 19, 2013 at 6:25 am

    Got 1547
    Level 4

    Good game

  11. just saying

    on November 21, 2013 at 3:29 pm

    publish it as it is, on adobe air for mobile and you get ~ 25Mb game

  12. Alex

    on November 24, 2013 at 7:55 am

    Stressful, but good game. 2439 Lvl 5

  13. santa

    on December 3, 2013 at 12:41 pm

    Really nice code!

    3196
    Lvl: 7
    Sum: 19
    Game Over

  14. Uwe

    on January 27, 2014 at 9:28 pm

    HI, can anyone explain a little bit the function for mousedown, mouse move and mouse up??

    Thanks!!

Thank you for the download!!

I hope you will find it useful and make something interesting out of it

To keep up to date with the blog, why don't you like my Facebook page and follow me on Twitter?

Want to learn more? Don't miss this:

Learn how to make a successful commercial Flash game from a real world example: get the fully commented source code of Globez, a Flash game played millions of times which generated a four figure income. Limited copies available.

Get it now

×