Outpost Universe Forums

Projects & Development => Projects => Topic started by: Eddy-B on January 09, 2006, 05:36:36 PM

Title: New Colony Game
Post by: Eddy-B on January 09, 2006, 05:36:36 PM
Today i've started on a new colony-type game. It will follow the renegades story.
For some time i have been waiting to release the first Renegades pack into the outpost universe, but i've been asked to pospone that release until the next opu-reunion. I have honoured this request, but i have been waiting since october and i started to feel bored.

I know many people have tried to set up a simple colony game, but none of them have an AI running in it. I do not wish to brag or anything, but if someone knows how to set up an AI, it would be me, so i've taken it up to myself to create this.

I've decided to make it the same way i've set up the Renegades' story. To that end, it will be a surprise for all of you when it's done. I hope to have it done before the next reunion, so it can be included in the first Renegades release pack.


I'll try to keep this thread updated as much as possible without giving too much away about the game itself. So far, the basic set up is complete, that is: the game can now be played out, but there is no AI code yet.

Total time invested: about 2 hours
Total number of source lines: 391 (not counting previously designed files)
Size of dll script file: 84kB
Title: New Colony Game
Post by: Leviathan on January 09, 2006, 05:41:20 PM
Sounds great :)

 
Title: New Colony Game
Post by: Mcshay on January 09, 2006, 06:20:13 PM
I can't wait to play it!

Does anyone know when the reunion/next release will be?
Title: New Colony Game
Post by: lordly_dragon on January 09, 2006, 08:55:55 PM
i really dont know either ... could abe fun to know  :rolleyes:  
Title: New Colony Game
Post by: wizisi2k on January 09, 2006, 09:37:06 PM
u gonna do like u did with the first 4 missions and release beta's to select ppl to test it?
Title: New Colony Game
Post by: Eddy-B on January 10, 2006, 06:21:51 PM
Quote
u gonna do like u did with the first 4 missions and release beta's to select ppl to test it?
i might.


Today i worked only 45 mins on it. Mainly some testing to see if everything works fine.
Game gave an error when saved: that was solved. The last 20 mins i added a difficulty-selector to have the colony-game start in a different way, depending what difficulty was selected. Also made some basic coding structures to help set up the AI.
Title: New Colony Game
Post by: spirit1flyer on January 10, 2006, 07:45:47 PM
Eddy I know you don't normally share your code but do you think you could share some AI coding stuff from the colony game?
Title: New Colony Game
Post by: Eddy-B on January 11, 2006, 06:48:56 PM
Quote
Eddy I know you don't normally share your code ...
then don't ask :P

-------------------
Update:

I've worked on the AI part quite a bit today. I've now got the AI do real research & development of it's technologies and structures. This will make the AI more real and lifelike, plus without using timers to fake research being this way of playing an AI is much more fair.

This is also the first real test of the IUnit::Research command.

Total time invested: about 10 hours
Total number of source lines: ca. 600 (not counting previously designed files)
 
Title: New Colony Game
Post by: Eddy-B on January 12, 2006, 06:54:18 PM
I worked some more on the AI
This colony game is helping me a great deal towards an independant AI library.

So far the AI can
Title: New Colony Game
Post by: Eddy-B on January 13, 2006, 08:14:27 PM
Worked all evening to getting the AI bases to randomize their construction.
Yet another step closer to a general AI.
If you've played the mission once, and you play it a second time, you'll notice that the AI places it's structures differently.
The code had a lot of bugs in it, so it took me while to get it running smoothly.

I've added extra items to the AI researchlist and set up additional tank groups. When i have a result on the objective poll (http://forum.outpostuniverse.net/index.php?showtopic=2471) i will complete the research list.  
Title: New Colony Game
Post by: Eddy-B on January 14, 2006, 03:46:46 PM
I don't even know if people are really interrested in hearing a daily progress report, but i'll keep posting until i get complaints :P

I had a setback with the AI building positioning. At times it crashed and it took me a while to figure out what was causing the crashes. I had to rewrite the entire positioning algorythm to what it is now.
After the modification the randomness became even better.

I'm now down to testing the whole thing, and to see if they build up their bases correctly time after time.
Title: New Colony Game
Post by: Leviathan on January 14, 2006, 07:10:18 PM
Well were sure interrested in a new colony game! :D

Post updates by all means, start a wiki page for the colony game.
Title: New Colony Game
Post by: Eddy-B on January 15, 2006, 10:22:48 AM
I find myself slowing down the AI to be able to have it beatable.
Not even the best player can keep up with the perfect AI, since the AI could start building new units the moment the SF/VF becomes available. Same goes for research. A human takes time to click (even the fastest amoungh you!)

So .. i'll just have to let it run a couple more times to see how it does its thing.
I'm getting very close to the general AI. All i need now is a tub/wall routing algorythm (i believe hacker made one), and a way to determine suitable buildingspots. OP2 already has a way to find out which location is nearest.

I'm pretty sure, the code i have so far is already more advanced then any AI code ever written for Outpost2. In fact the original code by Dynamix isn't much of an AI.

----------------------
My progress today:
Rewritten the rest of the building placement code. I am not using the original code anymore, as supplied by the SDK, but my own routines. They are more elaborate, BUT they can do a lot more!
I even have the AI earthworkers build tubes as needed. This eliminates the cosmetic problem of tubes laying open for 100's of timemarks before they are actually needed (if ever).

----------------------
PS: it runs beyond mark 600 without any problems. And i think it's pretty unbeatable by now :D
Title: New Colony Game
Post by: wizisi2k on January 15, 2006, 10:45:12 AM
unbeatable? u better make different dificulty settings so that it CAN be beatable just not get rid of the code- but make it so on certain difficulty lvls the human player has a LITTLE bit more of an edge (ie more ppl on easy and a VF and ADV lab in SF)
Title: New Colony Game
Post by: Leviathan on January 15, 2006, 11:32:17 AM
Great work :)

As i said for building locations, i think you should use a ini file for each map.
Title: New Colony Game
Post by: TH300 on January 15, 2006, 11:34:09 AM
Quote
unbeatable? u better make different dificulty settings so that it CAN be beatable just not get rid of the code- but make it so on certain difficulty lvls the human player has a LITTLE bit more of an edge (ie more ppl on easy and a VF and ADV lab in SF)
I agree.

I'd also like to see the "perfect ai" and watch Levi try beating it. or probably just watch two perfect ais fight each other. Of course I would only ever play easy.
Title: New Colony Game
Post by: Eddy-B on January 15, 2006, 02:39:44 PM
Those are good ideas :)
I have slowed down research to give a human the chance to keep up. When research is slower than production it slows down the entire operation. Each difficulty setting has a reseach speed assigned to it. Obviously 'hard' is the fastest, but still much slower then it was before.

As time progresses, AI research will gradually speed up, the same it would with a human player creating more and more scientists.

---------------------
So far i've only been concerned with defensive units & base building. After that has been tested thoroughly i will start working on the offense.
Title: New Colony Game
Post by: Arklon on January 15, 2006, 03:04:43 PM
A human player can constantly pump out tigers from 6 different vehicle factories. More than six factories (MAYBE seven or possibly even eight if you are Supertypingman) are not needed as one of the factories will be done by the time you do all the hotkey'ing at the others.
Title: New Colony Game
Post by: Eddy-B on January 15, 2006, 04:28:03 PM
got ur point!
for you, i will create a "HARD" version :D
Title: New Colony Game
Post by: Eddy-B on January 20, 2006, 12:53:58 PM
Time for an update:
------------------------

Worked on it a few hours over the week.  It's been a pain in the royal butt to work with MSVC, when you're a) used to C-Builder for so many years and b ) have to use C-Builder 8 hours a day for your job...

But anyway: i got to fix a few bugs that i still had, and tweaked the AI structure building code somewhat to accept even more settings. I've had levi test an early version of the game, and we both kinda agree on the difficulty settings, althou leviathan was complaining he didn't have anough scientists... oh well that's life!  You wanna play with more colonists to start with: play a multi game! :P


This week i've updated the AI to include attack code. I've had some enjoyable time watching the AI's beat each other up!
Title: New Colony Game
Post by: Leviathan on January 20, 2006, 01:15:52 PM
Well whatevea the objective, population or starship its gonna take a long time to build up to that with the amount you start with, I only had 2 scientis on research by the time I had advanced lab, you very being the computer players, your gonna get overran prity quick and not be able to keep up.

But were c.

And y dont u just use C-Builder? :P
Title: New Colony Game
Post by: TH300 on January 20, 2006, 01:18:43 PM
Thats good, cous its more fun to start with very few ressources.
Title: New Colony Game
Post by: Mcshay on January 20, 2006, 01:24:08 PM
Quote
This week i've updated the AI to include attack code. I've had some enjoyable time watching the AI's beat each other up!
Do you think you could make a multi map with the AI after you finish the colony game? Perhaps you are on a team with one AI vs. another team with an AI. Or La Corrida or Peacekeeper updated would be nice.
Title: New Colony Game
Post by: Eddy-B on January 20, 2006, 02:48:13 PM
sounds like fun
i've been trying to set up this colony game as much 'general' as i can, so it can be used in other projects without having to change much. That's why i included so many new options for the base building structures.

As for levi's & TH300's remark: i also think it's more fun to start with low resources. I know you OP2-guru's like to have a quick game, without having to do much of the early researching.. and that's what the multi-levels are for.
The AI has no distinct advantage: it starts just the same way as the human player does, and i've managed to decrease the AI "cheat" level a lot! it does REAL research, and will not construct anything that it hasn't researched yet. I like a fair fight!
Title: New Colony Game
Post by: Eddy-B on January 22, 2006, 11:24:46 AM
I have rewritten most of the AI source file - resulting in 100's of errors that needed fixing. That took me the better part of an evening.
The result: a more readable/understandable source code package, so i can still use it after a year or so, without having to read thru my own code for days before it starts making sense again.


