Monday, 12 August 2013

Monday A.I Time

The Week Of Artificial Ineptness

My schedule demands that my work begins on Reloaded AI, and it is this module I consider the most important part of the engine. I know it's a controversial statement but we're allowed our favorites!  We must take a rather basic blob and create logic around it so that a human player can be outwitted and beaten by said blob. No easy task I assure you!

We shall start with a rather inept creature, and work more cleverness into the clay to create a monster of hideous intellect and cunning. This is our mission.

However Lee

Alas before I can start my AI work with due diligence I have a final task to complete which pressed my attention into the universe of Asset LOD. I had almost forgot that I asked Mark to 'provide LOD with everything' and in order to make this manifest in the engine code is needed to make the models use the right level of LOD. 

Rather than code this in DBP (as the Character prototype used), I have decided to code it inside DBP itself so we get a faster form of LOD selection. A new command called SET OBJECT LOD will assign LOD levels and distances on a per object basis, but the selection of which model mesh to use will be done internally and automatically.

As I write this, I am mid-compile, half way through this work and once it is working with characters and the library assets I have so far, I will start my AI prototype.

The AI Prototype

I am strongly tempted to tack the AI work onto the physics demo as I already have the terrain and character capsules in place, but that might be a little vain of me. It is probably best I list out all the AI behaviors I am looking to recreate and get them working in a soul-less programmer art based demo that only shows the debug graphics I need to know the numbers are adding up.  Of course this means no Rick friendly screen shots or videos again, but I think it's probably the best course of action.

Developer Art Stopped Again

I've also been informed that my developer-art screenshots with the large red text makes Reloaded art looking even worse!  Rick has therefore imposed another ban on all artwork until we have a professionally produced 'developer-art-banner' to mask the in-progress shots.  

Down the road it seems likely that we will be taking this blog underground and deliberately separate it from any publicly discoverable PR material for Reloaded.  This way everyone gets what they want :)

The good news is that I got a new animation from Mark, so feast on the small amount of art I am officially allowed to show you.


This animation was added to the character set where the enemy can quickly kick open doors and start firing if they are in 'AI aggressive' mode.  It should make for some quick combat for the player me thinks :)

If anyone can tell me how to upload HD videos to YouTube, the comments section is your friend. There is no mention of HD in the basic or advanced settings, and no settings that I can see in the Upload page.

Signing Off

Plenty of work ahead of me in the next two weeks, which is my budget to completing the main parts of the AI system.  Granted other developers have a team of programmers and artists, and probably 6 months to perfect their AI entities, but a solo coder is able to make a few short-cuts in the decision making process and there is far less red tape.  It also helps that I have the infinitely powerful DarkAI and a top artist to help me!

15 comments:

  1. I upload in 1080 HD (look for MadLad Designs). I don't select any option on YouTube but I do record video in 1920 x 1080 HD, may be YouTube automatically detects it.

    ReplyDelete
  2. Just a suggestion. Could you be able to take many props from the original F.E.A.R's A.I. system? If you could, then I'd suggest you should since it is highly regarded to this very day as one of gaming's greatest A.I. systems. In fact, many A.I systems today still struggle with rivaling F.E.A.R's A.I. in my opinion.

    Here's a PDF document to give you a greatly detailed description of F.E.A.R's A.I. to get you started:

    http://web.media.mit.edu/~jorkin/gdc2006_orkin_jeff_fear.pdf

    ReplyDelete
  3. Lee, as long as the source videos are at least 1280px wide YouTube will create a 720p version automatically. If the videos are 1920px wide then they'll spit out a 720 and 1080 HD version, along with the 480 and lower.

    ReplyDelete
  4. AI :

    It was only yesterdays Blog I think someone said that one of their two favourite games was half life 2.

    I go back before that for one of mine Half Life 1. Because I well remember seeing the blank front of the Orange box with HL logo on it on the shelf in a game store. Whereas most game box covers had high quality action images covering the outside of the boxes so as to attract attention over the next rival Half Life relied upon being a clever and simple quality design of attention seeking colour and logo and more importantly being different. Indeed it was.....

    The back of the box at least I remember showed some Characters amongst other things and described how HL was the first Game to have Characters with which the player could interact.

    Revolutionary for its time - I purchased it immediately and enjoyed playing it immensely which would be obvious if one had never encountered such behaviours previously in a Computer Game.

    FEARS AI

    I have read the paper referred to above and every word of it and quote -
    It was rewarding to see that the A.I. was well received when F.E.A.R. shipped. Many people commented that the soldier A.I. reminded them of the marines in Half Life 1. Half Life shipped in 1998, and F.E.A.R. shipped in 2005. It seems that we haven’t made much progress in seven years; and what’s worse is that people seem happy about this! There has to be more we can do with game A.I. - quote.

    As can be seen its a long time since Half Life AI was shipped.

    The FEAR paper describes very well in an easy to understand way what we might think of as describing seemingly quite intelligent AI Decision Making and Behaviours perhaps where such modern games require it is to be expected.

    It would be something akin to a revolutionary Half Life 1 scenario for "small" indie developer if Reloaded AI was that smart.

    I fear again excuse these puns which keep creeping in that achieving such is a big undertaking and though perhaps would be ideal to see may not be possible even with a great deal of investment in time and resources. I don't know you will have to wait for a response from Lee. Overall such would it seems to me would be many months of work but I may well be wrong and probably am.

    Personally Half Life 1 AI would probably do me and again anything more all well and good and welcome. That may be well hard enough to achieve. As said in the fear paper and mentioned here previously - something in keeping with and in balance with the Reloaded engine quality in general.

    AI is, as Lee has said the No1 feature on which Reloaded success can be built so it seems to make sense to make it the priority and give it any amount of attention it deserves. No more can be asked.

    And to quote HL1 :

    "Catch You Later, Buy you a Beer".

    :-)

    ReplyDelete
  5. As to the screen shots ban - whatever - no one (other than TGC themselves) reading this now or later will care either way at the end of the day - viewers clearly rather screen shots - any screen shots - Reloaded will get more attention with them than without them whether or not TGC likes them. Its the viewers that matter now and ongoing.

    When the engine comes out is when Reloaded will really be affected by what viewers think as they will buy or not depending on how the engine performs and is received by the wider world and despite any and all promotional marketing. The engine itself will live or die on its ability to deliver what those viewers want and need.

    Unless of course it gets some HL treatment and viewers thumbs up in the mean time perhaps

    :-)

    ReplyDelete
  6. Will these new AI features be commands for us to use in FPI?

    ReplyDelete
  7. Could DBPro's assembly output be optimized to improve overall performance? See this thread:

    http://forum.thegamecreators.com/?m=forum_view&t=206807&b=1&msg=2472734#m2472734

    ReplyDelete
  8. The basic problem with entirely scripting the AI through FPI is that very few users want to code at that level. My approach will be to use sliders to control the nuance of AI behaviors. We will still have some FPI interaction where required, but the meat of the AI expert system will be pre-defined (i.e. figuring out how to climb ladders, opening doors, hiding, running, e.t.c.). I will also be looking at the existing DarkAI FPI language to see if it can contribute to the new system as well.

    I agree the DBP assembly is a little 'verbose' compared to established compilers, and there is definitely room for improvement, but no time to do it in (right now). Reloaded gets speed increases by moving DBP sided code over to a DBP plugin thus getting the best performance for that case scenario. Couple that with some multicore code, and we should be okay on the speed front. Once the essential features of Reloaded are in place, I think optimizing the DBP assembly might be a nice cheap way to get a performance boost down the line without any major re-coding of the engine.

    ReplyDelete
  9. slider control for ai...hmm

    so that would mean, one could change the beahviour of a character
    and adjust it to what they want it to be/ to act

    for example i would imagine a system like:
    main behaviours
    - interaction - tickable on/off
    for enviroment/ doors/ elevators/ windows
    - aggression level
    shoot at sight/ take collateral damage in account (means shoots at civilians) and so on...

    special Ai Type - behaviours
    - control guard behaviour
    follows a predefined path

    - pasiv civilian hebaviour - wander around/ get cover/ run away
    - aktiv civilian behaviour - wander around/ alert guards/ run away

    - shadow behaviour
    sneeks around in shadows/ takes spots - changes after a couple of minutes or if detected/

    ... well that would be just a handfull
    and if it woudl be broken down to a main and semi behaviour system
    we could mix up pretty fast some interesting complex
    behaviours @ fly

    ReplyDelete
  10. Hi Lee
    Please excercise caution here. You are starting to work to deadlines now which we all agreed is not the right approach. Nobody (including the pledgers) wants to see Reloaded rushed out the door and you should not even consider a release until Xmas.

    I tend to agree with the reloaded AI approach but the only drawback with that is the system will not be expandable and will only really work for the type of enemy that ships with the game.

    Hooray for the almighty blob

    ReplyDelete
  11. These are not deadlines which describe a fixed amount of time per feature, simply to keep the development moving in a productive and accountable way. Otherwise you won't see anything playable until Christmas 2015!! I think 90% of users would prefer an easy to tailor AI system using sliders than a fully modifiable system requiring code and scripting :) I am sure everyone wants both, but we have to start somewhere ;) I read the FEAR AI paper, and a very good approach! Best suited to a larger team where designers are not also the game coder who are not also the engine writer, e.t.c. Writing an AI system based on modular databases would take 'considerably' longer to write to achieve the exact same result, so I think it makes sense to create an AI we like today, and then expand into areas such as 'expansiveness' and 'total customisabiliy' once the majority necessities are dealt with. No sense having expansive bespoke AI system if the underlying behaviors are awful ;)

    ReplyDelete
  12. You cant tell TGC what they can and cant do. Commercial reality dictates that.

    Of course there are deadlines - there are always are and some kind of compromise is "Always" necessary. Its not possible to avoid that.

    You cant have everything you want and can imagine in your own mind just because you want it.

    I don't believe TGC have agreed to any policy others than those they make and as Lee has said nothing is promised or set in stone.

    As he has just replied the reality is that when it comes to some or many things - you just cant have them even in Reloaded whether or not you personally think its essential of the best thing since you were born - its not going to happen - Sorry and all that but thats just common sense and the real world and you will have to live with it as has always been the case.

    Reloaded is no different - a much better engine it will be but it will never be what everyone wants - some are going to be dissapointed if that's expected.

    ReplyDelete
  13. Speaking from an assets development point of view:

    I have many unreleased new models intended for reloaded that aren't your typical models. They have many unique behaviors based on a variety of compounded FPI commands. Animals of all kinds as well.

    For an example I made little dinosaurs that when one is injured they rush to investigate (using some darkai). When a loud noise goes off they avoid the area of sound then rush for cover. However they only melee attack you based on how long you stand next to them and also based on a randomizer on top of that.

    Will old FPI scripts work in FPSC-R?

    ReplyDelete
    Replies
    1. I must add that I do like the idea of slider controlled AI for human characters. That would make it much easier for everyone in the editor; rather than going through which FPI script to use.

      Delete
  14. You could simply use the old FPI system to control animals and dump-AI entities. DarkAI is the preserve of the wicked intellect ;)

    ReplyDelete