I did a small favor for a fellow indie, and he in turn made some new 3-D models for OVM! OVM now sports a UFO model to serve as the Martians’ base, and a laser rifle for Martian crewmen to hold.




I felt the placeholder art I originally had for those two items really detracted from the game’s look, even as placeholders. What a nice improvement. Thanks Thak!
If you’re interested in more of Thak’s work, check out 3dmatter.com or spellcraft.biz. He works fast - he turned out those two models in no time flat.
Progress
These last few weeks I:
- finished the A.I. personal-view-of-the-world feature
- started to separate OVM’s pathfinding code into a stand-alone library
- added new features to meta-C (my homegrown programming language, which OVM is written in)
- optimized meta-C for speed
I kind of spread myself too thin these last weeks, trying to do all those things simultaneously, and several of them didn’t go as planned. Still, I got some progress done.
A.I. personal view of the world
This is done! The A.I. now makes all important decisions based on a limited, imperfect view of the world. No cheating anymore!
This is a huge milestone, and it’s been a long time coming. I remember putting this feature on my to-do list well over a year ago. At the time I thought to myself, that’s pretty ambitious, I don’t know if I’ll get that feature in. So, I’m definitely happy that it’s actually in!
I still need to do the follow-up work of increasing the A.I.’s exploration ability; without that, as predicted, the A.I. is behaving dumb as dirt.
Pathfinding library
I started pulling out OVM’s pathfinding code for packaging as a sellable product.
Here’s what the main API currently looks like:
F32 findPath(
Point2F bgnPoint,
RectF endRect,
IMap* map,
Vector<Point2F>* path,
ICoster* coster = NULL,
F32 range = 0,
F32 maxCost = FLT_MAX
);
It’s simply a global function that outputs a vector of way points. Maybe I’ll describe the parameters in a later post. I’m still figuring out how to make the API as user-friendly and flexible as possible, by using C++ templates, etc. Naturally, it’ll also need a friendly TorqueScript interface, too.
There will also be some utility functions and data structures, for things like iterating over the tiles crossed by a ray (useful for smoothing out the final path).
One good thing is, I’ve taken a look at some other free pathfinding packages, and it looks like OVM’s pathfinding does indeed provide features beyond what’s already out there. Got to provide value, to sell a product.
Next up: Squads
I’ve started working on giving OVM a notion of sqauds, i.e. groupings of units.
The more I think about squads, the more issues I see them impacting in the game. For example:
- making units march in formation
- reducing the number of calls to pathfinding (and hence reducing CPU demand), via squad flocking
- reducing network traffic, via squad flocking
- allowing the A.I. to temporarily subdivide a force to deal with attacks from multiple directions, via a hierarchy of squads (i.e., squads of squads), and then bring those forces back together to resume the squad’s original mission
- helping the AI manage multiple units sent to do a single job, e.g. when multiple workers go to build a new base
- allowing units to auto-explore in two’s or three’s, in addition to individually
I thought that was kind of interesting. Originally, I thought of squads as mainly relating to marching in formation. But they seem to touch quite a few other areas, at least from a programming perspective.