
Loop Invader
This game is from ldjam.com, which is currently unavailable.
You can try viewing the original page on Web Archive (may not load correctly).
You can try viewing the original page on Web Archive (may not load correctly).
Skip around through the video below to see different strategies for playing the game:
https://www.youtube.com/watch?v=LgOGZiY_fXY
There are invaders hiding among your data! Use your observation skills and code blocks to track them down and hit 'em with your ZAPPER!
PERFORMANCE ISSUES: if you are experiencing lag, please download the native version for your operating system. The HTML5 version seems to struggle a bit.
How to play (TL;DR version)
Each level has a bunch of balls in a grid. One or more of those balls are an "invader". You need to figure out which balls are invaders, and then zap them with your zapper! (spacebar)
This is how/why the ball's numbers change:
* When a ball touches an invader, its number goes up after a 1 second delay
* When that ball touches another non-invader ball, its number goes down immediately.
* A ball’s number will never fall below its original value, and will never go above 9
* an invader's number will never change
Hints:
* When an invader touches a regular ball, that ball's number will go up exactly 1 second later, but the invader's number will never change.
* Trying to spot the invaders with your eyes alone is not going to be easy because there is usually too much going on.
* Create while blocks to trap balls, and create if blocks to create barriers. This enables you to control the movement of the balls, and makes it easier to spot the invader(s)
* An easy trick to narrow the search for the invader is to collect each number into a separate while block (easier said than done!). If you manage to do this, you'll know what the invader's number is by looking at the while block that is leaking data.
* Since an invader's number can never change, it will always be stuck in a while loop ;)
Code block syntax
The game is pretty lenient when it comes to whitespaces, so add as many as you want. However, you must use parentheses, and you can't have a whitespace between `<=` or `>=`. Here are some examples of valid code blocks:
* `if(1)`: a barrier that blocks balls with the value 1
* `while( <= 2)`: a while loop that collects balls with a value less than or equal to 2
* `while (>2)`: a while loop that collects balls with a value greater than (but not equal to) 2
* `if(!0)`: a barrier that blocks everything, since the lowest possible value is 1
* `while (!3)`: a while loop that collects balls with a value that is NOT 3
Known bugs
* If you place two code blocks right next to each other (so they're touching), the balls inside might leak out erroneously. For example, an `if(1)` block touching a `while(2)` block could result in the `2` balls in the `while` loop to leak out when they touch the `if `block. To be safe, make sure there is at least one empty space around all code block!
Proof that it's winnable:
it's actually pretty easy once you get the hang of it