NPCs

Discussion in 'Coding' started by harryhoot1, Feb 2, 2010.

  1. flasche

    flasche Member Staff Member Moderator

    Messages:
    13,299
    Likes Received:
    168
    Trophy Points:
    0
    i disagree ... there are complex decisions for commanders too. the point is that our brain is "wired" in a way it appears easy for us - if you try to translate in mathematics it gets "a tad" more complicated.

    a good example would be to catch a ball ;)
     
  2. blizzerd

    blizzerd Member

    Messages:
    10,552
    Likes Received:
    60
    Trophy Points:
    0
    disagree, a bot does not have to be the best commander, just a stand in commander giving the rest of the team a chance

    knowing how to program and how this would be done its easier to code a bot for commander then for an infantry or tank
     
  3. flasche

    flasche Member Staff Member Moderator

    Messages:
    13,299
    Likes Received:
    168
    Trophy Points:
    0
    im not sure for infantry since there should already be rudimentray functions for that comming with the source engine. but then, i have no clue about the source api, so you could be right too.
     
  4. alucard13mmfmj

    alucard13mmfmj Member

    Messages:
    2,170
    Likes Received:
    0
    Trophy Points:
    0
    can we have custom anime girl models for the NPC? thatll be awesome.. i think empires needs a female model for infantry or for the NPC at least =3..

    "ehllo sah, waht keinda dank youz want?"
     
  5. ScardyBob

    ScardyBob Member

    Messages:
    3,457
    Likes Received:
    30
    Trophy Points:
    0
    Research would be easy (just program several research paths and have him randomly select one each round). The hard part would be building placement. I think you would have to create a nav-like file that presets the best areas for bases, barracks, repairpads, etc. Then have some sort of check like "Is engineer in barracks grid 1?", if yes, and have the res, drop a barracks.

    Also, there might need to be some commands for when the base your comm is in gets destroyed. Something like 'if nearest barracks is destroyed, drive to next nearest barracks'. The problem is that if you don't do this right, then the bot commander may be worse than no commander.
     
  6. ViroMan

    ViroMan Black Hole (*sniff*) Bully

    Messages:
    8,382
    Likes Received:
    4
    Trophy Points:
    0
    you don't realy have to do that. You can do the same thing NS did and have it auto create a nav maps for each map by watching coms. It learns building placement patterns by watching where coms usually place things and will do so itself. Granted in NS they place things in the weirdest places sometimes but, it usually works out for them in the long run.
     
  7. blizzerd

    blizzerd Member

    Messages:
    10,552
    Likes Received:
    60
    Trophy Points:
    0
    this, just logging every move comms make and the succes chances they get from it could make you generate a proper build order

    making it drive away when main is under attach though falls under tank AI, and will be very very hard, if this would bedone id say make it so if a player hops in the cv while a bot is in effect, the bot is paused and the player gets free access
     
  8. Zack wester

    Zack wester Member

    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    0
    That is something I can see working now just to code the learn what we do and follow.
    that is how an person do in Real life sadly the AI is not that good at learning.
    becous the AI can only do an complete copy of what we did.
    human can alter them enough to work for the situation the AI canĀ“t (can maybe but that is usaly luck or poorly)
     
  9. flasche

    flasche Member Staff Member Moderator

    Messages:
    13,299
    Likes Received:
    168
    Trophy Points:
    0
    oh now we create those incredibly easy to code learning AIs ...
     
  10. blizzerd

    blizzerd Member

    Messages:
    10,552
    Likes Received:
    60
    Trophy Points:
    0
    oh i thought this was the time to bitch about everything while doing nothing flashe

    if you want i could write a pseudo code basic AI for empmod commanding... wont be more then 3 pages of work could do it in an hour

    sure converting it into c++ may turn it into 5 pages of code, plus all the pulls have to be coded and attached, but all in all its not as big as the gui overhaul
     
  11. flasche

    flasche Member Staff Member Moderator

    Messages:
    13,299
    Likes Received:
    168
    Trophy Points:
    0
    im pro at that :D

    why you seem offended personally i dont get though.
     
  12. harryhoot1

    harryhoot1 Member

    Messages:
    663
    Likes Received:
    0
    Trophy Points:
    0
    When I made this thread, I was talking about monsters like antlions and combine...

    Is it hard to just bring back npc code?
    Commander clicks and squad leader move orders can be used as info nodes.
     
  13. recon

    recon SM Support Dev

    Messages:
    2,348
    Likes Received:
    0
    Trophy Points:
    0
    You have no idea how many thousands of lines of code you just described.
     
  14. Empty

    Empty Member

    Messages:
    14,912
    Likes Received:
    11
    Trophy Points:
    0
    NPC code doesn't even ship with the MP SDK Base.
    You have to literally add all of the NPC code (which has no netcode added to it since it's all SP) and then mount all the npc assets and it's just horrible.
     
  15. alucard13mmfmj

    alucard13mmfmj Member

    Messages:
    2,170
    Likes Received:
    0
    Trophy Points:
    0
    that sounds like too much of a hassle than its worth =(.. guess we are stuck with what we have atm.
     
  16. harryhoot1

    harryhoot1 Member

    Messages:
    663
    Likes Received:
    0
    Trophy Points:
    0
    could we maybe get the guys from the half life 2 wars mod to help out?
     
  17. ScardyBob

    ScardyBob Member

    Messages:
    3,457
    Likes Received:
    30
    Trophy Points:
    0
    Then we could merge the mod and call it 'Empires Life 2: Wars'!
     
  18. blizzerd

    blizzerd Member

    Messages:
    10,552
    Likes Received:
    60
    Trophy Points:
    0
    incidentally i know the guy that is lead dev there personally, but hes a self centered asshole in that respect so i doubt hed help anyone
     
  19. recon

    recon SM Support Dev

    Messages:
    2,348
    Likes Received:
    0
    Trophy Points:
    0
    Most of us are?
     
  20. MOOtant

    MOOtant Member

    Messages:
    4,047
    Likes Received:
    0
    Trophy Points:
    0
    We don't even have NavMesh working for Empires. It'd generate for hours and use gigabytes of memory in game using current generator.
     

Share This Page