What should I hang my head in shame over the most? The awful joke? Or the fact that I swiped it from an ancient repeat of The Simpoes? Either way - we're expanding AI, and boy did we find a few silly errors from our original AI script from 2 years ago...
terrible title deserves a quick - badumtss - and whoever posted that on IRC has ruined my life as I now spend far too much time immaturely linking those stupid things ... I really need to get out more ...
Ignoring the fact that it's beyond the middle of May and I'm wondering where the hell my time is going - I'd like to blame it on my new regime of exercise and sobriety after recently feeling particularly lardy (technically that counts as multitasking for a man!) but I did spend today lounging in the sun, watching soccer and drinking beer ... that also counts as multitasking for a fella!
- we've picked up where we left off with our AI ... which was approximately blog2.
And boy did we find some rudimentary errors ... but spotting these sorts of things shows that we've not just learned how to incrementally rebuild our solution with VS. which we only got told about yesterday ...
Anyhoo ... after a quick clear up of previous script, I set about adding all of the variables I figured I'd need, and probably most importantly an "alertess" and "threat" system. AI can get pinned down under fire, and now decide to "bottle it" and fallback, and they can also become completely routed and flee in disarray if hard pressed by hostile gunfire. Currently "pinned" is a bit of an issue as they just stand still and turn away from the action because I've not been able to work out how the player move update (setPose function) can be used to affect AI ...
Alert deals with spotting and shooting, from bimbling around not paying attention --> being alerted to "this sh*t just got real" --> to long range sniping (don't waste bullets if you've not got a good chance of hitting them) --> close range full auto frightfests. This should ... aledgedly ... be about enough to allow me create variations on a theme with low tech stealth/evade missions where the player could slip quietly past the blind side of an AI, but standing in-front of a bimbling enemy whilst firing into the air and shouting "LEEROY!!!!!!!!!!!11!" would probably move the AI's alert status up somewhat ...
Apart from these obvious "biggies" of AI control I've also added a host of new fields to deal with various aspects of scripted gameplay, many of which I expect bear a striking similarity to "Call of Lawyers" which is the SinglePlayer game I heavily modded before deciding that rather than mod, I wanted to make one myself ... from scratch ... on my own (save for all the help I scrounge out the community and the resources!) so there's lots of pacifist, favetarget, fearless, spawncount, etc.
Also I've got my Ai utilizing the powers of whatever weapons they have - and that now includes grenade launchers. When I say "I" ... I of course mean I found a resource that someone else had post and thus beat me to finishing something which is on my "todo" list. Wasn't Todo that bald bloke who did the theme music to Karate Kid back in the '80s ... ???
RifleGrenades initially had the same issue listed in the available design docs for Killzone (link where?), that they were just too terrifyingly accurate when used by AI. Of course the proper thing to do for any 3A studio is to then pull the function as it mentions in the Killzone design doc (never played it, can't say how accurate the info in the doc is) --- but being a stupid guy on his own in his bedroom trying to make computer games ... I just made riflegrenades less accurate so the player doesn't get pwned every shot but they still get used by Ai - which is quite exciting when the ground shakes and smoke flies up and your not suddenly a disembodied, static camera inside a mausoleum with a Gui asking if you'd like to respawn or quit... which is what I've decide happens on player death.
I've got the functionality for that death sequence --- just need to model the mausoleum, with some nice stained glass windows and candle light ...
No pics this blog, but to prove stuff happened - vidya of 50 Ai using alert, threat and riflegrenades in action ... though it's probably kinda hard to tell what the hell is going on.
Also I redid how impulses affect players/Ai 'cos I thought it looked kinda silly if you shot a character in the foot and they leapt 10 feet upwards due to the projectile impulse. I prefer my players to get knocked backwards on the XY axis when hit ... which might be some sort of early fps nostalgia ...
[edit]
It just occurred to me that when an Ai is routed rather than retreating it would be a helpful visual clue if it did an animation, so I've knocked up a quick "flee" animation which plays on a setArmThread, so the Ai covers his head and sprints away from danger, going back into normal combat pose once they've calmed down a bit.
No comments:
Post a Comment