Holiday. Yay!
A lot of code thrashed at the moment. I realised that Settlements should have their own FSMs and message handling so they can respond to attacks, organise their settlers for different seasons, etc. So now armies can target and attack settlements and then recruit their settlers.
However, all this mindless code hacking has produced some unexpected results.
Well... that's not right. Alas, a lot of this sort of thing happens when you spend a morning just hacking away without scribbling ideas first down on paper. Trying to figure out why soldiers are following settlers even after they've been tagged as retreating. No doubt hidden somewhere between the states and the soldier's methods being called by said states. I'll find it.
On the plus side though, Captains now have a method "ConsiderOptions" in which they decide whether to find recruitable settlements, take on other Captains, take over enemy settlements (not currently implemented due to problem shown in video above), or just wander about. At the moment they only do this in the idle state. Ideally, a timer will allow polling of certain AI decisions so that they aren't run every cycle, but often enough to stop doing stupid things like chasing an army across the map that's getting bigger and bigger or heading to a village that's been emptied since the original decision to recruit it was made.
There's so much still to do...
- Implement Settler States (based on occupation)
- Add Inventory Items (boats, pikes, bows, swords, food)
- Add Inventory Handling (Agents, Captains and Settlements can all have items)
- Add Buildings (and makes them assignable to agents)
- SHEEP.
And that's even before putting the terrain back in, adding states for terrain edge collision detection, selection, sound, etc. etc. Oh well. It's still fun.
I'm also quite behind on my mail, so apologies to anyone that hasn't had a response yet.
Always good to see new videos. May I ask, how are you going to implement your actual villagers and soldiers from a visual perspective? Will they be sprites or 3D models?
ReplyDeleteIdeally, I'd like to use the MD2 format, as it'll be reasonably efficient, but the models will be small enough that it doesn't require heavy detailing. Also, it's easier to position and rotate them, and integrate them with the existing geometry pipeline and depth testing. Also gets around the wildly different resolutions people use.
ReplyDeleteKinda taps into the Intro posting where I wanted to flex a bit of Art and Music as well as programming.
ReplyDelete