EDIT: Sorry, folks, I meant to save this as a draft to finish later and accidentally published it. Please re-read it now if you last saw it ending in an incomplete sentence :-)
Robin D. Laws, pen-and-paper game designer (including the cult classic Feng Shui), explains why his blog is an achingly slow source of of rules support for the games he has designed. While I was working on a live product I occasionally fielded support questions on my blog, but I saw and experienced the issues he talks about far more on the official forums. You don't have to look far in official game forums to find players asking why, even with developers participating, game design questions are answered infrequently and slowly.
Robin has the advantage of being the sole named designer for Feng Shui and HeroQuest, and he still can't answer these questions off the top of his head. When you're instead talking to a community manager, or a random non-designer (such as myself), or even the wrong designer, it gets even slower. On the bright side, when you're talking to a developer or community manager on the forums, or going through other official support channels... answering your questions is part of the job. The community manager might have tools to help track and manage questions to make sure they get answered, people in support definitely do, but for people like me it's a matter of personal discipline, memory, and note-taking to be able to get back to these a week or two (or more) after they're asked with answers.
Tuesday, July 21. 2009
HadoopDB: worth investigating
I've written a bit here before about giving up on traditional relational databases for gathering, storing, and analyzing game metrics data. All three steps have serious scalability issues for the "one big machine" model.
However, SQL is often much more pleasant to write analytical queries in than, say, raw Java (or C++ or Python or...). So progress on a hybrid MapReduce/SQL system based on Hadoop and PostgreSQL is pretty interesting. I haven't had a chance to read too far into the announcements, or research the project itself, but it sure sounds interesting.
However, SQL is often much more pleasant to write analytical queries in than, say, raw Java (or C++ or Python or...). So progress on a hybrid MapReduce/SQL system based on Hadoop and PostgreSQL is pretty interesting. I haven't had a chance to read too far into the announcements, or research the project itself, but it sure sounds interesting.
Monday, July 13. 2009
Online Game Techniques and web technology
Some background before I get on with my point: I read, but only very rarely agree with, Darrin West's blog Online Game Techniques. I think my biggest sticking point was one of his first posts, Replicated Computing (10k Archers) where he argued that synchronized simulation1 is a terrible idea, and a fool's errand. Since then, there has been more to disagree with, but sometimes I do agree and honestly, I feel bad for not talking about his posts more. I'd comment on his blog, but in the past authenticating sufficiently to be allowed to post comments has been an issue2.
Just the same I was pretty interested in his most recent post on Web tech for "game services" because that's been an interest of mine for a while (although in this precise context I've only touched upon the issue briefly). It started as a discussion of whether to be DB-centric or not, and wound up as a discussion of how to use web services as part of the game.
Touching on both subjects a bit, I think the right approach is to treat the database as an analysis-friendly blackbox data store. The game server writes data to the database (from which anything else is welcome to read), and reads it back later, but anything interacting with the game goes through the simulation engine. Some web services, like chat log search or character sheet inspection, would work just fine reading potentially-stale data from the database. Other potential web services, like an auction house or microtransaction system, should go directly to the simulation engines, do their transaction there, and let the engine manage storing the results.
The biggest reason for this is that relational databases don't have a good way of pushing data into the simulation, but they are designed to be excellent for having data pushed into them. This isn't as noticeable with web applications, because HTTP is stateless and so the natural pattern on the web is to gather implicit state from the database in response to a request, then process the request (probably pushing results and state changes back into the database), and to finally return a result. If your game server takes this model - and it's pretty much required for web-based games, so I'm not assuming you don't or can't - then using the database as the communication medium makes perfect sense.
However, as soon as you move away from that polling model, any web services that take that traditional (web) approach will screw the entire system up. The game server isn't notified of the changes; it doesn't poll the database for the changes; the changes are quickly overwritten. The next obvious step is to have the traditional web service take an extra step - notify the simulation engine that something has changed. What changed? Well, either the web service tells the simulation what changed, or the simulator has to figure it out; in the first case, there isn't any reason to complicate your transaction by also telling the database, and in the second case... well, I'll just say that in software development you should never imply a thing when you can state it outright.
In my opinion, then, you are left with two really good options, depending on your game: following the standard web model and relying on the database to be the primary communication and arbitration layer, or taking a simulation-centric model and relying on the database as a backing store only. A backing store that is reasonably amenable to data mining and analysis, yes, but not the arbiter of truth about game state - or even parts of game state.
1. Synchronized simulation is an approach to client/server synchronization where you minimize 'event' traffic to clients by sharing initial state, and events thereafter that one side or the other can't predict (mostly player actions - either yours or someone else's), and otherwise don't talk to each other. It is more common in peer-to-peer multi-player games (e.g., older RTS titles), and was also the model used in Dungeon Runners (which, in a previous incarnation, was an RTS). It has its issues, but I think it is a "solved problem" to greater extent than Darrin.
2. Last time I checked, "anonymous" and "name/URL" were not options for establishing your identity for comments; as I recall the options were "Blogspot account" and "OpenID account" - neither of which I have or want to bother creating. I feel bad for not starting discussion here, but then I would want to notify him that I'm talking about him, and the crazy downward spiral continues.
Just the same I was pretty interested in his most recent post on Web tech for "game services" because that's been an interest of mine for a while (although in this precise context I've only touched upon the issue briefly). It started as a discussion of whether to be DB-centric or not, and wound up as a discussion of how to use web services as part of the game.
Touching on both subjects a bit, I think the right approach is to treat the database as an analysis-friendly blackbox data store. The game server writes data to the database (from which anything else is welcome to read), and reads it back later, but anything interacting with the game goes through the simulation engine. Some web services, like chat log search or character sheet inspection, would work just fine reading potentially-stale data from the database. Other potential web services, like an auction house or microtransaction system, should go directly to the simulation engines, do their transaction there, and let the engine manage storing the results.
The biggest reason for this is that relational databases don't have a good way of pushing data into the simulation, but they are designed to be excellent for having data pushed into them. This isn't as noticeable with web applications, because HTTP is stateless and so the natural pattern on the web is to gather implicit state from the database in response to a request, then process the request (probably pushing results and state changes back into the database), and to finally return a result. If your game server takes this model - and it's pretty much required for web-based games, so I'm not assuming you don't or can't - then using the database as the communication medium makes perfect sense.
However, as soon as you move away from that polling model, any web services that take that traditional (web) approach will screw the entire system up. The game server isn't notified of the changes; it doesn't poll the database for the changes; the changes are quickly overwritten. The next obvious step is to have the traditional web service take an extra step - notify the simulation engine that something has changed. What changed? Well, either the web service tells the simulation what changed, or the simulator has to figure it out; in the first case, there isn't any reason to complicate your transaction by also telling the database, and in the second case... well, I'll just say that in software development you should never imply a thing when you can state it outright.
In my opinion, then, you are left with two really good options, depending on your game: following the standard web model and relying on the database to be the primary communication and arbitration layer, or taking a simulation-centric model and relying on the database as a backing store only. A backing store that is reasonably amenable to data mining and analysis, yes, but not the arbiter of truth about game state - or even parts of game state.
1. Synchronized simulation is an approach to client/server synchronization where you minimize 'event' traffic to clients by sharing initial state, and events thereafter that one side or the other can't predict (mostly player actions - either yours or someone else's), and otherwise don't talk to each other. It is more common in peer-to-peer multi-player games (e.g., older RTS titles), and was also the model used in Dungeon Runners (which, in a previous incarnation, was an RTS). It has its issues, but I think it is a "solved problem" to greater extent than Darrin.
2. Last time I checked, "anonymous" and "name/URL" were not options for establishing your identity for comments; as I recall the options were "Blogspot account" and "OpenID account" - neither of which I have or want to bother creating. I feel bad for not starting discussion here, but then I would want to notify him that I'm talking about him, and the crazy downward spiral continues.
(Page 1 of 1, totaling 3 entries)