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.

  • YopSolo

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

  • jakubgondek

    Lvl: 3

    Surprisingly playable.

  • 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.

    • Emanuele Feronato

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

  • Visitor

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

  • Interesting point to know :)

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

  • Zimmerstein

    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


  • Pingback: Creating your own backgrounds with Adobe Photoshop Scripting - Emanuele Feronato()

  • Ed Moore

    Got 1547
    Level 4

    Good game

  • just saying

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

  • Alex

    Stressful, but good game. 2439 Lvl 5

  • santa

    Really nice code!

    Lvl: 7
    Sum: 19
    Game Over

  • Uwe

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


  • Robert

    Any chance you will convert this to CreateJS JavaScript so it can be exported from Flash?

  • sam

    Hello Emanuele Feronato,

    Can I get your Email

  • sysads


    Is there a finished product or game for this. Also do you have it on ios and android?

  • jay

    thanks u very much