Jump to content
  • Advertisement
Sign in to follow this  
Theis_Bane

Text Adventure - When to query a dataset

This topic is 2118 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm working on a multiplayer text adventure, and I've just made it to the part where I will start querying a dataset. I don't have any experience with networking or server-based programming, so I'm trying to get most of ducks in a row before I get there. I have a general idea how I want to set this up, but I'm not 100% sure what would be best, or if I'm even in the ballpark of good program design here.

I'm going to set my game world up as a 3d array of rooms, and I'm thinking of either having each room possess a small dataset representing the information contained within that room, or have a custom method designed to query the main dataset for all the information related to the room's unique ID on the fly. I suppose I could have individual custom tables inside the main dataset to represent each room. Sigh. So yeah. Thoughts on this would be nice.

Second. Should I pass a smaller dataset that represents a player's current room through the network so the client computer could do much of the processing, or should the client pass the parsed command arguments to the server and then the server perform queries against a local dataset, modify the values, and return the results?

For the first, it would be easier on the server because much of the processing could be delegated out to clients, but I feel it would make it harder to ensure that two separate players in the same room don't take the same item at the same time and creating duplicates, as there would be multiple copies of that dataset out in the world.

For the second, it would be much easier to ensure everyone is doing everything in order, but it would greatly increase server strain.

So there is my situation. I don't exactly need code examples, but I am looking for a detailed explanation as to the process I should be going through. Or if I'm just looking at this in the wrong way.

Share this post


Link to post
Share on other sites
Advertisement

should the client pass the parsed command arguments to the server and then the server perform queries against a local dataset, modify the values, and return the results?

This is the way to go for a text adventure. Make all the decisions on the server and display only the result on the client. No need to making it more difficulty than neccessary smile.png

Share this post


Link to post
Share on other sites
Also, while you may call it a "multi-user text adventure," the rest of the world calls it a "MUD" (Multi-user dungeon) and Googling for that term will give you tons of references!

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!