Author Topic: Outpost 2 Coding 202: Part 1  (Read 5882 times)

Offline CK9

  • Administrator
  • Hero Member
  • *****
  • Posts: 6257
    • http://www.outpost2.net/~ck9
Outpost 2 Coding 202: Part 1
« Reply #25 on: April 10, 2011, 01:00:01 AM »
Maybe it would be better to assign people to things.
CK9 in outpost
Iamck in runescape (yes, I still play...sometimes...)
srentiln in minecraft (I like legos, and I like computer games...it was only a matter of time...) and youtube...
xdarkinsidex on deviantart

yup, I have too many screen names

Offline Sirbomber

  • Hero Member
  • *****
  • Posts: 3170
Outpost 2 Coding 202: Part 1
« Reply #26 on: April 10, 2011, 06:05:46 AM »
Well, so far all I'm hearing is "I don't have time" or "I can't help" or "I'm useless" so I have a feeling this little experiment is about to come to a screeching halt.
"As usual, colonist opinion is split between those who think the plague is a good idea, and those who are dying from it." - Outpost Evening Star

Outpost 2 Coding 101 Tutorials

Offline TH300

  • Hero Member
  • *****
  • Posts: 1425
    • http://op3game.net
Outpost 2 Coding 202: Part 1
« Reply #27 on: April 10, 2011, 02:52:54 PM »
I would be willing to do the Dijkstra thing that I described. But I'll need at least a few weeks.

To be more specific: I'd prefer this project to be deadline-less. If people really want it, it will be completed. This ensures that people get as many chances to work on it as possible.

Offline jcj94

  • Sr. Member
  • ****
  • Posts: 407
    • http://techfusion-279.com
Outpost 2 Coding 202: Part 1
« Reply #28 on: April 10, 2011, 03:47:29 PM »
Assign me something.  I'll put some of my other projects on hold (mostly the truckloads and clone wars)

Offline Sirbomber

  • Hero Member
  • *****
  • Posts: 3170
Outpost 2 Coding 202: Part 1
« Reply #29 on: April 10, 2011, 09:06:37 PM »
Okay TH300.  We won't go by deadlines, as long as people don't take that as an excuse to slack off.  You're in charge of the Dijkstra pathfinding.  This is supposed to find the "real" distance between points on the map AND figure out which parts of the map are unreachable, right?

JCJ, you're with ECC.  I want you two to figure out how to find good base locations.  Bonus points if you can get the AI to determine good sites for its primary base and expansions.  We'll use what you do to look into enemy bases later.  Good luck.

CK9, you're interested, right?  Want to help me with bottleneck identification?

Anyone else who wants to help, let me know.  If you can't help, feel free to add to the discussion/provide advice (especially for the bottleneck stuff, we'll want a lot of input on what should/shouldn't be considered).
"As usual, colonist opinion is split between those who think the plague is a good idea, and those who are dying from it." - Outpost Evening Star

Outpost 2 Coding 101 Tutorials

Offline TH300

  • Hero Member
  • *****
  • Posts: 1425
    • http://op3game.net
Outpost 2 Coding 202: Part 1
« Reply #30 on: April 11, 2011, 02:19:07 AM »
Quote
Okay TH300.  We won't go by deadlines, as long as people don't take that as an excuse to slack off.  You're in charge of the Dijkstra pathfinding.  This is supposed to find the "real" distance between points on the map AND figure out which parts of the map are unreachable, right?
It will certainly do that. And it can possibly be extended to do more, like location of bottlenecks, base locations etc. For base locations I have an idea already (which is similar to what Hooman described), for bottlenecks I have no idea, yet.

Offline jcj94

  • Sr. Member
  • ****
  • Posts: 407
    • http://techfusion-279.com
Outpost 2 Coding 202: Part 1
« Reply #31 on: April 11, 2011, 06:51:30 AM »
Thanks Sirbomber!  I'll get to work on that ASAP.  ECC you better be ready :P

Offline evecolonycamander

  • Hero Member
  • *****
  • Posts: 605
Outpost 2 Coding 202: Part 1
« Reply #32 on: April 11, 2011, 02:29:13 PM »
Quote
ECC you better be ready :P
sorry, but im having a lot of trouble in that area, so i'll list my ideas here. argue as you see fit

a good location consists of one ore more of the following:
-space for a growing colony
-moderate to good ore(2-3 bar OR many ore spots)
-easily defendable
-far from opponents
-close to allies
-away/not on lava possible tiles

bad locations:
-small space
-'junked up' locations(cant build in a spot with lots or rocks)
-low ore(1 bar or NO spots)
-wide open(middle of a plane allowing for attacks from all sides)
-near/next to opponents
-magma field
''The blight cant get us up here!''
-famous last words
--------------o0o--------------
Outpost 2: EoM project status: Re-planning

Offline Spikerocks101

  • Hero Member
  • *****
  • Posts: 714
Outpost 2 Coding 202: Part 1
« Reply #33 on: April 11, 2011, 05:30:06 PM »
I guess I will help. Give me something to do.
I AM YOUR PET ROCK!!!!!!

Offline Sirbomber

  • Hero Member
  • *****
  • Posts: 3170
Outpost 2 Coding 202: Part 1
« Reply #34 on: April 11, 2011, 07:08:43 PM »
Since ECC is bailing, help JCJ.
"As usual, colonist opinion is split between those who think the plague is a good idea, and those who are dying from it." - Outpost Evening Star

Outpost 2 Coding 101 Tutorials

Offline CK9

  • Administrator
  • Hero Member
  • *****
  • Posts: 6257
    • http://www.outpost2.net/~ck9
Outpost 2 Coding 202: Part 1
« Reply #35 on: April 11, 2011, 09:49:53 PM »
Sure, Would you rather me help by coding or creating something to test the coding?
CK9 in outpost
Iamck in runescape (yes, I still play...sometimes...)
srentiln in minecraft (I like legos, and I like computer games...it was only a matter of time...) and youtube...
xdarkinsidex on deviantart

yup, I have too many screen names

Offline evecolonycamander

  • Hero Member
  • *****
  • Posts: 605
Outpost 2 Coding 202: Part 1
« Reply #36 on: April 14, 2011, 01:29:20 PM »
Quote
Since ECC is bailing, help JCJ.
no, my time is limited again. i cant believe when i was IN school i had more time.... such cruel irony.

anyhow, i think another location should be recognized in finding a good colony spot. lava plains WHERE the lava can be used as protection instead of a hazard.
''The blight cant get us up here!''
-famous last words
--------------o0o--------------
Outpost 2: EoM project status: Re-planning

Offline CK9

  • Administrator
  • Hero Member
  • *****
  • Posts: 6257
    • http://www.outpost2.net/~ck9
Outpost 2 Coding 202: Part 1
« Reply #37 on: April 18, 2011, 10:37:50 AM »
on that note, IF lava can flow at all should be noted (IE: if disasters are on or off)
CK9 in outpost
Iamck in runescape (yes, I still play...sometimes...)
srentiln in minecraft (I like legos, and I like computer games...it was only a matter of time...) and youtube...
xdarkinsidex on deviantart

yup, I have too many screen names

Offline Sirbomber

  • Hero Member
  • *****
  • Posts: 3170
Outpost 2 Coding 202: Part 1
« Reply #38 on: April 18, 2011, 01:43:08 PM »
That's a bad idea, since there's nothing forcing the level designer to pay attention to that option's setting.

Edit: Oh, didn't see your earlier respond CK9.  Let's stick to coding; I think the maps we have will be enough for now.  I'll PM you some more stuff.
« Last Edit: April 18, 2011, 01:43:54 PM by Sirbomber »
"As usual, colonist opinion is split between those who think the plague is a good idea, and those who are dying from it." - Outpost Evening Star

Outpost 2 Coding 101 Tutorials

Offline jcj94

  • Sr. Member
  • ****
  • Posts: 407
    • http://techfusion-279.com
Outpost 2 Coding 202: Part 1
« Reply #39 on: April 18, 2011, 03:27:02 PM »
Quote
That's a bad idea, since there's nothing forcing the level designer to pay attention to that option's setting.
 
Like in my current edit (not distributed, as its kinda buggy) of the 2 player map.  I have disasters weather they are on or not, but then I have MORE if they ARE on.

Offline TH300

  • Hero Member
  • *****
  • Posts: 1425
    • http://op3game.net
Outpost 2 Coding 202: Part 1
« Reply #40 on: April 18, 2011, 11:16:51 PM »
Quote
That's a bad idea, since there's nothing forcing the level designer to pay attention to that option's setting.
That is true. Nontheless I believe that knowledge of whether and when lava occurs on the map can be a huge advantage. We should add some interface to the ai api that allows the mission designer to make the ai aware of this.
« Last Edit: April 18, 2011, 11:17:33 PM by TH300 »

Offline Sirbomber

  • Hero Member
  • *****
  • Posts: 3170
Outpost 2 Coding 202: Part 1
« Reply #41 on: April 19, 2011, 06:25:13 AM »
That'd be great, if there weren't already a bunch of levels that can have lava flows on them.  I wonder if we can scan a DLL to check if it has any calls to eruption/Blight stuff?  Maybe BB can help us out there.
"As usual, colonist opinion is split between those who think the plague is a good idea, and those who are dying from it." - Outpost Evening Star

Outpost 2 Coding 101 Tutorials

Offline jcj94

  • Sr. Member
  • ****
  • Posts: 407
    • http://techfusion-279.com
Outpost 2 Coding 202: Part 1
« Reply #42 on: April 19, 2011, 01:38:31 PM »
MY thoughts so far...



RULES FOR GOOD MAIN BASE FINDING:

1: Several Ore Deposits Nearby (using path finding techniques)
2: Large enough space to build essential and "morale" buildings.
3: Bottlenecks or other Defend-able terrain (ie being on a "mountain" or in a "pit")
4: Preferably fast travelabe terrain (ie Sand, or bulldozed locations)
5: Old location of destroyed player base.  (hey, there's rubble, and there's bulldozed locations where everything fits, why not move in?)
6: Goldilocks Distance from players. (Not to far, not to close)
7: Low entrance # (Don't want to get swarmed now)
8: Near Allies, but not over top. (nuff said)
9: A good Tok storage facility (Some cliff-cave that wont get in the way of building main base to much)
10: Somwhere for the agridoms to reside (starving colonists = unproductive)

RULES FOR GOOD POST/ ORE BASE FINDING:

1: Several Ore Deposits
2: Defendable, but less so then main.
3: Bottlenecks PREFFERED (not necisarry)
4: DEFINATLY FAST PASSABLE TERRAIN (bulldoze if necissary)
5: A small section of destroyed enemy/ ally base
6: As far away from enemys as possible
7: Somewhere not many people "scan" to see whats going on there (ie out of the way of main battle area)

RULES FOR GOOD VECH/ ATTACKBUILDER BASE FINDING:

1: Either easy tube or defendable location for second CC
2: Nowhere NEAR as defendable (not req at least because of the unit production)
3: Avoid REVERSE bottlenecks (ones that work against you)
4: Again FAST PASSABLE a must here, however, bulldozing isn't neccisary
5: Large area for unit storage (like off to the side/behind or simalar)
6: If you can, right in front of enemy base (your thinking OH ***, the AI is thinking what unit to destroy you with)
7: Easily accessible (as in, you can manuvere around inside)for allies and units.
 

Offline TH300

  • Hero Member
  • *****
  • Posts: 1425
    • http://op3game.net
Outpost 2 Coding 202: Part 1
« Reply #43 on: April 19, 2011, 01:52:26 PM »
Nice list, but it seems longer than needed. Focus on the important things:
- good ore
- defendability
- enough space
Everything else is probably only a nice addition and will likely slow down the ai more than it helps.

Also, get priorities right: ore is probably almost the most important thing, since it determines how big your army will be.

Offline jcj94

  • Sr. Member
  • ****
  • Posts: 407
    • http://techfusion-279.com
Outpost 2 Coding 202: Part 1
« Reply #44 on: April 19, 2011, 05:52:09 PM »
I didn't priotize, I just kinda listed as I went.

But These are for optimal base, not necisarrily the "quick build"

Offline evecolonycamander

  • Hero Member
  • *****
  • Posts: 605
Outpost 2 Coding 202: Part 1
« Reply #45 on: April 19, 2011, 08:05:04 PM »
ok, first things first, WHAT are the minimal requirements for ANY base.
Common ore smelter
Command center
Agridome
structure factory
tokimak
1 robo surveyor
1 cargo truck
1 convec
1 robo miner(or common ore mine)
13 scientists
25 workers

correct me if im wrong
 
''The blight cant get us up here!''
-famous last words
--------------o0o--------------
Outpost 2: EoM project status: Re-planning

Offline TH300

  • Hero Member
  • *****
  • Posts: 1425
    • http://op3game.net
Outpost 2 Coding 202: Part 1
« Reply #46 on: April 20, 2011, 12:35:20 AM »
For any base you really only need a Command Center.

For a main base you need:
Common Smelter
Common Mine (or surveyor + miner)
Command Center
Structure Factory
Tokamak (or other power source)
1 Truck
1 Convec
Agridome depends on the amount of stored food and can be built later

For a mining base Agridomes and Tokamaks are not required, and a Structure Factory is optional.

For a military outpost, only a Command Center and Vehicle Factories are required.

This does not mean that other structures may not be built and it will usually be a good idea to build a Structure Factory in any base, but it should certainly not be the first thing that the ai cares about.

And note, that structures which have a mere global influence (like Agridomes and Tokamaks) should not be considered a necessity for a particular base, but for all bases together. It usually makes sense to build those in the most secure base, although the power and food may be consumed elsewhere.
« Last Edit: April 20, 2011, 12:39:19 AM by TH300 »

Offline evecolonycamander

  • Hero Member
  • *****
  • Posts: 605
Outpost 2 Coding 202: Part 1
« Reply #47 on: April 20, 2011, 01:10:51 AM »
Ok, so now that the basics are established, what is the minim for a colony of that size? the AI MUST be able to reconize a base location with the minim if it is to survive when no better location exists
 
''The blight cant get us up here!''
-famous last words
--------------o0o--------------
Outpost 2: EoM project status: Re-planning

Offline jcj94

  • Sr. Member
  • ****
  • Posts: 407
    • http://techfusion-279.com
Outpost 2 Coding 202: Part 1
« Reply #48 on: April 21, 2011, 01:13:10 PM »
For a TIGHT base (one where ALL BUILDINGS are as tight as possible while still allowing transportation, including Solar/Tok/Other power and without mines) it will fit in a rectangle 36x16.  

I have yet to do a base where the ADV lab and Spaceport Are far enough away and one where ore distance is calculated in.  

But you wanted MINIMAL distances/sizes.

Offline TH300

  • Hero Member
  • *****
  • Posts: 1425
    • http://op3game.net
Outpost 2 Coding 202: Part 1
« Reply #49 on: April 21, 2011, 03:50:03 PM »
Don't expect to get a rectangular spot for your base. Expect other shapes. Don't do exact calculations. They're too time consuming. Count the number of passable tiles and expect that they have a shape that supports a base (not taking into account terrain formations for defense). I might add a function for this or part of it to the pathfinding class that I am writing.
« Last Edit: April 21, 2011, 03:51:10 PM by TH300 »