Building buildings
Tuesday, February 28th, 2006

Players can now choose their race! (screenshot on left.) Race currently determines team affiliation, so this feature now allows human players to compete head-to-head. This was a simple feature to implement, once I figured out how. Race selection is done client-side, but must be passed server-side to take effect. As it turns out, Torque makes this easy by letting a client pass an arbitrary number of parameters to a server at connection time. So adding your own game-specific connection parameters is simple. However, figuring that out was not so simple. I spent a good bit of time browsing the source code before getting it.
The next screenshot shows the base status again, this time showing the correct resources and workers for the base. Something else new is that the base building is now casting a shadow on the terrain, though it’s a little hard to see. The status is currently positioned a little too low over the base; that needs some work.
The next three screenshots show base building. There’s now a green “base planning” marker, that follows the mouse pointer around to show when a player is planning a new base. Bases currently occupy four world tiles (2×2), and the marker aligns itself to the tiles to show exactly where the base will be constructed. Green means the current site is ok for building, red means it’s not. The 2nd screenshot shows a base as a worker is building it, and the 3rd shows the finished base next to the original base.
Also, that 3rd (two bases) screenshot shows the building multi-selection feature working. Yay! I’ve tested this feature a little, and it does seem to improve gameplay and reduce micromanagement nicely. You can issue production orders and change rally points, for multiple bases, with just a few clicks.
The next two screenshots show a red building marker over sites where you can’t build; over an existing building, and on a slope.
The last screenshot shows a couple of new game elements, walls and towers! I was originally thinking that bases would be the only type of building in the game, but walls and towers are just too much fun to leave out. What can I say? :-) I think defensive structures add a lot to a game. And since they’re basically optional to build, they shouldn’t put off casual players (who don’t like too many choices) too much. At least that’s the theory. I’m planning for these walls and towers to behave much as they do in the Age of Empires games. Although, I might also allow units to walk along the tops of walls, that wouldn’t be hard to do with my pathfinding algorithm. Each wall block and each tower occupies a single (1×1) world tile.



















