For the last month and a half, I've been trying to make a new mod for XMP. But to make this mod work, I needed a bot.
Originally I started looking at the Unreal2 code, because I think the NPC (Non-player character) AI is pretty good. But to my disappointment the code structure of the characters is completely different from XMP. They share almost nothing beyond the engine code (written by Epic). Plus it's complex beyond believe... about a dozen different classes to look at. It took a very long time to figure out everything and then decide to abandon that direction.
Then I looked at the existing code in XMP for the auto turrets. Not expecting much really. The code is too simple to transform into a search and destroy, moving enemy.
Finally I started looking at the UT2003 code. First the Bot code - computer behaving as actual players, is way too complex. It's 4500 lines of code in one class, plus other classes it depends on (Squad AI etc). It's a lot better than the U2 situation, but there is still no way I can port all of that over. Afterall the Epic Bot was probably designed to be as versatile as possible for all kinds of different games that the Unreal engine can be used for.
Looking a bit deeper, UT2003 also has the Monster code - controls monsters that simply kill players in the Invasion gametype. It's a much simplified version of Bot (about half the size) and it's exactly what I'm looking for... except of course it doesn't just work in XMP. It took me another week to understand everything so I can make the XMP character code (Pawn) compatible with any AI - it was designed to be human controlled only. Now I am going thru the AI code to (hopefully) properly control the Pawn.
2600 lines of code is still not easy to go thru all at once. After hoping everything to automagically work together has proved to be futile, I decided to go thru it step by step. I cut down the code to be as simple as possible, and then I'll put each feature back in and fix it up that way.
At this point I have cut all the "awareness" of the Monster, and put in the first feature: wandering (now at just over 500 lines). It works - thank the Artis. The screenshot I made doesn't "prove" anything: it's just some Gunner named "Bot1" walking. But trust me, that is not a player, it's computer controlled. And it walks around in different directions randomly.
I picked RGB as my test bed for obvious reasons... But something hilarious happened. I watched the bot wander for a while, and eventually he walked over the jumppad! He landed in the middle "bridge" and kept wandering as if nothing happened
Now I am way overdue for the other project - real life. The bot issue was very optimistically thought to be solved by last month, so I still have this month to work on the mod. But now we're one week into the month and I have a "zombie" that only wanders around. So the status of this whole project now becomes "I'll work on it if I feel like it."
The reality is I am back to school in September, and if possible I would like to get a part-time job to pay for this school too. In that case I'll have zero time to even touch any games. We'll see what happens with the rest of these days I'm still free. In all likelihood the project will be on hold after that.
If there is anyone interested in continuing the AI part of the project, feel free to contact me and we'll talk. Oh, and what's the rest of this mod thing? I was going to announce it once the bot issue is solved... So let's hope it will be solved soon, or you'll have to wait until who knows when.
Meanwhile let's just keep the party going and play XMP as it is every week hehehe...
Originally I started looking at the Unreal2 code, because I think the NPC (Non-player character) AI is pretty good. But to my disappointment the code structure of the characters is completely different from XMP. They share almost nothing beyond the engine code (written by Epic). Plus it's complex beyond believe... about a dozen different classes to look at. It took a very long time to figure out everything and then decide to abandon that direction.
Then I looked at the existing code in XMP for the auto turrets. Not expecting much really. The code is too simple to transform into a search and destroy, moving enemy.
Finally I started looking at the UT2003 code. First the Bot code - computer behaving as actual players, is way too complex. It's 4500 lines of code in one class, plus other classes it depends on (Squad AI etc). It's a lot better than the U2 situation, but there is still no way I can port all of that over. Afterall the Epic Bot was probably designed to be as versatile as possible for all kinds of different games that the Unreal engine can be used for.
Looking a bit deeper, UT2003 also has the Monster code - controls monsters that simply kill players in the Invasion gametype. It's a much simplified version of Bot (about half the size) and it's exactly what I'm looking for... except of course it doesn't just work in XMP. It took me another week to understand everything so I can make the XMP character code (Pawn) compatible with any AI - it was designed to be human controlled only. Now I am going thru the AI code to (hopefully) properly control the Pawn.
2600 lines of code is still not easy to go thru all at once. After hoping everything to automagically work together has proved to be futile, I decided to go thru it step by step. I cut down the code to be as simple as possible, and then I'll put each feature back in and fix it up that way.
At this point I have cut all the "awareness" of the Monster, and put in the first feature: wandering (now at just over 500 lines). It works - thank the Artis. The screenshot I made doesn't "prove" anything: it's just some Gunner named "Bot1" walking. But trust me, that is not a player, it's computer controlled. And it walks around in different directions randomly.
I picked RGB as my test bed for obvious reasons... But something hilarious happened. I watched the bot wander for a while, and eventually he walked over the jumppad! He landed in the middle "bridge" and kept wandering as if nothing happened
Now I am way overdue for the other project - real life. The bot issue was very optimistically thought to be solved by last month, so I still have this month to work on the mod. But now we're one week into the month and I have a "zombie" that only wanders around. So the status of this whole project now becomes "I'll work on it if I feel like it."
The reality is I am back to school in September, and if possible I would like to get a part-time job to pay for this school too. In that case I'll have zero time to even touch any games. We'll see what happens with the rest of these days I'm still free. In all likelihood the project will be on hold after that.
If there is anyone interested in continuing the AI part of the project, feel free to contact me and we'll talk. Oh, and what's the rest of this mod thing? I was going to announce it once the bot issue is solved... So let's hope it will be solved soon, or you'll have to wait until who knows when.
Meanwhile let's just keep the party going and play XMP as it is every week hehehe...