Author Topic: Random Map Generator  (Read 7736 times)

Offline Sirbomber

  • Hero Member
  • *****
  • Posts: 3238
Random Map Generator
« on: July 14, 2007, 09:59:12 AM »

In case the picture doesn't show up...

Mcshay Makes Bold New Discovery

After numerous false promises and delays, Mcshay has announced the development of a Random Map Generator. Although details are known only to a select few, Mcshay declared, "It's not ready yet, but we're all very excited about it. This will revolutionize Outpost 2 multiplayer. No longer will we be forced to play on the maps we've had for almost ten years now." As usual, colony opinion is divided with half of the population protesting the Random Map Generator as abandoning our traditional roots while the other half hails it as the beginning of a glorious new era, though in a rare moment of unison nearly everyone in the colony wants to know what "Outpost 2 multiplayer" even is. When interviewed, our fearless leader replied, "I have absolutely no idea. Go away." Mcshay agreed to keep the Evening Star updated as the project neared completion.
"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 Brazilian Fan

  • Sr. Member
  • ****
  • Posts: 302
Random Map Generator
« Reply #1 on: July 16, 2007, 06:30:16 AM »
What?

Offline Leviathan

  • Hero Member
  • *****
  • Posts: 4055
Random Map Generator
« Reply #2 on: July 16, 2007, 01:59:41 PM »
:D

Offline acid101

  • Newbie
  • *
  • Posts: 36
Random Map Generator
« Reply #3 on: July 19, 2007, 09:50:30 AM »
Thats sick!!! finally!! no more same old same old!

Offline Quantum

  • Full Member
  • ***
  • Posts: 135
Random Map Generator
« Reply #4 on: July 20, 2007, 12:39:26 AM »
AWESOME


 (thumbsup)  
This conversation did not happen, the gun that I have in my hand is not real and the Presidents book does not exist.

Offline Mcshay

  • Administrator
  • Sr. Member
  • *****
  • Posts: 404
Random Map Generator
« Reply #5 on: July 21, 2007, 05:23:08 PM »
Update:

I'm planning on making different versions of the Random Map Generator (RMG), one for multiplayer games, one for making maps, etc. All of these versions will use data created by a separate program I spent the last few weeks making (the Tile Grouper).

[size=8](If you just want to see my progress on the actual RMG skip down to its section, otherwise you can read the next section on the data used to make maps.)[/size]

Quote

The Grouper is a tool that exists to help its user categorize tiles into groups according to their use. There are three types of groups tiles can belong to. Groups are further organized by 'tile types' which can be simply called tile colors (ie: White tiles, Orange tiles, etc.). The three groups are Bin Groups, Edge Groups, and Block Groups.

Bin Groups

Screenshot

Bin Groups are simply collections of tiles that can be substituted for one another, meaning that they are all very similar to each other. Bin Groups are what make up the majority of the ground tiles.

Edge Groups

Screenshot

Edge Groups hold all of the tiles that connect two different Bin Groups from two different Tile Types. Each member in an Edge Group has a fraction that describes its edges in terms of the two Tile Types it contains.

Block Groups

Screenshot

Block Groups are rectangular arrangements of tiles that form things like rocks, crevasses, craters, etc. Each group holds many separate blocks that are related to one another (for example, one might hold all white rocks). Each block can be resized using the mouse on the arrows at the corners. New tiles are at first painted blue symoblizing that they have had no value yet. If the blue remains it will be filled with random tile that fits with the group by the RMG.


Quote

There's not much I can say about the RMG yet, since it's not done. However i can say   that it will first create a rough outline of the map. To quickly summarize the outlining code, the RMG fills blocks of the map with a Tile Type (white, orange or black) and then precedes to half each block and randomly choses which Tile Type each fourth of the block will be based on the surrounding 8 blocks and itself (this makes it only semi-random, since one color will be favored if there is more of that color around it). This process ends when the blocks are all one tile wide.

Here are four test outlines:



The next step for me is creating the code that uses the outline and the groups from the Grouper to flesh out the map and add cliffs and rocks, etc.
« Last Edit: October 13, 2007, 01:25:30 AM by Mcshay »

Offline Arklon

  • Administrator
  • Hero Member
  • *****
  • Posts: 1269
Random Map Generator
« Reply #6 on: July 21, 2007, 11:07:56 PM »
Just in case any of you are wondering, no, you won't be able to see the "steps" of the generation process in the final version like you do in the test mission, that's just so you can see kinda how it works.
(If I were you, Mcshay, I would've made the test mission a colony game so people don't have to figure out how to use the debug menu. :P)
« Last Edit: July 21, 2007, 11:09:11 PM by Arklon »

Offline Sirbomber

  • Hero Member
  • *****
  • Posts: 3238
Random Map Generator
« Reply #7 on: July 31, 2007, 12:36:25 PM »
He's still working on it, but he's hit a few problems because the Dynamix transitions suck. Other than that it's looking very good though.
« Last Edit: October 12, 2007, 12:45:43 AM 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 Leviathan

  • Hero Member
  • *****
  • Posts: 4055
Random Map Generator
« Reply #8 on: July 31, 2007, 05:46:38 PM »
Great work :)

Offline CK9

  • Administrator
  • Hero Member
  • *****
  • Posts: 6226
    • http://www.outpost2.net/~ck9
Random Map Generator
« Reply #9 on: July 31, 2007, 05:56:58 PM »
:o

Mcshay, that's awesome!  Just 1 question though:  Have you and hacker thought about working together to make it so it can integrate with the mapper and auto-fill areas of maps that we build?  (I need an auto-region filler for my bigger maps, otherwise they look like cowpies :( )
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: 3238
Random Map Generator
« Reply #10 on: July 31, 2007, 07:29:03 PM »
What Mcshay is planning on doing is having two different generators. One will be a single player version found under the Colony Game menu where you can play around with the settings and save maps you like (then edit them in the mapper if you want or, in your case CK9, just copy/paste certain chunks into your existing maps) and another will be a multiplayer DLL that just generates a map and plays like a standard game after that.

I think anyways...

Hacker just doesn't have the time to work on Mapper lately, what with his job and all, so don't expect any integration between RMG and OP2 Mapper. I could be wrong though.
"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 Mcshay

  • Administrator
  • Sr. Member
  • *****
  • Posts: 404
Random Map Generator
« Reply #11 on: July 31, 2007, 07:45:01 PM »
As my official spokesman has said, there will be a version for editing maps in single player. I hope to have it be able to create a normal random map, create maps using a 'paint by numbers' scheme, and also be able to save map files.

That means you could make a map in the RMG and then edit it in the Mapper, but not the reverse.

Although, it would not be too hard to change that, i could simply only randomize the blue squares.

Offline Mcshay

  • Administrator
  • Sr. Member
  • *****
  • Posts: 404
Random Map Generator
« Reply #12 on: August 01, 2007, 09:28:50 PM »
Update!

I've finally got a decent edging system down. This update is a bit larger file-wise though; however, it is definitely worth it.

To use it, simply find it on the Colony Games list. This version uses HFL to allow the user to resize the map (essentially, it reloads a different map file from the Addon folder). Here's a brief summary of the options in changing the map:

Width: Simply, the map width. A width of 512 creates a world map.
Height: Map Height.
Blk Size: The size of the initial random samples, a larger size means there are less 'continents', however they are larger and more detailed.
The three color Bias sliders: A neat way to influence the way the RMG seeds the map. a higher Bias means a color has a higher chance of being picked. The actual probability is the value for the color in question over the sum of all three values.

Edit: Here's a picture:
« Last Edit: October 13, 2007, 01:24:48 AM by Mcshay »

Offline Sirbomber

  • Hero Member
  • *****
  • Posts: 3238
Random Map Generator
« Reply #13 on: August 06, 2007, 06:59:58 PM »
There has been progress in the last few days, just not much really worth mentioning. Debugging and other stuff you probably wouldn't find very interesting, unless you were op2hacker or Hooman.
"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 Hooman

  • Administrator
  • Hero Member
  • *****
  • Posts: 4955
Random Map Generator
« Reply #14 on: August 06, 2007, 11:08:26 PM »
Yes, but since op2hacker and Hooman are part of your audience, do tell.  :)  

Offline Sirbomber

  • Hero Member
  • *****
  • Posts: 3238
Random Map Generator
« Reply #15 on: August 07, 2007, 08:10:42 AM »
Oh, uh... I don't actually know the debugging details Hooman...
I never bothered to ask.
But I think it involves a mop.
« Last Edit: August 07, 2007, 08:11:18 AM 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 Mcshay

  • Administrator
  • Sr. Member
  • *****
  • Posts: 404
Random Map Generator
« Reply #16 on: August 07, 2007, 03:13:59 PM »
Quote
Yes, but since op2hacker and Hooman are part of your audience, do tell.  :)
Nothing really major so far, just doing some minor debugging and expanding on existing code. For example, I had to refine the way it makes the rough map outline to prevent a 'fight' between two different tiles (the algorithm would switch the tile between two different types).

Here's the status of the multiplayer RMG version.

Quote

The Map:
Primary Tiles: Completed
    - White Completed
    - Orange Completed
    - Black Completed
    - Dark Black Completed

Secondary Tiles: Completed
    - Vegetation Completed
    - Wavy Orange Completed
    - Rough Black Completed
    - Ice Sheets: Completed

Cliffs: Not Started
    - Cliff Generation Not Started
    - Cliff Tiling Not Started

Doodads: Not Started
    - Volcanoes Not Started
    - Rocks Not Started
    - Cracks Not Started
    - Wreckage Not Started

The Mission:
Mission Details: Started
    - Cell Types Completed
    - Base Layouts Not Started
    - Base Path-checking Not Started
    - Second Game Setup Dialog Half-Done


[size=8]Orange used instead of yellow to increase readability on white themes.[/size]
« Last Edit: September 15, 2007, 08:45:29 PM by Mcshay »

Offline CK9

  • Administrator
  • Hero Member
  • *****
  • Posts: 6226
    • http://www.outpost2.net/~ck9
Random Map Generator
« Reply #17 on: August 07, 2007, 05:11:21 PM »
very nice, good luck on everything, we believe in you!

/me runs before anyone can comment on that cheesy moment
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 Hooman

  • Administrator
  • Hero Member
  • *****
  • Posts: 4955
Random Map Generator
« Reply #18 on: August 07, 2007, 08:51:58 PM »
Are you planning to make use of the tile groups?

Side node: The tile groups were the extra data at the end of .map files that never got loaded by the game. They contain all the things like doodads, such as volcanos, cracks, craters, cliffs. Although, some mixing is need to really make full use of the cliffs. Plus, some groups contain similar single tiles, and others needed to be pasted as a whole. The second map editor made use of this info.
 

Offline Mcshay

  • Administrator
  • Sr. Member
  • *****
  • Posts: 404
Random Map Generator
« Reply #19 on: August 07, 2007, 11:47:51 PM »
Update!

Download
http://users.outpostuniverse.net/mcshay/RMG/RMG%20Test.rar

[size=8]Note: Extract to your Outpost 2 folder using WinRAR to use it.[/size]

This version contains the secondary tiles (vegetation, rough black, wavy orange), and also ice sheets. The dark black tiles have also been added to the primary tile section. These new features are controlled using two new options:

Ice Sheets: This check box simply toggles the use of ice. Maps with a width of 512 are world maps, and automatically have ice included.
Xtra BSz: I apologize for the many abbreviations on this one  :P. It simply is the size of initial samples of the secondary tiles.

Edit: I'm also going to be updating the chart I posted earlier as I work, so check it every other day or so to see what I haven't had time to post about.
« Last Edit: October 13, 2007, 01:25:55 AM by Mcshay »

Offline Savant 231-A

  • Sr. Member
  • ****
  • Posts: 486
    • https://www.outpost2.net
Random Map Generator
« Reply #20 on: August 08, 2007, 02:20:35 AM »
Quote
Update!

Download
http://users.outpostuniverse.net/mcshay/RMG/RMG%20Test.rar

[size=8]Note: Extract to your Outpost 2 folder using WinRAR to use it.[/size]

This version contains the secondary tiles (vegetation, rough black, wavy orange), and also ice sheets. The dark black tiles have also been added to the primary tile section. These new features are controlled using two new options:

Ice Sheets: This check box simply toggles the use of ice. Maps with a width of 512 are world maps, and automatically have ice included.
Xtra BSz: I apologize for the many abbreviations on this one  :P. It simply is the size of initial samples of the secondary tiles.

Edit: I'm also going to be updating the chart I posted earlier as I work, so check it every other day or so to see what I haven't had time to post about.
You sir, are a genius!
 (thumbsup)

(no really, I just want the maps :P)
Gordon Freeman, and mr. Crowbar would own Master Chief in any part of the day.
"Come here citizen."

"From the ashes of the collapse we seek to build a better world for all."

Offline Eddy-B

  • Hero Member
  • *****
  • Posts: 1186
    • http://www.eddy-b.com
Random Map Generator
« Reply #21 on: August 10, 2007, 06:15:20 PM »
This is getting interesting :)
i should pick up again on my AI stuff, to go with this random mapping, so we can finally have some skirmish games !
Rule #1:  Eddy is always right
Rule #2: If you think he's wrong, see rule #1
--------------------

Outpost : Renegades - Eddy-B.com - Electronics Pit[/siz

Offline Sirbomber

  • Hero Member
  • *****
  • Posts: 3238
Random Map Generator
« Reply #22 on: September 08, 2007, 03:24:11 PM »
This has gone far too long without an update!
Grass/shrubbery is finished and cliffs are being worked on as I speak... Er... type... You know what I mean...
It's looking good, so go get excited and support Mcshay or something.
Pie Chart's days are numbered.
"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 Leviathan

  • Hero Member
  • *****
  • Posts: 4055
Random Map Generator
« Reply #23 on: September 09, 2007, 07:54:57 AM »
Eddy-B good to see you around. Would love to see any more work from you :)

Mcshay its looking great. Another project from you coming along well.

Offline Mcshay

  • Administrator
  • Sr. Member
  • *****
  • Posts: 404
Random Map Generator
« Reply #24 on: September 15, 2007, 08:53:45 PM »
Not much has happened in the past few weeks, school started up again. Progress has also been slow in translating the cliff blueprints into actual cliffs. However I've made small changes such as: the vegetation is now nicer looking (as bomber mentioned), and the RMG is now smart enough to start with a larger map size if you have a screen width over 1200 (maps will have extra rows of tiles otherwise).

Quote

The Map:
Primary Tiles: Completed
    - White Completed
    - Orange Completed
    - Black Completed
    - Dark Black Completed

Secondary Tiles: Completed
    - Vegetation Completed
    - Wavy Orange Completed
    - Rough Black Completed
    - Ice Sheets: Completed

Cliffs: Started
    - Cliff Generation Completed
    - Cliff Tiling Started

Doodads: Not Started
    - Volcanoes Not Started
    - Rocks Not Started
    - Cracks Not Started
    - Wreckage Not Started

The Mission:
Mission Details: Started
    - Cell Types Completed
    - Base Layouts Not Started
    - Base Path-checking Not Started
    - Second Game Setup Dialog Half-Done