Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


Text Adventure - When to query a dataset


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 Theis_Bane   Members   -  Reputation: 312

Like
0Likes
Like

Posted 27 September 2012 - 12:41 AM

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.

Sponsor:

#2 Ashaman73   Crossbones+   -  Reputation: 7987

Like
0Likes
Like

Posted 27 September 2012 - 12:53 AM

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 Posted Image

#3 hplus0603   Moderators   -  Reputation: 5692

Like
0Likes
Like

Posted 27 September 2012 - 11:09 AM

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!

enum Bool { True, False, FileNotFound };




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS