Lillypad: Project Lag

Posted in: Articles, Lilly Pad by preitz on

This happens once in a while. I can solve one complex problem after another, then get stuck on what would seem to be the simplest task. A sort of “coders block” as it were. This is what happened over the weekend. What I got stuck on was input. I wanted a system that would just handle keyboard and mouse input nicely. I had a few requirements I wanted the system to have. The most important were; the ability to determine if a key or button had just been pressed or released, and the ability to determine if a key or button was currently down. I also wanted to have sets. For example, I wanted the ability to have both the W and the up arrow be placed in a set, so that a character could be controlled by the arrow keys or the WASD keys. There are a couple of other requirements I had for this system but those will wait for later (they have less importance in the short term).

So, after a bit of a struggle over the weekend this system is done (sigh of relief). Now the project can start moving forward again.

I also managed to get buttons done. I created a button class that fits nicely into the rest of the API (and uses the new input system). The button class extends a, mostly empty at the moment, component class. This is so other components can be created as I discover a need for them. Or so custom components can be built.

This week is going to be a bit shy on the updates. I’ll be out several days this week. Also, I have a handful of small features to add to Lillypad before I tackle maps (a much larger feature). So bare with me for this week. Things should be back on track next week.

 

Next: Lillypad: Checkpoint One

  • No Comments Yet