Building Levels With Cubes

It occurred to me that getting the computer to automatically construct a level out of simple cube objects would probably be a much faster and open-ended method of level-building than the placement of rectangular buildings and pavement blocks with roads in between.

Testing at various stages of development, and the final product at top right

So I made it. Though it is not quite finished as I have to integrate Yena’s system for randomising the textures assigned to buildings to add variation, and to get them to automatically spawn first floor pieces like entrances, garages, etc to the building.

In particular, it is always very fiddly arranging pavement corner, side, and centre pieces around the roads, or vice versa, so now all you have to do is lay out the roads, and then it will fill in the rest with pavement around the roads:

1 Place roads; 2 Calculates scale and display of road pieces; 3 Interprets road pieces into grid tile system 4; Interprets tiles into pavement

The system has a great deal of potential in future projects, and I found it to be quite versatile in letting me extend rooftops with floating platforms, and run roads along them (which are both things we will be needing if we go for a hive city as described in a previous post):


I expect building levels by this methodology to be much easier than before, but I’ll let our level designer decide if, when, how and in what capacity they choose to make use of it.

Here is a simple comparison of the old method above, and the new method below:

~ by Inicus on July 7, 2011.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

 
Follow

Get every new post delivered to your Inbox.