ID:272201
 
What's really the best way to do a random battle arena? I've seen a demo, but I really didn't like their solution. (Mapping a few arenas and then checking if they're occupied or not when a battle starts) Is this really how most major RPGs on BYOND do it? Anyways, each arena would be the same size. If anyones wondering, I'm messing around with a Mega Man Battle Network game. (I'm not impressed by the ones currently on BYOND)

If I had to pick a way to dynamically generate them right now, I'd probably create a blank 50x50 z layer on the map, and then I'd just create and delete them dynamically as need be. (if it's a 6x3 arena, 50x50 would approximately give 80-90 stations)

Anyways, I'm just looking for input, any ideas would be appreciated.
The "best" way really depends. However, I can only think of two real, catch-all solutions:

1) Using a library such as LummoxJR's SwapMaps to create (and destroy) areas as they are needed.
2) Using a single area and utilizing image objects to only display what's needed to the right people.

#1 is probably easier, because for #2 you need to start filtering out a bunch of junk mobs who are part of a different battle (IE: you'll get them in view(), but you don't want to affect them).
In response to Garthor
#1 is really pretty much the only way. On a different platform you could well manage something like #2 since you'll have control over the low-level code and netcode so you could
ignore or not synchronize other players inside the arena, but doing this with something like BYOND would be a huge mess, as you've said.
Chessmaster_19 wrote:
If I had to pick a way to dynamically generate them right now, I'd probably create a blank 50x50 z layer on the map,

First of all it should be pointed out that you can't really create a "50x50 z layer". All your z layers are always the same size; if you have another z layer set to a bigger size it will expand the smaller one. You could artificially make z levels appear small though, of course.

and then I'd just create and delete them dynamically as need be. (if it's a 6x3 arena, 50x50 would approximately give 80-90 stations)

This is not a problem, because you can dynamically expand the map at runtime and add new x y and z coordinates. Look up the world variables maxx maxy and maxz. You should also definitely look into the SwapMaps library.
In response to Kaioken
Well, I've considered the 2nd option also, actually. in View() could be replaced with a similar proc, in Battle() or something like it. Battles could be distinguished easily using randomly generated battle id numbers or battle datums. (I'm not sure how natural it is that datums seem to be becoming my answer for everything...) The game is still in it's planning states though, so it might concentrate on PvP, which would still need arenas, but if there are random battles vs NPCs, the 2nd option might actually work better, since only one player would involved anyways.