Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I am new to VB.net but know enough to kind of dive in. I want to make a text adventure but I am having problems in how I want to store the data for inventory items, characters and such. Right now, I have three rooms but a lot of if and then statements on how to tell if they should appear in your (listboxes) inventory or items in room box.

 

Inventory is stored in one list box and items that are in the room (if you haven't already picked it up) are listed in another. I have GET, LOOK, DROP, etc buttons.

 

Is there a class or module I can use to refer to to help look for which items you have and don't have?

 

Thanks!

Posted

Well, here is what I need help with.

 

This is going to be a button oriented game. So, if I go "north", I've been coding the information about each room that can be reached by going north in the north button section of my code. I want to be able to put this somewhere else, say in a module or a class.

 

Any tips on that or links to sites?

 

Thanks,

Brian

Posted
I would create a cRoom class, that contains all the data for a certain room. Inside the class have pointers for North/South/East/West that point to the instance of the cRoom class for the rooms connecting to this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...