Exploring the AI of Command & Conquer | AI and Games #53

Поделиться
HTML-код
  • Опубликовано: 21 ноя 2024

Комментарии •

  • @AIandGames
    @AIandGames  4 года назад +84

    Revisiting Command & Conquer - a game I played in high school - was a lot of fun. Still working my way through both campaigns now that the video is finished. The game has already received a lot of love in the Steam workshop community with mods to change various parts of the game and hopefully, that will continue. One interesting thing - that you might have spotted in the video - is that in the skirmish matches where I removed the fog, I don't appear to be playing. Actually, I'm in those matches as a GDI faction, but I wanted to test a theory. In the video, I mention that the House AI only considers another player as a potential threat once they've built the basics of their base. So yeah, I figured out if I just leave my mobile construction yard vehicle idle and refuse to unpack it, the AI House's will ignore me. That said, I don't recommend unpacking it 20 minutes into the match, that didn't go well...

    • @MattSipka
      @MattSipka 4 года назад +8

      I love the RTS genre. I always wanted to see one with a more dynamic soundtrack. Some rts games do but only between quiet ambience and intense battle music. (One infantryman fires his rifle at a building and it triggers a huge epic orchestra) I want to see a RTS where each faction has a unique theme and each unit type built adds to the overall track. (Infantry are percussion instruments) units that are best for that faction have more attention and prominence to their sound. Say a slow guitar riff vs. a wailing guitar solo.

    • @SkyFly19853
      @SkyFly19853 4 года назад +2

      I really thank you for talking about this game and its A.I...

    • @mcmikecreations
      @mcmikecreations 4 года назад

      It would be great if you could take a look at AI of Caribbean Crisis. I remember it being unexpectedly clever in some situations

    • @danielpayne1597
      @danielpayne1597 4 года назад

      Awesome vid, but where's the section dedicated specifically to how stupid the harvesters are :P

    • @netcrashYT
      @netcrashYT 2 года назад

      @@MattSipka isn’t Total Annihilation and it’s sequel Planetary Annihilation a bit better in that direction?

  • @deutschbagnl
    @deutschbagnl 4 года назад +213

    The dog transforming into a projectile was something I stumbled into when playing with the Rules.ini for the original Red Alert as a teenager. I tried to give the dogs the V2 rocket launcher's weapon class (I believe it was called a scud in the code, but I don't remember for sure), only for the dog to transform into the rocket projectile while attacking, explode on impact, and become a dog again.

    • @DeyBawnes
      @DeyBawnes 4 года назад +24

      dog goes brrrrrrr

    • @TyrannisUmbra
      @TyrannisUmbra 4 года назад +7

      The dog bullet thing is something that I knew anecdotally from experience playing, but also I can't help but think in the back of my mind that I've seen a dog get killed while it's in 'bullet mode', so I'm unsure if it actually 'stops existing' for the duration, or if the projectile is still targetable.

    • @tarrker
      @tarrker 4 года назад +3

      YES! I vaguely remember stumbling onto the same thing during my trips through the rules.ini file. If I recall I was trying to make a more sci-fi style game and I wanted to use the dogs as some sort of mechanized infantry.

    • @tarrker
      @tarrker 4 года назад +6

      @@TyrannisUmbra it's a bit of both. Projectiles, by default, are invalid targets for attacks. But it's just a true/false indicator. So you could, potentially, have missile or rockets that are able to be shot down. Cool idea but, in practice, ruins the viability of those types of units.

    • @TyrannisUmbra
      @TyrannisUmbra 4 года назад +3

      @@tarrker okay, that explains it then. Thanks!

  • @Doctrina_Stabilitas
    @Doctrina_Stabilitas 4 года назад +141

    "house" designating GDI/NOD is a carryover from Dune in which factions are different houses

    • @xantishayde-walker4593
      @xantishayde-walker4593 4 года назад +5

      Nice! I never thought of that. Almost forgot about Dune.

    • @eternialogic
      @eternialogic 4 года назад

      I was pretty confused. Would've assumed that those files would be called FACTION.h or something like that.

    • @xantishayde-walker4593
      @xantishayde-walker4593 4 года назад +2

      @@eternialogic They would have the proper C++ naming convention such as FACTION.h or .cpp. What we were talking about was *inside* the files, they are called House.

    • @yuriythebest
      @yuriythebest 4 года назад

      yess! was about to mention this.

  • @ThePrimeboy1
    @ThePrimeboy1 4 года назад +88

    Bullet Dog always makes me smile, honestly the best part of RA1

    • @njiska
      @njiska 4 года назад +9

      I loved editing the unit to have a flamethrower weapon. Dog Fireballs! A classic of traditional RA.

    • @ThePrimeboy1
      @ThePrimeboy1 4 года назад +2

      @@njiska oh god, what if, flamethrower, but it shoots dog... I need to do this now

    • @ashkuigp
      @ashkuigp 4 года назад +1

      Invincibility frames!

    • @spankeyfish
      @spankeyfish 4 года назад +9

      @@njiska I tried to make a werewolf by arming a grunt with the dog weapon, thinking that it would transform into the attacking dog when attacking. What I got was a grunt who launched dogs at the enemy...

    • @pinkyclown
      @pinkyclown 4 года назад +7

      @@spankeyfish THIS. Me and my brother made Tanya have tesla coil and Dog bite and she wold rapid fire dogs at infantry.

  • @dan2124
    @dan2124 4 года назад +126

    The fact the factions are refered to as House_good/bad makes me wonder how much of the code from Dune II was dragged over originally and used as a base since in that factions are Houses (House Harkonen, House Atreides...etc)

    • @jordananderson2728
      @jordananderson2728 4 года назад +5

      If it works and makes sense...

    • @RedShocktrooperRST
      @RedShocktrooperRST 4 года назад +5

      @Brennan Lu Given the relative relation of one game to the next, I wouldn't be surprised if houses were used as late as the unspoken fourth. Supposedly burried deep in even Red Alert 3's code, there are still components of Tiberian Dawn, meaning at least theoretically as late as Red Alert 3 (and likely also C&C4, since that uses RA3's engine) they are still called "houses".

    • @Gokotti
      @Gokotti 4 года назад +8

      I thought they we're called houses, because Westwood Studios were in Las Vegas. And the house always wins.

    • @KaiserMattTygore927
      @KaiserMattTygore927 4 года назад +11

      StarCraft 1 also does this in a way, where primary structures are still referred to as "Town Halls" like in WC.
      Its just what the coders are used to for these games I guess.

    • @RedShocktrooperRST
      @RedShocktrooperRST 4 года назад +7

      @@KaiserMattTygore927 It makes sense to me. THe underlying mechanics didn't change much from Warcraft to Starcraft as far as the engine is concerned - the Engine doesn't care if it's orcs or aliens, or if its Harkonnen or Nod. And almost certainly easier than changing the nomenclature from "house" to "faction" or from "town hall" to something else.

  • @kipkay2000
    @kipkay2000 4 года назад +62

    God, the nostalgia hit hard just from hells march at the start of the video

    • @AIandGames
      @AIandGames  4 года назад +15

      I sat and listened to the entire soundtrack to find the all-important opening track. And nothing came close to Hell March.

  • @sinkler123
    @sinkler123 4 года назад +1

    what a great video, both educational and entertaining. Kudos!

  • @white-dragon4424
    @white-dragon4424 4 года назад +9

    The thing I remember most about the first C&C on the PC, was that it had a bug that stopped the enemy forces from firing on any barrier you construct, even sandbags. If you managed to block all approaches to your base before he could send an attack, the enemy would just build up behind the wall you constructed. This gave you all the time you need to build a gigantic army to fire on him from behind the barrier, then to move onto his base.

  • @tomseiple3280
    @tomseiple3280 4 года назад +8

    Hobbiest coder, and big time RTS gamer: this was a great watch! This sort of demystifies the notion of how a game comes together - I work in analytics and spend most of my time in SQL and Tableau, so my code chops are minimal compared to the average developer. I really appreciate the approach to discussing the code as well - the code base used seems, shockingly, well organized and thought out. I'm impressed with how organized Westwood and Petroglyph were with their objects and structure!

  • @NaumRusomarov
    @NaumRusomarov 4 года назад +4

    fun fact: pathfinding, mathematically speaking, is super simple and interesting at least for single units. it becomes a problem when you have large maps, significant number of units and terrain that can change from one time step to another. Nowadays, this is not really a problem, we've got enough individually fast cores to compute the solution on time, but in the past this was not simple at all. Hence, the somewhat barebones pathfinding in old games. It really is a fascinating problem.

  • @CMDRSweeper
    @CMDRSweeper 4 года назад +17

    The dog thing / bullet was easily known for those of us that modded units back in the day.
    You could arm infantry with the weapon (Dog) and then they would fire dogs out of their assault rifles for an example.

    • @ew3612
      @ew3612 4 года назад +3

      CMDR Sweeper I remember playing several mods like that. I think the map was purple nurple but it was such a long time ago...

  • @Poodlestroop
    @Poodlestroop 4 года назад +8

    The last time I was this early, Nikoomba was still causing the Brotherhood much grief. Great to see this channel talking about one of my favourite game series!

  • @mickeymarian5386
    @mickeymarian5386 4 года назад +34

    Dude this is so awesome i honestly didn't know the source was available! Thank you so much for putting these videos together! Your channel is great videos like this are super helpful to me!

    • @AIandGames
      @AIandGames  4 года назад +5

      Great, I hope it proves to be useful.

  • @c0mmanderKeen
    @c0mmanderKeen 4 года назад +8

    This game has a very special place in my heart and I am loving the remaster to pieces. Great upload, as always. Thanks!!

  • @RealEnerjak
    @RealEnerjak 4 года назад +28

    Command and Conquer was to RTS games what Doom was to FPS games.

  • @nintentyr2355
    @nintentyr2355 4 года назад +7

    This was just fantastic to watch. I would like to see how the AI improved from Tiberian Dawn to Tiberian Sun/FireStorm

  • @theral056
    @theral056 4 года назад +15

    I just clicked to hear Hell March. Ended up watching the whole thing anyway.

  • @MrDragonball2000
    @MrDragonball2000 4 года назад +27

    You made me crack up at that England code comment

    • @TomNCatz
      @TomNCatz 4 года назад +9

      He sounds so mad so fast and degrades into full on accent. For a mostly calm and serious channel that was beautiful execution and comedic timing...

  • @DoomRulz
    @DoomRulz 4 года назад +1

    17:04 maybe that's the case with Tiberian Dawn, but it certainly isn't with CnC 3 and RA 3. The skirmish modes in both games aggravated me to no end. They always built their units and bases more quickly and could do even if all of their resource gathering had been destroyed.

  • @mikaslashCOD
    @mikaslashCOD 4 года назад +12

    16:40 "House AI do not have access to additional ressources, they mine the tiberium field the same way as the player"
    True for Skirmish, but NOT for campain.
    in Campain, the AI gets additional (unlimited???) funds.
    -tiberium silos respawn simultaneously (up to 6 at a very same time, which is not possible for the player) full of tiberium once they are destroyed or captured (money stolen)
    -Ai still building expensive units even when all refineries and silos have been gone for a while.

    • @musAKulture
      @musAKulture 4 года назад +1

      thats a map trigger likely

    • @Geckotr
      @Geckotr 2 года назад

      Enemy AI doesn't have unlimited resources in C&C Remastered, i don't know about the original though. When they're out of tiberium/ore, they halt unit production and their attacks on your base suddenly stops after a frequent wave of attacks. Emeny AI even starts selling it's buildings when it's out of resources to produce units

    • @BoffinBrain
      @BoffinBrain Год назад +1

      It's a bit late to reply to this, but I believe that while the campaign AI do need to harvest, the amount they receive for each truckload is extremely high, more than 2x the regular amount, so they are effectively cheating but you can still make them run out of money by denying them access to tiberium/ore, or stealing resources with thieves.

    • @mikaslashCOD
      @mikaslashCOD Год назад

      @@BoffinBrain That makes sens ! So basically 1 truck load can fill up to 6 tiberium silos(maybe more), that's crazy ! Thanks for clarifying this out. Better late than never :p

  • @Zerggodmaster
    @Zerggodmaster 4 года назад +25

    me: pokes enemy harvester
    ai: strong rage moving towards me

  • @mcmikecreations
    @mcmikecreations 4 года назад +4

    This was incredible info! Thank you for taking the time and releasing us from the pain of digging through the source code just for a basic idea of how things work. Although I was sad to hear that pathfinding (especially for large groups of ground units) was very limited due to the constraints imposed by the hardware capabilities, it was very interesting nonetheless. It lead me to do more research in the field of pathfinding optimization for RTS and I'm very thankful for that.

  • @Jaybearno
    @Jaybearno 3 года назад

    Wow, such a pleasure to learn about how this game was made, decades after playing it as a 12 year old. This game was one of the few that led to my lifelong love of games

  • @vivaladev
    @vivaladev 3 года назад +2

    I am working on a RTS game and this video made me realize that the only way I have to implement a decent AI is giving it full visibility of the map. I was already doing it, but I was having a bit of a moral dilemma because of that... Thanks for giving me some peace of mind.

  • @MrNegativecreep07
    @MrNegativecreep07 4 года назад +17

    I remember in the original the AI would always attack the northernmost target and wouldn't blast through walls, so you ciuld easily just block it in its own base. Have they fixed that for the remaster?

    • @Neptas
      @Neptas 4 года назад +11

      They fixed the northenmost target, now they try to deal as much damage as possible (for instance, the air bomb drop will generally try to aim at the center of your army or base). For the walls, no they haven't fixed it, it's still 100% possible to completely wall them into their own base lol.

  • @WizardsCode
    @WizardsCode 4 года назад +3

    Ohhhhh.... the sourcecode is available.... there goes the rest of my vacation. Perfect timing. Thank you :-D

  • @CommanderBohn
    @CommanderBohn 4 года назад +40

    >Spams sandbags
    Nothing personnell mr. Hardest AI.

    • @MoogieSRO
      @MoogieSRO 4 года назад +4

      Bone apple tea, Commander.

  • @SilverKnightPCs
    @SilverKnightPCs 4 года назад +1

    Programming with good documentation is like a love letter in a bottle when you read it 25 years later

  • @TheHastySlowpoke
    @TheHastySlowpoke 4 года назад +67

    Uk flag - ENGLAND
    Every scottish player - “ GERMANY IT IS THEN”

  • @jayhlovelady
    @jayhlovelady 4 года назад +1

    It's such a joy to see the first game that truly grabbed my attention still has such an avid fan base. Thanks for the great video!

  • @r.c.christian4633
    @r.c.christian4633 4 года назад +1

    Nice, finally it makes sense that you could exploit the AI in Tiberian Dawn N64 by never building barracks, as it would never attack unless it scans a barrack at an enemies base.

  • @warpdarkmatter4448
    @warpdarkmatter4448 4 года назад +1

    Got more, than just a quote. From The CAINE Munity?

  • @ChesterRico
    @ChesterRico 4 года назад +6

    Good stuff. I hope you'll do one on STALKER's AI & world simulation at some point!

  • @nicolaiby1846
    @nicolaiby1846 4 года назад +1

    Lots of clever scripting for such an old game. Loved the video!

  • @Annatar0
    @Annatar0 4 года назад +2

    I wish Microsoft could release the source code for titles like Age Of Empires 1/2. It's awesome to see titles like this beeing released to the public.

  • @Tucher97
    @Tucher97 4 года назад +1

    The command and conquer games are a tad challenging (the older games more so) as well even on normal which is enough to keep me on my toes and in a slight state of panic but still havign fun, where the AI will slowly rebuild itself but its a concept that I do miss from some RTS nowadays but I always enjoyed factions having something unique about them forcing you to take advantage to their speciality
    plus something I do like starting From CnC generals are "standard" units such as standard infantry, standard AT/AA unit, a standard mainline battle tank, and a main line AP vehicle also each faction having the ability to clear garrison or detect stealth (which is usally a scout or a transport unit but still amazing) while generals (lets ignore the setting) has some amazing aspects such as your barracks able to heal infantry

  • @hadorstapa
    @hadorstapa 4 года назад +2

    Fascinating that the terminology of Houses is key in C&C, as this is the in-universe terminology for factions in Dune.

    • @sunshadow7XK
      @sunshadow7XK 4 года назад +4

      Likely a direct build on from it. It would be interesting to compare the codes of tib dawn and dune II.

  • @Ghost_Of_SAS
    @Ghost_Of_SAS 4 года назад +8

    Here's hoping someone can use that same upscaling technology to remaster Wing Commander 3 and 4.

    • @MrInvinciblewarrior
      @MrInvinciblewarrior 4 года назад +1

      Actually wc4 and wc5 have decent dvd releases, check wcnews.com
      I think wc3 has a 3do release with better quality. Maybe the master still exists, as chris roberts is such a film fan.

  • @shingshongshamalama
    @shingshongshamalama 4 года назад +3

    How kind of EA, to release the source code to the biggest hit of a studio they destroyed for absolutely no reason.

  • @Aphexion
    @Aphexion 4 года назад

    I love the way you speak. It really helps me to practice my english because it's so clear and understandable

  • @ToJoAudio
    @ToJoAudio 4 года назад

    I always thought C&C pioneered influence maps , a colour representation of the game map where each cells colour has a value and a function attached for the main house ai to know certain tactics, where they can build etc. Super interesting video!!

  • @akjir
    @akjir 4 года назад

    Hmm. Hoped to see more / mostly code and explanation on that. I mean, it's available.

  • @logickedmazimoon6001
    @logickedmazimoon6001 4 года назад +1

    Just downloaded and played Red alert on linux. I've never picked up an rts game this quickly! I love it already. I've always wanted to be into rts but games like age of empire but I just felt lost in all the menus

  • @mrdoge9508
    @mrdoge9508 4 года назад

    Yes, you are correct about the dogs becoming bullets. Found this when I was modding the original a while back (also proceeded to make the mammoth tank fire dogs). Also, I'm not sure if you fully addressed this, but iirc there are tags inside rules.ini which define what buildings are (e.g. PowerPlant=POWR [forgot the exact unit ref tag]), which I believe it then feeds into the AI. These tags are also present in Tiberian Sun, though they no longer do anything.

  • @AmazingArends
    @AmazingArends 4 года назад

    Good to see an analysis of A.I. In games. I've done an analysis of A.I. In a different game on my channel, and found A.I. in surprising places.

  • @ruolbu
    @ruolbu 4 года назад +4

    25:10
    >Tommy will remember this

  • @ADEzor
    @ADEzor 4 года назад

    Awesome video. I subscribed for more content. Although i was hoping for the final explanation for the AI behavior of sending units to top left corner of the map and then just chilling there.

  • @Ellolo17
    @Ellolo17 4 года назад +1

    10:00 the solution for that was clicking a lot of times, and repeating orders to guide the units the way you wanted, instead of leaving the units alone while you do other thing

  • @erwinhun
    @erwinhun 4 года назад

    A very interesting video that must have taken some time to put together, it's definitely a thumbs up and a comment from me!

  • @jurajhezel942
    @jurajhezel942 4 года назад

    Now this was really interesting insight how it all works. Thank you for the video 👍👌

  • @fremenondesand3896
    @fremenondesand3896 4 года назад +1

    now we have the source code I'm hoping those who understand how to copy and paste code will have a modded version of C&C that has modern pathfinding. I remember reading in factorio how they've updated their pathfinding to be much more efficent due to the large distances the AI enemy needs to travel to get to your base. Not an issue in C&C, however there's many obstacles that I'd like to see how an AI handles.
    Maybe you could have the entire map in the pathfinders memory as we have gigabytes of ram at our disposal these days.

  • @Henskelion
    @Henskelion 4 года назад +11

    16:04 This isn't actually true as far as the singleplayer TD AI goes. TD's singleplayer AI cheats, and it cheats hard. It's effectively given infinite resources, since a single harvester depositing Tiberium (no matter how little) will always max out the AI's cash reserves. The AI can also rebuild its lost structures regardless of whether or not they're adjacent to an existing structure, which in later missions often results in enemy gun turrets that dot the map simply being replaced every time they are destroyed, despite being isolated. The final mission goes so far with its AI cheating, that the AI can actually rebuild its lost Construction Yards, without having to build and deploy an MCV first, and the final GDI mission (in each variant) will also have the AI building a small base with an Obelisk near your base, without having any existing structures there to be adjacent to first.
    Then there's the way the singleplayer AI handles superweapons. Nod AI can use the nuclear strike an infinite number of times, whereas the player is limited to a single nuke. The airstrike can actually change targets mid-flight, something that the player can't actually do.
    Fortunately, as much as the singleplayer AI cheats, it's also pretty dumb. Due to the primitive pathfinding it has that you mentioned, you can actually completely break its ability to do anything by just building sandbag walls and blocking off access to your base, causing attacking enemy units to just gather at the sandbags' edge and wait there until a new path either opens up or they are killed. The AI also uses a simple priority list for its superweapon attacks, so an ion cannon strike will always target an Obelisk first, with a SAM Site being its second priority, followed by a gun turret, followed by a Refinery, etc. This is very exploitable for GDI players, since the Nod AI will always make the northeastern-most Advanced Guard Tower you have its target for the nuke. This priority list also leads to some annoyances, like GDI airstrikes always making your Commando their number one target (hence why your Commando is always inevitably killed on Nod missions 9, 11 and 13c)
    Also, while not AI-related strictly speaking, there's an odd rule in Tiberian Dawn where capturing enemy silos full of resources will stop giving the capturing player resources after enough attempts (I think 5 is the number), regardless of how much Tiberium the enemy has in reserves. I think this was done to make it overly-exploitable by the player, since some SP missions in TD feature enemy easily-capturable silos isolated from their main base.

    • @AIandGames
      @AIandGames  4 года назад +8

      Indeed. As mentioned at 15:45, the campaign AI does not behave the same way. Parameters for campaign missions are read from config file that disable parts of the codebase used in skirmish.

    • @MrInvinciblewarrior
      @MrInvinciblewarrior 4 года назад +3

      Westwood just didnt got the ai working for cnc1, so they just decided to use certain scripts and tell the ai where the building is.
      With red alert they finally got it working.
      Petroglyph could have activated the ai in the remaster, but then it would havent been anymore cnc 1. So they kept it. But they currently discuss about allowing mods to activate it.

  • @МаксимХавро-ч4ы
    @МаксимХавро-ч4ы 4 года назад

    Nice investigation on game's AI. Thanx!

  • @reoire843
    @reoire843 2 года назад +1

    0:11 Oh man, that intro music...
    IIRC you could put the game CD into a CD player to hear the soundtrack. Back in high school I used the alarm feature of my CD player to play that CD to wake me up for school. This song is the first one that played. It was an interesting way to wake up in the morning!
    I always thought the voices here sounded like, "PIECE OF SHIT! WAKE UP!"

    • @AIandGames
      @AIandGames  2 года назад +1

      😂 oh man that's a rough start to the day

    • @reoire843
      @reoire843 2 года назад

      @@AIandGames High school days were some heady times, lol

  • @joshs7408
    @joshs7408 4 года назад +2

    You find anything about ships in the Ai source code? I can never end up with the ai building ships, so I'd assume it's in there somewhere

  • @sgtcaco
    @sgtcaco 3 года назад

    Hi it’s Collin here, welcome to CS guitars.

  • @Matsuro_まつろ
    @Matsuro_まつろ 4 года назад

    When I wasn't playing this on the 64 I was drawing it. Most memorable was the tuberium, I would stab the paper to death for enough dots 😅

  • @exoticbutters4212
    @exoticbutters4212 4 года назад

    I like how the endgame strategy for the ai is called fire sale

  • @rtyuik7
    @rtyuik7 4 года назад +3

    damn, whered you get such a high-quality version of HellMarch for that intro? it makes the version thats on Spotify sound like Lo-Fi C&C Music to Study/Relax to...

    • @dreddbolt
      @dreddbolt 4 года назад

      I'm wondering this myself, as it somewhat reminds me of ToxicXEternity's metal cover of the theme.

    • @AIandGames
      @AIandGames  4 года назад +5

      This is the version of Hell March from the remaster. They re-recorded all of the original soundtracks.

    • @rtyuik7
      @rtyuik7 4 года назад +3

      @@AIandGames they need to update Spotify then xD

  • @KotCR
    @KotCR 4 года назад

    Only 6 minutes in, and so I've not read the other comments (maybe somebody already mentioned this), but actually, I think alot of the code that looks like it was transferred over from Red Alert to Tib Dawn wasn't done for the Remaster - at least not the modern one. No, chances are alot of it is just as old as the game themselves - transferred over from Red Alert for the original Windows re-release of Command & Conquer (aka as Gold IIRC). The very first release of C&C was DOS only. The Windows 95 version was a later release, I can't remember if it was released just before or after Red Alert though (Red Alert itself shipped with both Win95 and DOS versions), but either way it was probably released roughly the same time and developed simultaneously (which makes sense since Red Alert was originally going to be just an expansion pack to the original).
    EDIT: Finished the video, just want to add that the AI DOES cheat with more than just omniscience - at least in singleplayer. It's never really been an accusation that it does it in multiplayer/skirmish, since Tib Dawn never had any proper MP AI (lacking a skirmish feature) until the recent remaster, and for the most part other than omniscience (which it does sadly with so many other RTS games too) the Red Alert AI has never been accused of cheating. For the most part Red Alert always played fair.
    It's just Tib Dawn single player missions usually, but this code is part of the mission file itself rather than the AI's core algorithm (individual mission files were free to overwrite anything from the core ruleset in self-contained files), that contained unseen cheats for the AI that would hand him a big wad of cash in some missions if his money ever fell below a certain point (distinguishing between cash and tiberium is important here - they are not the same thing in the code AFAIK), or the most visible one that is easy to witness yourself - enabling him to rebuild any destroyed structures on the same spot regardless of if he has building adjacency (even enabling him to rebuild buildings you usually can't build, such as a lost secondary Construction Yard so long as he retains a Construction Yard somewhere on the map). He can also ignore prerequisites as you can witness on the BuildLevel 5 or 6 missions against GDI where he will build MLRS' despite not owning an Advanced Comm Centre (which isn't available till BuildLevel 7 and is ordinarily a requirement to produce the MLRS)..

  • @SkyFly19853
    @SkyFly19853 4 года назад +1

    Finally...
    A great video on RTS A.I. ...
    ✅✅✅✅✅✅✅✅

  • @Gelwain
    @Gelwain 4 года назад

    I -HATED- that paranoid setting in Red Alert as a kid. Doing 8 man FFAs with bots was so infuriating when one AI went down and the other 6 team up and roll into my base. I stopped playing skirmish for a LONG time for that. Its good to see that it was a legitmate feature baked into the game.

  • @ifm2181
    @ifm2181 4 года назад

    I remember using Red Alchemist back then to give other units the Dog Bullet attack. It was... unusual.

  • @Arganoid
    @Arganoid 2 года назад

    The AI in Tiberian Dawn could not deal with walls or sandbags. If you surrounded your base with sandbags, the AI could not path to you so would not attack you. This was fixed in Red Alert. Also the AI for choosing where to nuke/airstrike was very simple. It would target certain high level buildings such as advanced guard towers. If you built a sandbag wall into the enemy base and then built an advanced guard tower just before they launched a nuke, they would nuke their own base. I had to do this to win one particularly difficult mission in the expansion pack.

  • @thatchanguy
    @thatchanguy 4 года назад

    Loved this. Subscribed!

  • @vanivanov9571
    @vanivanov9571 4 года назад +4

    24:01 ...Wait, what does that mean? Your houses sometimes become enemy owned?

    • @TsukioujiRyuu
      @TsukioujiRyuu 4 года назад +5

      Yes. Trust me, I'm an engineer.

  • @CoffeePotato
    @CoffeePotato 4 года назад +1

    So Technically half the Ogre Battle series was an RTS, any chance of a dive into that series' different AIs?

    • @lcmiracle
      @lcmiracle 4 года назад +1

      while yeah... when you make the turns go really fast it will look and feel like real time.

    • @CoffeePotato
      @CoffeePotato 4 года назад

      @@lcmiracle I've been running MOTBQ like that lately, it's fun.

  • @purpleganja2
    @purpleganja2 4 года назад

    That explained a lot of things thank you!
    It didn't explain why the bots don't roll over sandbags with vehicles that can tho ;)

  • @jesternario
    @jesternario 4 года назад +6

    The AI of Dune two was dumber than a sack of potatoes. You could take a mobile construction yard and plant it behind enemy lines, and the AI would never clue in as to why you keep smacking them from behind while they assault you’re unused crater of a main base.

    • @CidSilverWing
      @CidSilverWing 4 года назад +1

      In the original C&C, the AI ignores walls. Sandbag their base and they're trapped forever.
      They also get PISSED when you so much as sneeze at their harvester. Poke it with a rocket, see all their units come flying out, trash'em, their base is exposed.

    • @jesternario
      @jesternario 4 года назад

      @@CidSilverWing still more advanced than DUNE II, but then again, the company made both games, with DUNE III coming out first.

  • @theMagos
    @theMagos 4 года назад +4

    Using crash-n-turn is understandable, but why didn't they design some of the maps better to not make it so bad? Ezekiels Wheel as an example, making the harvester U-turn to get out of the base every time...

    • @TheScoutnation
      @TheScoutnation 4 года назад

      Don't remind me of the pain this caused

    • @tarrker
      @tarrker 4 года назад

      Oh yeah totally. Nothing like wondering where your enemy is for 20 minutes only to finally scout their base and see a thousand infantry and tanks completely walled in by power plants.

  • @ExtremeTeddy
    @ExtremeTeddy 4 года назад +3

    great article, loved the series. too bad they burned everything with C&C 4 😭

    • @hdezn26
      @hdezn26 4 года назад +1

      There is NO such thing as C&C 4! That thing they call a "game" is a load of $h!t...

    • @ew3612
      @ew3612 4 года назад +1

      Im still waiting for the release of C&C4. I remember EA was working on it and then the whole project was scrapped along with any future developments minus the remasters.

  • @Rairosu
    @Rairosu Год назад +1

    Bullet Dog, Good Dog!

  • @ElodieHiras
    @ElodieHiras 4 года назад

    Send a minigunner scratch the paint job on the Harvester. The entire enemy forces charge you at once. The cheese potential is endless here.

  • @SkyFly19853
    @SkyFly19853 4 года назад

    Btw, I hope there will be more videos on RTS classics as well as on RPG classics...

  • @krisfrederick5001
    @krisfrederick5001 4 года назад

    There's a title you can't pass up. Too bad the brutal AI in Red Alert 2 only had 3 attacks. But seriously, this was great and really interesting. Brought me back to basic programming in High School. Except I was making Christmas trees not battlegrounds. I maintain the belief the ore miners' path finding in Red Alert are designed to be painful.

  • @kestask.7432
    @kestask.7432 4 года назад +1

    Like to see a video about C&C: Generals.

  • @DanIel-fl1vc
    @DanIel-fl1vc 4 года назад

    You explained so well path finding, I always thought it was really complex. Turns out it's just some if statements, what would be interesting to know is how the units detect the edge of an object that is in the way. Is the map divided into a bunch of squares and the squares are either a block or available space? And then there's a function that looks how many squares away the unit is from its target or is the game in 3d and each sprite has some 3d collider around it?

    • @mathewkloepfer664
      @mathewkloepfer664 4 года назад +2

      Path-finding _can_ be very complex. I'd recommend starting with the A* algorithm as he mentioned in the video. Conceptually it's pretty easy, but you can still make it nonperformant on accident.
      Typically all maps are divided into squares or hexes or whatever the terrain is divided into (Civ vs Advance Wars). When I created a hex-based game I allowed the terrain to know if it was occupied or not. This helped the pathfinding algorithm sort itself out quicker. As far as I'm aware, most RTS games were 2D until the mid 2000's. RA2 was also still 2D I believe, surprisingly.

    • @DanIel-fl1vc
      @DanIel-fl1vc 4 года назад

      @@mathewkloepfer664 So if the map is divided into squares or hexes, or coordinates. I guess the "algorithm" detects what coordinate you clicked on then compares it to the square the unit is in and compares the two coordinates and determines the fastest route from the first point to the other.
      Then when the unit moves following this route and runs into a tile that is "occupied" the function runs again and redirects the target around the obstacle. Or maybe all of this is done before the unit even starts moving and the path is stored somewhere and the unit just follows it.

  • @randomnstoned966
    @randomnstoned966 3 года назад

    Great video dude very interesting, have you played Dungeon Keeper? Could be a good one.

  • @karlstenator
    @karlstenator 4 года назад

    Not sure if I missed it, but what code is behind tiberium, such as soldier injury and spread rate? And I've also seen trees form into puffers too...

  • @jandamz1119
    @jandamz1119 4 года назад

    speaking of RTS and AI, I wonder how the AI from the Company of Heroes franchise fare, as compared to most RTS games, it was one of the franchises that introduced a lot of "quirks", like the cover system. Men of War as well following suit albeit in a much more "realistic" sense and Dawn of War too bringing it to the Warhammer universe

  • @DaussPlays
    @DaussPlays 4 года назад

    Something I was hoping you'd touch on but did not would have been the advanced tactics of individual units being commanded by the AI. I've noticed that seemingly certain thresholds must be met before the AI will do things like direct tanks to crush infantry, but I'm not sure what those would be. Is it tied to game difficulty? Is there some kind of AI 'IQ' requirement that must be passed first?

    • @cameronmiller6240
      @cameronmiller6240 4 года назад

      Dauss Plays I believe it is tied to game difficulty.

  • @vicpariah3444
    @vicpariah3444 4 года назад

    Correct me if I'm wrong... but if it is C++ it will not take long before hacks and exploits are running rampant. Even with Steam integration. Counterstrike (also in C++) is a prime example of this. However, modding kinda saves it I guess?

  • @6006133
    @6006133 4 года назад

    Hah, the bullet dog is like an Aeon mercy from Supreme Commander

  • @popeofpain6904
    @popeofpain6904 4 года назад +1

    Generals Source code has left the chat

  • @Skullnezz
    @Skullnezz 4 года назад

    Oh yes another video

  • @jesternario
    @jesternario 2 года назад +1

    So, can you show us how Dune II works so we can compare between these two? Maybe even show us Dune 2000 for comparison.

  • @longegg7130
    @longegg7130 4 года назад

    Do one for generals and 0 hour. both of these games still have an active online community with fan run servers.

  • @ethany7110
    @ethany7110 4 года назад

    Love this game

  • @SilverKnightPCs
    @SilverKnightPCs 4 года назад

    All that chat of AI and no mention of the sandbag trick and why it works in Tib Dawn?

  • @Ky0l
    @Ky0l 4 года назад

    The AI has limitless resources in the last few missions. It's undeniable.

  • @danecottee6859
    @danecottee6859 2 года назад

    I have made a map on Steam, (AC) CAN'T SEE THE TERROR THROUGH THE TREES. I have run into a strange behavior in the ai I need to understand. I have looping waves set to go after the player's units, the ai seems to have a favorite unit to attack, at first I thought this was the commandos because of their unit type. The ai would head in their direction. However, while editing my map I deleted the commandos and replaced them and now the ai is hungry for the player's APC. Is the order to their placement on the map affecting which unit is the prime target?

  • @AnthroTsuneon
    @AnthroTsuneon 4 года назад +2

    So, riddle me this, Factman. Why does the AI in Tiberian Dawn not recognize the existence of sandbag, not bothering to attack them to break through?

    • @youmukonpaku3168
      @youmukonpaku3168 4 года назад +2

      The pathfinder in Tiberian Dawn doesn't have the interrupt movement to attack or crush wall bit.

    • @AnthroTsuneon
      @AnthroTsuneon 4 года назад

      @@youmukonpaku3168 For some reason I had thought they did for regular walls

  • @cyberdemon9306
    @cyberdemon9306 4 года назад

    25:08 same thing applies to Ukraine and USSR, Ukraine was part of USSR but for some reason they're separate factions in this game..

  • @Baron_Harkonnen
    @Baron_Harkonnen 4 года назад

    I wish the AI acted as smart as he made it sound

  • @cherrydragon3120
    @cherrydragon3120 4 года назад

    I mean... long story short. most of the A.I is based on the same ai age of empires uses.
    Wich pretty much looks for open space to dump buildings and makes sure certain buildings are only allowed so many times within several cells from one another. For example: no 2 barrackses are allowed to exist within 5 cells of each other. Things like that.
    Also, attacking is a set pathing from their base to yours. With a soft A.I that allows to track enemy buildinga and units, thats how they find your troops.

  • @don_5283
    @don_5283 4 года назад

    It is definitely false that the AI plays by the same basic rules as the player in the original games. I can 100% confirm that the AI receives the full purchase price back for sold structures in addition to the sale infantry in Red Alert, and though I never ran any sort of formal test on Tiberian Dawn, I would be utterly shocked if the AI did not cheat hard on credits.
    I'm just glad the Red Alert AI was never smart enough to figure out that it could use Construction Yard downtime to build/sell Tesla Coils for infinite Riflemen. Well do I remember how annoyed I was when I'd stuck a Spy in a Refinery, and watched the AI get 1,500 credits back when it sold the Tesla Coil I was pounding into dust.

  • @Sodomantis
    @Sodomantis 4 года назад +1

    HOUSE_GOOD? must be from dune code base.

  • @Der_Arathok
    @Der_Arathok 4 года назад

    What about House Ordos? :O

  • @aidancoutts2341
    @aidancoutts2341 4 года назад +1

    "After EA bought it"
    Me: Anticipating obligatory EA-style closure
    "Eventually closed the studio"
    Imagine big studios buying up talented developers just to destroy competition and to flood the market instead with slot machines and the same battlefield game every 2 years.
    True gaming is being strangled by casual, mobile market dweebs, and gambling addicts. Average age: however old you have to be to cry about V-Bucks.

  • @92soldier
    @92soldier 4 года назад

    They need to explore the lag clicks and being unable to select units during a match