Map generator 2.0

martijntje

L8: Fancy Shmancy Member
Aug 2, 2009
539
334
After looking at old posts of mine, I found that I once made a random map generator (http://forums.tf2maps.net/showthread.php?t=11564)

However that program did not really produce anything useful and I no longer had the source code, so today I decided to write a new map generator.

So today I got the basics coded and wrote a simple terrain generator. Basicly it is a python script that writes a vmf file that can be opened by hammer and then compiled,
1024x576.resizedimage


Unfortunalty I already faced a lot of problems, most notacibly the long compile times. I had planned to make a full tf2 styled map (minus objectives and spawns). For instance I wanted to generate bridges and towers such as at gravelpit point c. However seeing as how this simple map already took 9 minute to compile, I would have to make some huge optimizations to make a more complicated map feasable.
1024x576.resizedimage


Now the maps that it generates is functional, not very playable. The higher areas are only reachables by demoman and soldiers (and scouts with FaN).

Some more pictures
http://steamcommunity.com/sharedfiles/filedetails/?id=159083482
http://steamcommunity.com/sharedfiles/filedetails/?id=159083603

Size when compared to a soldier
http://steamcommunity.com/sharedfiles/filedetails/?id=159082550
http://steamcommunity.com/sharedfiles/filedetails/?id=159082463

If you want to check it out for your self, the code will be publicly available at
https://github.com/martijnterpstra/mblock/blob/master/mblock.py

In the next version I will probably make the terrain smoother (there are already way too many minecraft themed maps) and make everything more optimized.
 

YM

LVL100 YM
aa
Dec 5, 2007
7,135
6,056
Terrain -> displacements.

Displacements seem pretty simple to generate with code.
 

henke37

aa
Sep 23, 2011
2,075
515
Maybe you should focus on useful geometry. Like say, buildings.
 

Penguin

Clinically Diagnosed with Small Mapper's Syndrome
aa
May 21, 2009
2,039
1,484
compile times would be shorter if you made bushes into details.
 

martijntje

L8: Fancy Shmancy Member
Aug 2, 2009
539
334
I have tried using displacements, however have not got them to work just yet.

I have optimized it a bit. The compile time is now down to a reasonable amount. Because of this I was able to increase the size and detail of the map. Right now it generates maps of 8192x8192 hammer units in size and 4096 hammer units tall.

3E4EDD0E5BDE6C4212A5E928AC6739B3ADDDDB90

Also I started experimenting with adding water (you can see a "river" in the background)

Next I will probably start adding props. If that works I will see if I can implement some map objectives. I Probably start with arena mode.
 

henke37

aa
Sep 23, 2011
2,075
515
Try having less mismatched cubes and more of a structured layout. You know, things like houses.
 

jakoman

L1: Registered
Nov 9, 2012
39
2
I could see this being more useful in its current state for inspiring layouts than actually serving as them. Still really cool though.
 

YM

LVL100 YM
aa
Dec 5, 2007
7,135
6,056
Why do you have a brush definied twice, once for regular brushes and once for func_details? Surely I'd be better to define a brush, and then define the entity wrapper that goes around it.