These tools help generate large random maps for testing.
More...
These tools help generate large random maps for testing.
The cubeMaps toolset is a way to generate large, (hopefully) interesting maps automatically, using cubes. The basic idea is that large structures are just assemblies of smaller cubes. This would be a bit repetitive for an actual game, but is a good way to generate large spaces for testing.
Perl scripts:
- generateVoidList Generates a random set of adjacent cubes. These are intended to be "empty" cubes, hence the name void. The void list is generated by a series of random steps, you need to tell the scripts how many steps to use. More steps results in a larger map. Use around 20-30 steps. If you really want to stress things, try hundreds of steps.
- generateHull Given a list of void cubes, this script computes the set of cubes that would form a hull around the void cubes. The output is a set of cubes with empty space in the interior. This interior space is the list of void cubes.
- generateMap Given a list of cubes, this script generates a map. You'll need an already-available cube object to use, with its own physics and rendering models. You provide the size and name of the cube object, as well as the size of zones. Zones are assumed to be square-shaped, so you just specify the width of the zone in cubes.
General usage:
Pipe them all together on the command line, and output the final result of generateMap into a map file.
To generate the map For example:
% cd tools/cubeMaps
% ./generateVoidList 10 | ./generateHull | ./generateMap 3.0 3m-cube 7 > test.map
That would generate a map file named "test.map" which you could use to test the client and server. In this case, I was using 3m cubes, with 7 cubes per zone.