Go Back   TF2Maps.net > Discussion > Mapping & Tutorials

Notices

Reply
 
Thread Tools

random level generator
Old 01-12-2010, 04:59 PM   #1
martijntje
Veteran Member
 
martijntje's Avatar
 
martijntje is offline
Posts: 520
Thanks: 91
Thanked: 155
Default 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.
__________________
  Reply With Quote
The Following 2 Users Say Thank You to martijntje For This Useful Post:

Old 01-12-2010, 05:01 PM   #2
The Political Gamer
Hey look its the guy who posts too much!
 
The Political Gamer's Avatar
 
The Political Gamer is offline
Posts: 3,899
Thanks: 2,810
Thanked: 1,275
Blog Entries: 16

Oh wow thats super cool! How did you do it?
__________________


My other maps: ctf_assembly | cp_trestle | pl_uphill | cp_grinder |
Quote:
Originally Posted by midget31394 View Post
I'm going to kill you slowly.
  Reply With Quote

Old 01-12-2010, 05:06 PM   #3
Drexer
L2: Member
 
Drexer's Avatar
 
Drexer is offline
Posts: 50
Thanks: 11
Thanked: 31

Oh wow. Nice.

How about cp/ctf/whatever_rand() ?

Seriously, I'm still surprised.
  Reply With Quote

Old 01-12-2010, 05:08 PM   #4
Randdalf
Veteran Member
 
Randdalf's Avatar
 
Randdalf is offline
Posts: 862
Thanks: 102
Thanked: 313
Default

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
  Reply With Quote

Old 01-12-2010, 05:09 PM   #5
Dr. ROCKZO
Veteran Member
 
Dr. ROCKZO's Avatar
 
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...
  Reply With Quote

Old 01-12-2010, 05:09 PM   #6
martijntje
Veteran Member
 
martijntje's Avatar
 
martijntje is offline
Posts: 520
Thanks: 91
Thanked: 155

Quote:
Originally Posted by The Political Gamer View Post
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.
__________________
  Reply With Quote
The Following User Says Thank You to martijntje For This Useful Post:

Old 01-12-2010, 05:10 PM   #7
grazr
Needs Therapy
 
grazr's Avatar
 
grazr is offline
Posts: 2,891
Thanks: 482
Thanked: 1,499
Blog Entries: 15

I hope they're func_detail'ed.
  Reply With Quote

Old 01-12-2010, 05:13 PM   #8
martijntje
Veteran Member
 
martijntje's Avatar
 
martijntje is offline
Posts: 520
Thanks: 91
Thanked: 155

Quote:
Originally Posted by Randdalf View Post
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)
__________________
  Reply With Quote

Old 01-12-2010, 05:22 PM   #9
grazr
Needs Therapy
 
grazr's Avatar
 
grazr is offline
Posts: 2,891
Thanks: 482
Thanked: 1,499
Blog Entries: 15

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.
  Reply With Quote

Old 01-12-2010, 05:50 PM   #10
Dr. Spud
Science Hurts
 
Dr. Spud's Avatar
 
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.
__________________
http://forums.tf2maps.net/image.php?type=sigpic&userid=3648&dateline=1274335  137
Dr. Spud is using: "Community Nothing"- given to unvaluable community contributors
ctf_landfall cp_vineyard ctf_haarp
  Reply With Quote
Reply

Tags
generator, level, map, random, vmf

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off




All times are GMT -5. The time now is 05:05 PM.

© 2008 Valve, the Valve logo, Team Fortress 2, the Team Fortress 2 Logo, Steam, the Steam logo, Source,
the Source logo, and Valve Source are trademarks and /or registered trademarks of Valve Corporation
in the United States and other countries.

Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Ad Management by RedTyger