Sunday, February 6, 2011

Design ideas and the AI, the process.

As many of you know we call this an alpha of the mod. We do this because we're constantly trying different designs out as we go, changing things quite drasticly at times. Now that we have the AI in the game we're learning just what designs that we came up with work and what ones won't cut the mustard.

A few examples of ones that have to go away would be the Madea fly in delivery system for the Mecha, it just won't work. There is no way to get the AI that I have found to understand that when it wants an RGM79 to build the RGM79MadeaSummon unit and that will give it the RGM79. There reason why is because the AI works off of the idea of "kill teams". It looks at the situation on the board and then based on that it looks at what teams it can build and what will be the most effective against a priority target. Problem is if I tell it that it needs 5 summons to make a team it will just keep building the same thing over and over because the summon doesn't stay around long enough to get 5 of them together for a team, the unit it summons does. And if I tell it that it wants the 5 units that the summons drop it just doesn't do anything because the AI doesn't understand that the summon has the unit inside it. So that's got to go.

Another example would be having the Timeline research and the War Factory put together. The AI won't do any timeline research simply because it doesn't have the time, it would rather pump out units from the warfactory than shut a factory down for the 3+ minutes it takes to do an upgrade, so again we have to leave this idea behind.

But for every "design flaw" that we have to remove/replace new ideas that we didn't even consider pop up. Take this for an example.

This "design issue" is getting the AI to expand. EF doesn't use tiberium as a resource, instead they get their resources flown into them. The problem is that the AI is hard-coded to use Tiberium as the determining factor for expansion. So as EF doesn't ever touch the tiberium, it doesn't ever need to expand. Except it does as EF is designed to take up a LOT of room. We've tried to use this as a trade off. Yes their buildings take up a lot of room, but they also do alot on their own. A solar powerplant now produces 30 energy, thats huge! A nuclear powerplant produces 100 energy, so even though it's the size of 2+ solars it outproduces them. The "Frontline Troop Depot" takes up more room than a regular war factory but it produces infantry, vehicles, and has 2 defenses built into it. You get the point I hope.

So my first idea to fix this was to tell the AI that if needs a ton of tiberium in it's "home" to be considered "resource safe". This leads to the AI expanding like it should but it only does so once. I need an AI that will expand as needed more than once. Also if a player kills off the EF's resource gathering structures they won't build any more, the AI doesn't consider it a nessesary structure.

This leads to my creative idea to fix the issue. First, make the Tiberium Refinary a "Tech" structure. The AI will build one if it doesn't have one because every building requires it. It will only build one, but one is enough to get the job done. The second thing to do was have the resource refinery spawn more than 1 harvester at a time. I changed it to 3 at first and it was such a dramatic change in the AI's behavior that EF won every battle I put them in. 1 on 1's, 4 way free for alls, it just wasn't funny. So I lowered it to two and tried again, this time EF was a bit slower but still walked all over the Scrin, GDI, and NOD.

Wow. What happens if I change GDI and NOD to 2 each also and turn Scrin into 3? AI on crack, thats what! The Scrin tore threw tiberium fields like a plauge (which to me looked proper. They are supposed to be Tiberium based, so it just made more since to me to give them more resource gathers) and GDI and NOD threw up troops like mad. EF now got its ass whooped in a 4 way game. The EF AI built the wrong defenses (built guns instead of AA so scrin had a field day with them) and that was that. In the end it was an awsome battle, and its something I plan on keeping.

Another thing I'm changing is the refinerys abiltiy to regenerate the harvesters. I'm trying to set it up so that if the harvesters die the refinery will rebuild them in 2 minutes. Idea here is that the AI will re-boot itself after a bit of time in case it gets stuck. This is something I'm doing to all 4 factions. This will have the added ability of mitigating NOD's super weapon a bit too. Cool huh?

All of this leads me to the real topic of todays post. I have come up with a way for EF to advance through the timelines other than through researching them. I have not implemented it yet, I wanted to hear what you guys thought first.

The idea is that when a timeline 1 unit ranks up to lvl 4 then the player automatically advances to timeline 2. When a timeline 2 hits rank 4 it auto-advances to timeline 3, and so on and so on. This semi-automated system would be sweet because it would give players 2 ways to advance, through research or combat. It's really up to the player on how they wish to do it. You would still need to have the Tech Center built for it to work, but what do you think? Let me know. And if you have any creative ideas that you think would be cool for the game also let us know.

No comments: