Vetting An Idea - Random Arena

Stormcaller3801

L5: Dapper Member
Jul 5, 2009
249
28
Here's another idea I want to run by people to see if they think it'd be viable. If not, so be it. I'm just curious if it'll work before I start up Hammer and find out for myself 80 hours in.

I've already figured out, more or less, how to handle randomized items, like getting props to show up (and I'll do a tutorial before long here) and so forth. But I was thinking about expanding that.

Specifically I was thinking about an arena map where relatively little of the map is actually static- instead, the majority of the map is all entities- brush based or otherwise- and hooked up to a randomizer. So, for instance, one round you're running through a mansion. The next, you're out in the hedge maze. Another you've got the secret underground lair hidden beneath the mansion. Everything is enabled or disabled based on a random pick in a Logic Case, with each Case representing an entire layout.

The immediate problem that comes to mind is lights- to enable/disable them in groups would require named lights. On the upside, entire sets of lights could be named identically (and in fact this would be optimal for purposes of the randomization), reducing the number of pages rather significantly as each set of lights would merge together, which (if I'm not mistaken) would mean only one page per layout. Of course, this doesn't help with the problem of VRAD only compiling direct lighting, but I think I could fudge things using unsourced lights with properly-tweaked constant, linear, and quadratic settings.

The second problem would be the skybox, although this is relatively minor. A common 3D skybox would assist in fixing this problem, but the possibility of binding skybox props to the randomization could work here as well- which would only be important in terms of relative positions. If the hedge maze is to the East of the mansion, for example, skybox props could be cloned, moved West, and linked to the hedge maze set. The static elements in the skybox would be fine as is, as it would likely seem like parallax effects and nothing to worry about. Then again, with parallax already going on this shifting may not even be necessary.

Third problem is budgeting- I'd imagine that making effectively three arena maps would bloat the file size and I'm not certain how that many entities (and so little world geography) would affect things. I'm sure I'd already be running into issues with the limitations on the number of props, and things like func_detail T-intersections could get to be a problem as well. But those limits might be high enough that it won't cause trouble in the larger scheme of things.

In any case, I'd like to see what the more experienced map-makers think of my latest ridiculous scheme.
 

martijntje

L8: Fancy Shmancy Member
Aug 2, 2009
539
334
I like your idea, certainly possible.

just remember:
http://forums.tf2maps.net/showthread.php?t=3924

Also try to stick(ybomb) to one theme only and keep everything symmetrical
to keep everything symmetrical, just have two of each brush/prop with the same name.

say
if the group of props avaible would be {a,b,c}
would {{a},{b},{c}} be all the possible permutations possible
or
would {{},{c},{b},{b,c},{a},{a,c},{a,b},{a,b,c}} be all the possible permutations possible
I hope you understand me

I would really hope you pick the second method, although it would require more entities in you map, it would actually cost you less time to implement and will allow for way more possibilities
 
Last edited:

strangemodule

L5: Dapper Member
Sep 10, 2009
223
59
As an (more optimized) alternative, you could simply create all the areas, seal them off from each other, and then use your logic case to randomize which spawns to use.
 

A Boojum Snark

Toraipoddodezain Mazahabado
aa
Nov 2, 2007
4,775
7,669
Well you wouldn't even need the case for that. You could use the built in round system to accomplish that goal.

And actually, I think you would have to. The players spawn instantly and wouldn't give any time for the case to change the active spawns.

Also, about the lights, it would still calculate for every possible combination of lights, even if there is no logic in the map to make a given combination active.
 

Nutomic

L11: Posh Member
Feb 7, 2009
888
177
But that would make the map really big, if it even all fits into one map...

Dynamic stuff is something source can handle really bad, so you'd better do stuff like that in an real-time rendering engine, like ue3.
 

MoonQuake

L3: Member
Jul 18, 2009
111
21
Good idea storm! Totally feasable as long as you're conservative.

But here's the kicker:
If you want to make a map that looks like a regular arena map, but has randomly changing architecture, you'll run into problems with optimization and lighting.

You'll have to be wise about what you randomize if you want to do that.

For maximum randomness and optimal performance and lighting, I suggest you randomize openings to paths instead of walls. I've done it before and it works great.
You could enable/disable some walls, but they would have to not be walls that separate big sections of your map.

Close off or open up doors, traps, vents, etc... works. Just use occluders and areaportals in a way that blocks visibility when paths are blocked, and not when they're open.

Also, having only doors, traps and vents to deal with, lighting wouldn't suffer too much.
It's when you disable a big wall that lighting abberations start to appear: shadows would simply not match and it would not look great.

MQ
 

Locutus

L2: Junior Member
Nov 3, 2009
85
13
I want to know about this random prop thing...would be great for prophunt maps. >:3
 

Swiftmind

L2: Junior Member
Dec 6, 2009
73
20
The idea is possible....if your clever. But I dont see the environment being able to change too much. Being inside of a mansion then outside in the hedge maze....why not just make two different areas?

To me this is possible if the environment does not change too much. For example, the hedge maze. If on each arena round the maze changes paths, walls disappear and appear, then I could see this possible. But if your going to change the environment into something completely different, I would not waste your time...just build two separate areas and have the spawns change.

Not everything can be dynamic though for optimization purposes. There must be static walls and doors around to make the map playable on lower end systems.

Another problem I see is the server-client communication. This map is going to have some interesting lag during new rounds and the SourceTV recordings are going to be larger then typical recordings. Reason is any entity that changes state on the server, the new state needs to be sent to all clients. If the whole map or most of it, is entities that dynamically change, then all clients plus the SourceTV recording must get updated states for those entities from the server.

Its doable, but as MoonQuake said you got to be conservative.....and clever. I could see this doable in something like a hedge maze where simple walls (big green brushes) will appear and disappear dynamically per round.