This is a miniature version of the classic Frogger arcade game. It is written in the smallest amount of JavaScript that I could squeeze it. The core logic of the game is a single function that fits in less than 140 characters.
#OO##OO##OO# O Lilly pad
~~==~~~~==~~ ~ Water
~~~~====~~~~ = Log
:::::::::::: : Grass
............ . Road
..##...##... # Truck
.....@...... @ Frog You
:::::::::::: : Sidewalk
Left Arrow = Move left
Right Arrow = Move right
Up Arrow = Move up
Down Arrow = Move down
The update function is the core logic of the game. It processes all game data for the next display frame. This is the function that I am trying to minimize. I realize it's cheating a bit to ignore the size of the outer script, but it's the benchmark I have chosen since the display mechanism is arbitrary and less important, for my purposes.
The update function can be stripped of white-space and formatted to in less than 140 characters of text which is small enough for tweeting etc.
See my other games:
Awesome! I love the concept of JS games that fit into a tweet!