Home > adventure materials, roguelike, Space Mercs, Video Games > Inventory System Update

Inventory System Update

Today’s work has left me with a working inventory system! Space Mercs is going to have an–as far as I can tell–entirely unique system of inventory management that will be integrated with the strategic nature of the game’s real-time combat. None of that is in yet. What we do have, however, is limited inventory slots, a system that checks to see whether the character has room to pick up an item before doing so, and one that rejects the Get behavior if the character is overburdened.

Things are coming along! I want to add item functionality tomorrow (although I have already started to integrate it into the Item class by linking it with a separate class called GameEffects that will manage healing, monster attacks, etc.

Here’s a pic of the @ picking up a key. There is one little bug where picking up an item works correctly, only updating the first status line. When you fail to pick up an item, however, it turns EVERY status line into a “You don’t have room for this” message. If anyone could give me some tips about how or why this is going on, I’d appreciate it.

space mercs roguelike inventory

After picking up a key, the game updates your status appropriately. Unfortunately, it gets a stutter when you FAIL to pick something up. 😦

If anyone knows C# and is willing to help out, here’s the code. The UpdateStatus(string) method turns the first status line into the referred string, then bumps each remaining string down one (if you’re curious and think it would help). Click to embiggen.

C# code get item roguelike

Here's the code for accepting input and calling the GetItem method

  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: