random map generator

adamspurgin

L1: Registered
Mar 22, 2010
42
1
i saw a thread somewhere on the site and it inspired me to get this started up: a random map generator.


i decided to make mine a little less random though. the one posted here just put blocks of random size across the map, whereas the program i'm working on is a bit smarter. i'm going to continue working on the decision making code until it actually produces decent maps.

this is what i have as of now:
out0000.png



i can control the size of the map, the size of each block, both vertically and horizontally. i can also control how many blocks appear on the map (by %).


i plan to fix up the textures quite a bit, as well as incorporating a pathfinding algorithm and maybe adding support for a second floor, complete with ramps. if you guys want to help out at all, let me know, my own programming experience is lacking somewhat.
 
Last edited:
Feb 14, 2008
1,051
931
Not to dishearten you... but all these random map generators are at the moment are just block producers, I mean, there really needs to be something more substantial before it becomes interesting. Hopefully you can get the actual layout thing working soon enough :rolleyes:
 

adamspurgin

L1: Registered
Mar 22, 2010
42
1
i'm planning on doing a lot to it.

by the end it should make semi-coherent maps, complete with control points and a world that is generated based on gameplay entities. i've got in mind some weighting algorithms that should get some interesting results.

do i expect it to create great, or even decent maps? no. but maybe some barely playable ones.
 

grazr

Old Man Mutant Ninja Turtle
aa
Mar 4, 2008
5,441
3,814
This is atleast the third/forth random map generator we've seen here.

Not that it's not an interesting concept, but... it's been done before, and several times.

edit: if you can control the size of each block, horizontally and vertically, doesn't that make this not random?
 
Last edited:

adamspurgin

L1: Registered
Mar 22, 2010
42
1
ok, that was poor wording bred from sleep deprivation. i'll be back to clarify that particular topic once i get some sleep, like 28 hours from now.
 
Last edited:

YM

LVL100 YM
aa
Dec 5, 2007
7,135
6,056
As long as you move into modular pieces from prefab .vmf files sooner than the other guys making random map generators you'll be onto a winner. Don't waste time dicking about making random shape and sized blocks, that's been done before and isn't in the slightest bit interesting.

Displacements and proper buildings (even if they're made of pre-made modular bits) are what will make your generator better than the previous ones. get on it!
 
Last edited:

Dr. ROCKZO

L8: Fancy Shmancy Member
Jul 25, 2009
580
159
I'd be impressed with something that could create a building out of 4 parts when given 8, or at least interested. Keep it up!
 

adamspurgin

L1: Registered
Mar 22, 2010
42
1
Displacements and proper buildings (even if they're made of pre-made modular bits) are what will make your generator better than the previous ones. get on it!

i know exactly how i could get displacements to work, the hard part(at the moment) would be recalculating the normals, i have no idea which formula to use. what i calculate to be the normal and what shows up in a .vmf file after manipulating a displacement by hand don't match up. it should be something like (.9 .55 1) but it's (0 0 -1). i could implement displacements in no time at all, but they would look crappy because the lighting would be off.

what i have now is basically a wall generator, not even a very good one as the walls just snake back on themselves over and over again. i still have plans for terrain and details, i just need to work out how they'll all fit together. i'm having the hardest time figuring out how to handle indoor spaces though. i don't know whether to just plop a "make_building(x1,y1,x2,y2)" function in there or to make a function to search for high walls with space between them and put a roof over it. the first would be much easier, but the second would produce much more interesting results.

ps: i appreciate the ideas you all are throwing at me. even if i threw away an idea thinking it would be beyond me, someone bringing it back up gets me thinking on it more, and the more i think about it the more it seems possible. i think i might be able to fit a few things in here that i didn't think i could do.
 
Last edited:

Tapp

L10: Glamorous Member
Jan 26, 2009
776
215
Focus on forming inspirational building shapes, rather than functionality and danger. The best use of a random map generator is mapping block.
 

adamspurgin

L1: Registered
Mar 22, 2010
42
1
24978240.png



randomly generated placement and height weight maps so far.

working on a simple pathfinding algorithm that doesn't take forever to ensure some path to the objectives/spawns. also working on implementing hollow buildings/structures


now compatible with CP, CTF, KOTH, working on payload.

i know what some of you want, but i don't don't feel i could live up to your expectations of a blocking program. generating genuinely original maps would require many more years education for me, i'm only a first year computer science major. besides, I don't feel that a computer program made by one student could ever compare to an intelligently designed map layout.
 
Last edited:
Feb 14, 2008
1,051
931
I think what they're saying, is that you could give the illusion of a mapper created layout much more easily by having a huge set of pre-built structures, and link them together to make the map. The wholly random idea is admirable though.
 

adamspurgin

L1: Registered
Mar 22, 2010
42
1
oh i'll definitely have some prebuilt structures on hand, i'll try to make it modular so the files could be read in from other files so i don't have a massive lump of code dedicated to building prefabs.