Tuesday, May 18, 2010

On Separating Minds from Caffeine

Why am I not working on new gameplay right now? What could be more important? Well, the problem I ran into last time was simple: I can't balance a roguelike to save my life. What factors determine how much damage a weapon-based attack does? The player's strength, skill with the weapon, the weapon's power, the enemy's armour, skill with the armour, and their defence. Oh, and aside from balancing those stats relative to one another, also note that the distribution of healing items and equipment is relevant. And of course when you throw in multiple players or make the dungeon real-time... oh, the details, how they pile.

So that's the part of game-making that I absolutely loathe. However, I have friends who love to critique games for being too easy or difficult due to over- or under-powered items, monsters, etc. After all, wouldn't you enjoy helping out? I'm working on a way for players to edit the game as they play. You guys are going to help make this.

On the technical side, online editing of game content isn't that tough at all. It is a hefty addition of code, though. Since I've decided to allow for both multiplayer and singleplayer gameplay, I have some code to organize. Everything that happens under the hood in Cyphen either consists of this abstract game-state with tons of interactions; graphical nonsense so it looks pretty on the screen; and networking code to make sure the client and server are properly communicating. Slapping 'if we're the server, do this... if we're the client, do this.." everywhere gets... ugly. So I'm engineering something better.

Game actions have always been split into parts, so that the server might check to see if a move is permitted before wasting all 30 players' time with the information. I'm uninventing one of the wheels I reinvented last summer... multimethods. In traditional object-oriented programming, methods may be overloaded based on the caller. However, the action of an Artist quaffing red paint juice could be different than a Historian downing green paint. Rather than my nasty old event-reaction table, I've reverted to callbacks for the direct objects of actions. This simplifies things.

So, status update: I'm making great progress with my changes. I said a release by the weekend, which means I only have another day or so to rehaul code before I dig up the old Cygwin nonsense to get you Windows folks your executable. Wish me speed.

No comments:

Post a Comment