@Rybags, does your code get simple if we exclude special keys?
I only need to detect I J K L SPACE or something similar. I need the code to be as short as possible. It is for a 10-liner.
In a tenliner, it is better not to read from keyboard
, as reading from joystick is shorter ( STICK(0) and STRIG(0) ).
If you really need to read from keyboard, try to arrange your code so that you poke the key just after reading:
Note two things:
- I poke "9" to 764 instead of 255, this is shorter and there is no key with code 9.
- I use a comparison in an expression to get the movement direction, "ud" will be 1, 0 or -1 depending on the keys, the same for "lr".