I've also redone the tube-placement code. Made it more economic. The old version placed tubes from center-point to center-point, while the new building that would occupy the spot would be placed on top of tubes that were just built. Now the code takes in account the size of the building when placing the connecting tubes. Still not 100% of the way i would like to see it, but it's a considerable improvement.  I know .. the 50 ore a tube costs won't bother the ai much, but when the earthworker is building the tube(s) a convec cannot build in that spot until the earthworker moves away. Outpost 2 has standard code that moves out any friendly unit when a new building needs to be placed, but that doesn't apply to a unit currently involved in construction of its own (including tubing).
Title: New Colony Game
Post by: Chevy_Camaro on January 22, 2006, 05:37:19 PM
i am very eager to see your AI in use when you are finished
Title: New Colony Game
Post by: Leviathan on January 22, 2006, 06:06:01 PM
Sounds great.

Yea i was gonna say why does that earthy build the tube from the gp to the new smelter location at the top location wen the smelter is just gonna get placed over it.

Great improvment!
Title: New Colony Game
Post by: Eddy-B on January 23, 2006, 01:21:41 PM
I've been thinking about supplying my AI with a new pathfinding algorythm (hacker's). This would further economize the use of tubes. It also opens up opportunities for dynamic building placement: the AI now has a set of predetermined spots it can choose from. This works well, but it's a lot of work creating the list of spots, using map printouts; it takes me upto an hour to work out 1 complete base. It would be better if the AI can (partly random) figure out its own building spots.

Most code associated with the AI is written in a general fashion, and can almost directly be used in other maps, with minor changes. This will probly only mean i will get 101 requests for map-AI's - colony and multi - but after the release of this colony mission, i will first continue with the Renegades campaign. I know all of you would want some more AI's, but please do not beg!
Title: New Colony Game
Post by: op2rules on January 23, 2006, 03:31:13 PM
B) Great work! Keep us posted Please! I can't wait to test it out!
Title: New Colony Game
Post by: dm-horus on January 24, 2006, 12:01:12 PM
would it be possible to make modifications so human players can ally or begin a game allied with an ai?

or should i put this in another thread? :P
Title: New Colony Game
Post by: Eddy-B on January 25, 2006, 04:42:41 PM
Quote
would it be possible to make modifications so human players can ally or begin a game allied with an ai?

or should i put this in another thread? :P
probably..

-------------------
since yesterday i have again a nasty crash from within OP2. I haven't been able to find it yet. Yesterday i wasn't feeling too well, and i spent an hour or so on it today and got bored with it, so i stopped and started watching some B5 & browsing the internet.   I think i'll put it off until the weekend, and get a good night sleep tomorrow, i need it.

I also have a revisit of the renegades campaign planned for this weekend, and hopefully wioll get it ready for release (with the new mod-pack hacker designed).

More on that later, on the renegades' forum!
Title: New Colony Game
Post by: Eddy-B on February 20, 2006, 01:40:12 PM
I will start working on the Colony game again this week, after i've updated some Renegades missions to work out a few problems that effect gameplay.
-> taking out the mission 3 crash will be harder then just a few hours work, since i still can't figure out why it happens: it doesn't happen all the time and it seems to happen at a random time as well.

-----------------------------------------------------
UPDATE:

This colony game is a step closer to a standard-AI as you have read above.
As such i will try to set up a scripting language to use with a pre-defined DLL.
It will probably still need the (cmd-line) msvc compiler to create a usable dll, but i'll know more after i'm done working out the AI itself.
Title: New Colony Game
Post by: Vexhare on March 29, 2006, 10:38:06 AM
I like the sound of this colony game.  Any idea as to what the objective is?  
Title: New Colony Game
Post by: Eddy-B on April 02, 2006, 05:10:14 PM
what about "kill the enemy"?

there's been a debate wether this should be kill the enemy or a spacerace, and i think people want a LoS type of game ..
Title: New Colony Game
Post by: Vexhare on April 03, 2006, 10:29:03 AM
Guess we will see.
Title: New Colony Game
Post by: instigator on April 04, 2006, 10:55:02 AM
hmm how is this going?
Title: New Colony Game
Post by: Eddy-B on April 06, 2006, 12:54:03 AM
I've stopped it for a while, to work on the Scripter project, and with it my website 7 another short project to edit/create this website...  i guess i jump from 1 project to another, but once they done, i'll jump back, and will end up with the Renegades Colony game again.

So far, the website is progressing nicely, and i'm pretty pleased about my Eddytor so far, so i think i'll get back to the Scripter soon.
Title: New Colony Game
Post by: Vexhare on April 06, 2006, 02:54:20 PM
I'm lookin forward to this colony game.. .shall make me happy.