My friend Nathaniel was just watching me code, and he suggested using the event queue to process input instead of polling for every type of input every frame. To be honest I don’t exactly understand how the event queue is any faster than polling (like, at some level there must be some logic checking every key, right?), but it is much faster. Since most of the controls involve holding down keys, I’ve got a lot of code to go through and rework to use the event queue!
I’ve been implementing a level editor feature or two each day. Now we have a little display on screen that tells your current tile coordinates, which paves the way for our status display of health, items collected, and so on.
There’s also a neat little blinky cursor that shows exactly where your tile will land if you place one; this is nice because the reticle can actually move one pixel at a time, making it hard to know which tile you’re in at any given moment. I was going to make the cursor its own special item when I realized I could just use our existing particle system: I make the reticle spawn tile-sized square particles every 11 frames, which fade away just as the next one is being created.
It’s great how much of the code for Paraplu is stolen directly from Soft Landing as I need it. Much of the coding is just simplifying and generalizing the existing code. When we return to working on Soft Landing, I’ll copy that code right back in, cleaner and faster and more flexible.