Text Adventure - When to query a dataset
Members - Reputation: 283
Posted 27 September 2012 - 12:41 AM
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.
Members - Reputation: 4739
Posted 27 September 2012 - 12:53 AM
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
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?
My game: Gnoblins
Developer journal about Gnoblins
Small goodies: Simple alpha transparency in deferred shader