Home » MODDING HQ 1.13 » v1.13 Coding Talk » AI Rewrite - How Reasonable
AI Rewrite - How Reasonable[message #303936] Thu, 26 April 2012 13:26 Go to next message

Registered:March 2004
Location: Ontario
I have an idea and I'm looking for advice on this from people familiar with the source. I started learning C++ recently and I'm mainly interested in deep logic systems. I don't have any "substance" of my own to work with at this time. So, I'm thinking that because the whole source is available for this game it would be a good platform to test things, whereas generally not much can be done with other games due to lack of accessible variables to base decisions on. Basically, the idea in this context would be to just make the individual AI soldier player as tricky as possible. What I would not do is have a god perspective decision making like the player does. There would probably be some interaction based on soldier rank. It's not primarily for fun play: I would optimize, but not limit it overall for the sake of quick turns on slow machines.

I haven't looked at the source yet. The trillion dollar question: does this idea seem reasonable based on how the code is organized and commented and how much engine stuff there is to use for logic? Would it take all day to find the variable for something that I want to affect a decision? I've read things in other threads that scared me a bit. Another thing I'm wondering about is how to keep updated with frequent changes to the SVN, because I would like it to be a usable mod. Let's say I'm working with a version of a file and it gets changed. Is it a hair puller merging the changes every time?
Re: AI Rewrite - How Reasonable[message #303948] Thu, 26 April 2012 22:22 Go to previous message

Registered:May 2009
Location: Behind you.
You shouldn't have a problem merging changes because there aren't many people working on the AI. Unless you end up making changes all over the code, then it might take a while to merge all your changes. It shouldn't be a problem though, its not like we're getting new commits every 5min.

About the viability of the task - there doesn't seem to be a consistent and comprehensive framework in place for programming AI. So you'll need to find all the places where the AI is called and work from there. My initial impression was that its just a bowl of spaghetti, but that's typical for JA2 code - it usually isn't that bad once you follow the code for a while*. There were others here who made improvements and tweaks for the current AI, so you're not completely on your own here... If they're still around and you can find them.

[*] - eventually the code starts to make sense because you either understand how it works or you went insane. In both cases, at that point you're fully qualified to join the ranks of JA2 coders

Previous Topic: Idea for Ammo Purchasing & Crates -- Feedback Requested
Next Topic: XML Tag Behaviour Changes
Goto Forum:

Current Time: Thu Apr 18 19:46:03 EEST 2019

Total time taken to generate the page: 0.00683 seconds