Thứ Tư, 14 tháng 8, 2013

Wednesday More AI Cleverness

The Growth of AI

Amazing to watch a brand new AI behavior grow and unfold, it really is. Like watching a baby grow up super super fast, with the bonus of being able to program out all the annoying crying :)  I think I prefer computer babies!

The AI Story So Far

The AI prototype now as a few more cool features like the ability to open and close off doors and windows in real-time, forcing the AI path finders to choose another route. Very important!

Aside from the many small features, the one that has kept me up to almost 3AM (against my decision to stop at 12 midnight) was the container path system. It turns out DarkAI has a rudimentary container connection system but it requires a few more bells and whistles before it can compete with what I have been building in DBP code.

Right now, my AI entity can start on the terrain circling a building on patrol, spot me, then chase me into a room and up some stairs, I can dive through the window but he does not have 'leap' yet so I lose him, but he can still see me through the window. The AI entity realizing he cannot reach me that way, recalculates and figures out a slightly longer route to the ledge I am now standing on. It appears a second ladder drops from the roof of the building to this ledge, and there is a ground floor ladder which reaches the roof. Off the AI entity trots, back down the stairs, and by now it's been a long while since he saw me escape, which means I could be somewhere other than the ledge, so to keep me on my toes he reverts to a Patrol mode, walks out the door and continues his route. One point in his patrol route allows him to spot me still standing on the ledge platform.

Now here comes the smart bit. The AI entity was instructed to 'remember' that the stairs inside the building to the window and the ledge did not work out too well 'a failure' in fact. He then thinks about another route that does not include the staircase that lead to failure (at the moment this is all he is programmed to remember). He then plots the alternative route, up the long ladder across the roof and down the shorter ladder to the ledge, which he does right away. On descending the second ladder, I am once again in his line of sight and he registers to fire.

All the above currently works in the AI system and with the addition of more containers, more paths, more obstacles and more enemies and allies, the complexity only increases to present a very dynamic combat area to navigate. Naturally there will be tweaks on the way, but the bulk of the 'path finding' is in place and I am happy with the behavior exhibited.

Character Animation

At present, all the above AI described is using debug models and artwork, ideal for testing behaviors and values, e.t.c.  I do feel though that leaving the character model out for too long will create problems come the 'union' of AI entities which move in a cludgy manner and the high quality character art that needs to walk, run, dodge and climb in a smooth liquid performance.

These two elements can remain separate but there are key hooks in both that need to be coded carefully. I am tempted to start this work before the week is out, probably while I am waiting for AI inspiration.  This is when the general public will see the AI prototype and in one voice go 'Oooooo'.

Signing Off

I am keeping today's blog short as it's 3AM and I was supposed to be resetting my body clock for the weekend - Grr.  Still, I quite enjoyed the AI tinkering and look forward to the next steps on Thursday.  The census is that my art skills are painful at best, so I am inviting a regular reader with a panache for art to produce for me a banner which I can slap on pre-release screenshots that read the slogan "Disclaimer: Visuals/gameplay/sounds are not representative of final product".  With this, I can start posting visuals again ;)

Không có nhận xét nào:

Đăng nhận xét