Intercepting Shift+direction keystrokes
Posted: Sun Jul 25, 2010 5:20 pm
Something I've been playing with for the last few days. Just an experiment, not a full game.
Setup: You have a player clone surrounded by breakables and objects, like so:

Whenever the player shoots, the player clone shoots as well. This destroys one of the breakable walls; one of the objects detects this, replaces the breakable wall, and sends out the message that the player has fired a shot north, or whatever.
Idea: Add two objects to the board, a giver and a taker. The giver #gives 1 ammo every cycle, and the taker #takes one ammo every cycle. There is no net change -- the cycle begins and ends with the player having 0 ammo.
However, there is a brief period when ammo is 1. So we get clever with the order of the stat list, and we create the giver first, then the player clone, then the taker. The result is that the player has no ammo, yet the player clone does.
As a result, the user can press Shift+direction, and the clone-breakable-detector assembly will detect it, but the player will not emit a bullet. Could be useful for designing an engine -- the download has an example where pressing Shift+direction does not shoot, but instead chooses a weapon.
Setup: You have a player clone surrounded by breakables and objects, like so:

Whenever the player shoots, the player clone shoots as well. This destroys one of the breakable walls; one of the objects detects this, replaces the breakable wall, and sends out the message that the player has fired a shot north, or whatever.
Idea: Add two objects to the board, a giver and a taker. The giver #gives 1 ammo every cycle, and the taker #takes one ammo every cycle. There is no net change -- the cycle begins and ends with the player having 0 ammo.
However, there is a brief period when ammo is 1. So we get clever with the order of the stat list, and we create the giver first, then the player clone, then the taker. The result is that the player has no ammo, yet the player clone does.
As a result, the user can press Shift+direction, and the clone-breakable-detector assembly will detect it, but the player will not emit a bullet. Could be useful for designing an engine -- the download has an example where pressing Shift+direction does not shoot, but instead chooses a weapon.