Singleplayer

Discussion in 'Feedback' started by Private Sandbag, Nov 30, 2006.

  1. Private Sandbag

    Private Sandbag Member

    Messages:
    7,491
    Likes Received:
    0
    Trophy Points:
    0
    oh-my-gosh-it's-yet-another-person-trying-to-implement-singleplayer-into-a-multiplayer-mod!

    but that was my idea. I was thinking back to the idea of bots, which i was really really against in multiplayer. but in singleplayer it could be quite fun. What you need:

    Bots that don't run into walls.

    bots group themselves into squads

    the player can access the command screen at any time, while being a soldier

    and then the CV is remote controlled

    bots can be given orders that they then follow out, such as "build this"

    bots have "sight" and "hearing", so they only shoot what they can see and hear

    bots use vehicles.


    cool!
     
  2. DonMegel

    DonMegel Member

    Messages:
    1,368
    Likes Received:
    0
    Trophy Points:
    0
    all that you say really isnt that hard, the difficult part would be programming the enemy commander to use tactics and RTS stratagies.
     
  3. Private Sandbag

    Private Sandbag Member

    Messages:
    7,491
    Likes Received:
    0
    Trophy Points:
    0
    If you programmed say, 5 strategies into each map, and then told the commander also what to do if ever there was a special situation, such as it finds a forward base, then i think it would work pretty well. right?
     
  4. arklansman

    arklansman Member

    Messages:
    5,365
    Likes Received:
    0
    Trophy Points:
    0
    I want blimbs.
     
  5. Awrethien

    Awrethien Member

    Messages:
    749
    Likes Received:
    0
    Trophy Points:
    0
    If you what some easy but effective RTS scripting maybe you could take a peek at how the AI works for the Command and Conquer games. Its exteamly easy to learn, code for, and expand new things into it. But adapting it to the souse engine may be tricky. If any one wants an example of how it works I can post a few exampls of how it works.

    Id think it would be played as the comm giving orders to units, but you have the option to jump out into a tank to wreck some havok.:D Hey be a good way to practiace as a comm...
     
    Last edited: Nov 30, 2006
  6. Shinzon

    Shinzon Member

    Messages:
    3,610
    Likes Received:
    0
    Trophy Points:
    0
    Err.... Good luck on programing AI; that advanced; something as easy sounding as that; is a total pain in the arse to code....

    Im currently trying to make a pathfinding algorhythm, and so far what I made is is a buggy stupid thing that wants to find a path to the lower right corner O.o;; (It doesnt matter where you tell it to move; it will still try and find a path to the lower right corner.)
     
  7. Private Sandbag

    Private Sandbag Member

    Messages:
    7,491
    Likes Received:
    0
    Trophy Points:
    0
    haha, good luck
     
  8. Cyber(Gunner_Yeyz)

    Cyber(Gunner_Yeyz) Member

    Messages:
    720
    Likes Received:
    0
    Trophy Points:
    0
    Really?
    It could work if... hell the best you would ever get by AI with your current mod staff is bare bones noob.
    You will need a real game staff to get this to work.
     
  9. Krenzo

    Krenzo Administrator

    Messages:
    3,771
    Likes Received:
    0
    Trophy Points:
    0
    I'll get around to doing the AI eventually. It has to be written from scratch to deal with large open environments where node points don't define the only place to go but rather the boundary for where to go. Once that's done, single player should be easy.
     
  10. Dafleck

    Dafleck Member

    Messages:
    108
    Likes Received:
    0
    Trophy Points:
    0
    http://en.wikipedia.org/wiki/A-star_search_algorithm

    Depending on what you're working with, this might be the sort of thing you want to go for.
     
  11. Shinzon

    Shinzon Member

    Messages:
    3,610
    Likes Received:
    0
    Trophy Points:
    0
    A* is really good on small maps, ( and that uses arrays, for cells ) but when going into 3d, A* starts to be worse ( The default algorhytm ) so you will need to heavily modify it; and then comes in the whole thing with tanks, and pathfinding through objects that havent been placed during map compile ( The buildings and tanks )

    Im getting a headache just thinking about it >.<
     
  12. Krenzo

    Krenzo Administrator

    Messages:
    3,771
    Likes Received:
    0
    Trophy Points:
    0
    Path finding in 3d games is all about creating a graph with nodes representing major points of interest and connecting the nodes together. The AI determines where the bot needs to go and finds the closest node to it. It also finds the node closest to the point it wants to go. It then searches through all the nodes to attempt to find the best path from the start node to the end node. All of that extra stuff you want to add to make AI better is just going to slow things down and not be worth it based on impression/impact to the player vs cpu time used.
     
  13. Shinzon

    Shinzon Member

    Messages:
    3,610
    Likes Received:
    0
    Trophy Points:
    0
    Then woulndn't the nodes have to be precompiled into all of the maps? or atleast a 3rd party thing that writes all of into a file for the program to use for refrence?

    As for the sight and sound ( True sight and sound for the AI ) maybe one day... when a quad core is considered slow :p
     
  14. Awrethien

    Awrethien Member

    Messages:
    749
    Likes Received:
    0
    Trophy Points:
    0
    Well if the maps where made with nodes, and dumb AI pathfinding in mind it wont be a problem. I admit when I posted earlier I was thinking of taskforce scriping. I can see the scripting for each individual unit being a bitch...:(
     
  15. Private Sandbag

    Private Sandbag Member

    Messages:
    7,491
    Likes Received:
    0
    Trophy Points:
    0
    sight and sound is easy.

    each action creates a sound (for basics, you can just do shooting and running, where the others are silent).

    an bot is drawn to loud noises.

    then sight is that each bot gets a cone of vision, and he does turn his head and search around... and then if something comes into his cone of vision, he acts accordingly.

    should work fine :)
     
  16. Shinzon

    Shinzon Member

    Messages:
    3,610
    Likes Received:
    0
    Trophy Points:
    0
    Again, what you are saying is complicated as hell; how are you going to calculate what the bots sees? It will have to fire some sort of tracers in a certain area...

    What about Alpha channeled grass? Since it has no "Physics collision" the bot would fire through it much like the current turret... except that you can "Sneak Behind" it...

    For sound; thats even more complicated, In real life sound bends around obsitcles... What if there is a field of a 10000 turrets all humming? how will it calculate anything? and thats just for 1 one of them... most of the times all of theese things are done in a cheap way; a computer can "Hear" if anything at all in a certain radius; can see 360 around themselves (Much like the turrets)


    Though singleplayer would be really nice... :D
     
  17. Cyber(Gunner_Yeyz)

    Cyber(Gunner_Yeyz) Member

    Messages:
    720
    Likes Received:
    0
    Trophy Points:
    0
    Also how would you get the AI to work for maps?
    As a mapper I can barely do anything nice without massive time being used, and just how hard would it be to set up?
    Most maps would be imposable for single player after the fact maps complexity and if the mapper wants to spend the time.
     
  18. Awrethien

    Awrethien Member

    Messages:
    749
    Likes Received:
    0
    Trophy Points:
    0
    Well doesnt HL2 SP already have the sight and sound already in it? Why cant you borrow from that and have the infantry only shoot up to a sertian range. If it is farther out than what is determined for its weapon, and on no other order, run to the enemy to get in range...

    As for the maps I agree. The only map I can think of that would be easy to set for SP would be CrossRoads.
     
  19. Private Sandbag

    Private Sandbag Member

    Messages:
    7,491
    Likes Received:
    0
    Trophy Points:
    0
    I can imagine Mvalley being a bit of a nightmare to be honest. possible, but a nightmare. I can just imagine the enemy com placing his VF leading strait into the river, and endless bots running into walls.
     
  20. Bademeister

    Bademeister Member

    Messages:
    48
    Likes Received:
    0
    Trophy Points:
    0
    I think having Bots that aren't able to do more than building the buildings you place and fight as infantry would be a fine start, you don't need more to have fun building your base and killling people. If people want to have better opponents online should be the place to go, as writing an AI that can control every part of such a complex game would take lots of resources.
     

Share This Page