Sign in to follow this  
Theis_Bane

Text Adventure - When to query a dataset

Recommended Posts

Theis_Bane    448
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
Ashaman73    13715
[quote name='Theis_Bane' timestamp='1348728079' post='4984248']
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?
[/quote]
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 [img]http://public.gamedev.net//public/style_emoticons/default/smile.png[/img]

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this