It looks as if I should be able to leverage the GPU for a little or a lot of the simulation requirements of the game, provided I can keep the graphics processing to a minimum. There are a lot of things the computer will need to do:
- track locations of N actors on a heightmap
- keep grouped actors marching together, preferably via local interactions similar to boids, and preferably with variable "discipline" governing regularity of formation (discipline 1.0 => perfectly aligned rectangles and (sometimes, when surrounded) circles, discipline 0.0 => random jumble)
- render heghtmap shadowed by visibility from PC, and preferably by sun's angle too.
- render actors visible to PC: different skin textures (corresponding to armour types), different weapons, different animations at different stages (or, even better, simple ragdoll)
- render actors reported by scouts, either in observed location or in assumed new position
- track locations and actors visible to scouts (and estimate sizes, directions of groups seen by scouts)
- track actor-actor visibility, with occlusion from heightmap, actors, and vegetation/buildings
- avoid actor-actor collisions
- simulate actor-actor combat (geometrically rather than numerically)
- simulate movement diffculty caused by and to large groups of pike wielders (particularly in forest)
- track orders for each actor or group
- propagate orders through shouting
- interpret orders and make independent decisions
- track skill use and increase speed and effectiveness of the relevant actions accordingly (latter part optional - can be done between battles)
- flexible actor size to accommodate horses, elephants, etc.
- find paths, considering difficulty moving uphill, potential difficulty moving through vegetation or water, positions of dense groups, enemy groups and groups in combat. In last scenario (and preferably others), walls will become relevant
- attempt to surround or flank enemies when possible
- change facing appropriately when [potentially] surrounded or flanked
- use sensible strategies for enemies - simulate a general if possible
- allow pausing, slowing down, speeding up.
- generate a variety of large, realistic heightmaps with vegetation and water, and render these efficiently enough to allow the largest possible number of actors on screen.
Anyway, the current state of the program is a heightmap render gutted and Frankensteined from http://blog.zylinski.se/?p=421, http://openglbook.com (which seems to be abandoned), and... I think that's it so far. Most of the surgery I had to apply comes from removing all references to the GLTools library (substituting GLM), and removing all references to freeglut (substituting SFML).
To continue, I think the next few steps will be:
- Get terrain LoD with tessellation shaders working.
- Get instanced actor drawing (with LoD) working.
- Figure out how to get a variety of textures and individual weapons and ragdolls (or at least animations) working on instanced actors.
- If I get bored during one of those stages, figure out how to do triplanar texture mapping on a tessellated heightmap (and hence kill the unpleasant texture stretching artefacts that are so common in RTSs)
- If I get really really frustrated trying to draw tens of thousands of instanced actors without killing framerate, figure out how to do those triplanar textures with Wang tiling (which is really cool)
As for titles, I still haven't got any better ideas than "Rogue City".