Home > Game Development > To Come…

To Come…

Well, there’s still a lot to be done, but the next few things I want to implement are:

  • Items, particularly Weapons, Armor, and Potions.
  • More Double Linked-Lists

Items – The game needs them. I am planning on making a base class, Item, that my Weapon, Armor, and Potion classes will all derive from. My intentions for the use of items will be simple: Weapons will add to the characters attack value, Armor will add to the characters defense value, and Potions, when used, will add to the characters Health value.

By having all the Weapons, Armor, and Potions inherit from the Item class, I can use pointers-to-Items to access them. By doing this, I can create an array of pointers-to-Items, and my array could then hold all the Weapons, Armor, and Potions in the game. This would mean all the Items in the game would have to be explicitly created, but that is what I intend. This way, I could use the D&D weapons, perhaps, with all their attributes. Also, by having all the items in the game be accessible through pointers-to-Items, I could have all the character’s inventories be simply a vector of these pointers-to-Items. Since it is much easier to pass around pointers than the items themselves, this will work out good.

More Double Linked Lists – This will allow for more world to be created and accessible to the user. Currently, the game world is made up of just one Double Linked List, and the user starts at the head of the list and fights their way through to the end. Pretty linear, and pretty boring, so I came up with an idea that I think will be easy to implement. I could add to the Room class a pointer to the head of another double linked-list, which is just another Room. This would allow the player to not only move horizontally, but vertically like so:

Here is the current game, where the player starts in roomA1 and fights through to roomA100:

Now with these added lists, the player could do A LOT more. Each Room in the A list has a linked-list leading off of it, and actually each Room could have a linked-list leading off of it, but that would get pretty messy, so I’ll just stick to what I have. This would allow for many cool things to be added, perhaps the A list would be the wilderness, or outside, and then saw roomA3 was a forest, the D list could be a cave that the player happens upon, where they could go through the many depths of this cave.

As I said, I think this would be easy to implement, seeing as my game loop just needs a linked-list to operate, it wouldn’t matter what linked-list it is. To shoot the player off into another linked-list, I could just set the player to the head of the new linked-list, rather than just the Next or Previous Room.

Advertisements
Categories: Game Development Tags: ,
  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: