 |
random level generator |
 |
01-12-2010, 04:59 PM
|
#1
|
|
Veteran Member
martijntje is offline
Posts: 520
Thanks: 91
Thanked: 155
|
random level generator
I've been working on this for some days and thought the community might be interested in seeing it.

the current version just creates a field of random cubes, but in future version I plan to make it so it generate blocked out maps, so in case of a mappers block, the program gives you a random layout of the map.
btw, it generates a .vmf, not a .bsp
Still thinking of a fitting name, so if you have a suggestion, you are free to tel me.
|
|
|
|
|
The Following 2 Users Say Thank You to martijntje For This Useful Post:
|
|
01-12-2010, 05:01 PM
|
#2
|
|
Hey look its the guy who posts too much!
The Political Gamer is offline
Posts: 3,899
Thanks: 2,810
Thanked: 1,275
|
Oh wow thats super cool! How did you do it?
|
|
|
|
01-12-2010, 05:06 PM
|
#3
|
|
L2: Member
Drexer is offline
Posts: 50
Thanks: 11
Thanked: 31
|
Oh wow. Nice.
How about cp/ctf/whatever_rand() ?
Seriously, I'm still surprised.
|
|
|
|
01-12-2010, 05:08 PM
|
#4
|
|
Veteran Member
Randdalf is offline
Posts: 862
Thanks: 102
Thanked: 313
|
I've been trying something like this myself, but more ambitious.
You simply have to understand the brush VMF, and then you're literally free to go. You'd need some pretty neat algorithms to make a true random level generator.
I'd class this as an experiment rather than a success.
__________________
Quote:
[Φ] Randdalf!: was there like a quake telegram messaging service?
Shmitz: to play Quake you had to wait for packets to arrive by pony
|
|
|
|
|
01-12-2010, 05:09 PM
|
#5
|
|
Veteran Member
Dr. ROCKZO is offline
Posts: 549
Thanks: 80
Thanked: 134
|
Dice.
Getting it to go from random cubes to flowing maps would be a massive process, good luck!
__________________
Or Something...
|
|
|
|
01-12-2010, 05:09 PM
|
#6
|
|
Veteran Member
martijntje is offline
Posts: 520
Thanks: 91
Thanked: 155
|
Quote:
Originally Posted by The Political Gamer
Oh wow thats super cool! How did you do it?
|
a simpel c++ program, generates a vmf, aka a text file. in it simplest form it just generates a empty, yet valid vmf. however I have a function add_brush wich, when given some coordinates adds a brush to the map. then somewhere in between writing the file, I add some brushes to make the skybox and ground and then randomly add a set amount of cubes, finish up writing the file.
then I open up the file in hammer, add light entities, fix all problems (pretty much every brush has the texture perpendicular to face error) and compile it.
|
|
|
|
|
The Following User Says Thank You to martijntje For This Useful Post:
|
|
01-12-2010, 05:10 PM
|
#7
|
|
Needs Therapy
grazr is offline
Posts: 2,891
Thanks: 482
Thanked: 1,499
|
I hope they're func_detail'ed.
__________________
Quote:
|
A Boojum Snark: Don't listen to grazr he is probably drunk
|
|
|
|
|
01-12-2010, 05:13 PM
|
#8
|
|
Veteran Member
martijntje is offline
Posts: 520
Thanks: 91
Thanked: 155
|
Quote:
Originally Posted by Randdalf
I'd class this as an experiment rather than a success.
|
if you are talking about the one map I show you here, yes that is indeed just an experiment, the final version will act quite different from this one.
the main problem I think I will have are indoor areas and vertical stuff (bridges between buildings etc)
|
|
|
|
01-12-2010, 05:22 PM
|
#9
|
|
Needs Therapy
grazr is offline
Posts: 2,891
Thanks: 482
Thanked: 1,499
|
To be honest Mart, i think you could get away with just creating world geometry and leave the building of inner and more sophisticated structures to the imagination of the designer.
Simply laying down a block to represent a route or building is usually enough to wet the inspiration glands.
__________________
Quote:
|
A Boojum Snark: Don't listen to grazr he is probably drunk
|
|
|
|
|
01-12-2010, 05:50 PM
|
#10
|
|
Science Hurts
Dr. Spud is offline
Posts: 616
Thanks: 340
Thanked: 336
|
You could start by simply having it generate a floor plan. That would simplify the coding, but still leave the user with something useful. Plus when you're dealing with planes, you could more easilly implement functions to limit sightlines and such.
|
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
All times are GMT -5. The time now is 05:05 PM. |
|
|