Home > adventure materials, roguelike, Space Mercs > Working Inventory (Part 2)

Working Inventory (Part 2)

I have finally resolved the inventory stutter Space Mercs suffered from! As you can see in the below picture, the game recognizes the use of an item (such as a potion) and prevents itself from repeating the message a thousand times–success! What happened was that I had failed to correctly do a check for current key while ensuring that the key had previously NOT been held down.

I was under the impression that my code had corrected for this possibility without the need to actually check each keystroke against the previous stroke, but I guess that I had missed something somewhere. Adding in an explicit check like this takes almost no time or effort, however, and it works well enough that I don’t regret adding it in.

space mercs roguelike working inventory

Advertisements
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: