Author Topic: Random Map Generator  (Read 2616 times)

Offline Combine Crusier

  • Sr. Member
  • ****
  • Posts: 456
Random Map Generator
« on: May 19, 2007, 10:04:41 AM »
Last night I had an idea! Why can't we set up a random map generator for
Outpost 2!

The way this could be achieved is by telling the computer what tiles are suppost to surround a certain type of tile, kind of like telling it what to surround that tile with.... We could mark certain tiles and also put certain tiles into a group so when several kinds of a tile can surround a tile already generated it can randomly pick one from a designated tile grouping!

I have experience in programming java but this is WAY out of my league!
Fire at will!

Offline Hooman

  • Administrator
  • Hero Member
  • *****
  • Posts: 4955
Random Map Generator
« Reply #1 on: May 19, 2007, 10:52:27 AM »
This has already been done. Although, the data set used wasn't the best, so the results weren't exactly spectacular. If someone ever feels like sitting down and creating a list of what tiles can be placed next to what other tiles, then we have code to do this.

Keep in mind there are 4 directions in which you can consider tiles to be adjacent, and there are about 2000 tiles in the tileset. It's a bit of work to make a complete list of what can go next to what, although somewhat possible for someone to do.


As a side note, the original data set was generated by scanning the original maps to see what tiles *have* been placed next to what other tiles. But there are a significant number of errors in the original maps. It seemed a lot of those not quite right tiles were selected during tile placement.

I had another idea to somehow use the data from the tile groups found at the end of the map files, but never got around to it. I suppose it can be automated to some extent, but I suspect it's going to amount to someone sitting down and going through a ton of possibilities.
 

Offline Mcshay

  • Administrator
  • Sr. Member
  • *****
  • Posts: 404
Random Map Generator
« Reply #2 on: May 20, 2007, 06:35:23 AM »
I'm already in the process of making a random map gernerator. It uses a data file to see which tiles will fit with the next tile being placed, and so on.

Offline Hooman

  • Administrator
  • Hero Member
  • *****
  • Posts: 4955
Random Map Generator
« Reply #3 on: May 20, 2007, 11:52:22 AM »
How is the data being generated? Just a hand made list? How are you deciding what can go where?

Offline Arklon

  • Administrator
  • Hero Member
  • *****
  • Posts: 1269
Random Map Generator
« Reply #4 on: May 20, 2007, 02:07:40 PM »
Quote
How is the data being generated? Just a hand made list? How are you deciding what can go where?
Mcshay is obsessed with pseudo-randomness.

Offline Combine Crusier

  • Sr. Member
  • ****
  • Posts: 456
Random Map Generator
« Reply #5 on: May 21, 2007, 08:16:53 AM »
Sweet!
Fire at will!

Offline Mcshay

  • Administrator
  • Sr. Member
  • *****
  • Posts: 404
Random Map Generator
« Reply #6 on: May 25, 2007, 09:31:31 AM »
Quote
How is the data being generated? Just a hand made list? How are you deciding what can go where?
The data is generated by a program i wrote that looks at each time and sees if it will fit with every other tile, and then saves all the matches each tile has to right right and to the bottom into a .dat file. The only problem with this program is that it's very hard to find the right method to compair the tiles.

Offline Hooman

  • Administrator
  • Hero Member
  • *****
  • Posts: 4955
Random Map Generator
« Reply #7 on: May 25, 2007, 10:49:20 PM »
Yeah, I tried an automated way by comparing the pixel data to see if it matched up nicely, but it produced horrible results. Scanning the existing maps worked much better, but again, still picks up on the errors in the original maps. I think the best way is just to somehow use the tile groups to generate the needed data.