Auto-generation of environments

So I’ve been re-playing GTAIII lately, and I thought of something.  How would one make a full city, with full interiors for every building that is there?  Couldn’t we just generate all this stuff at run-time?

This makes a lot of sense.  The code size becomes larger, but the code size is generally pretty insignificant compared to the size of the assets of the game.  If we define basic things such as how things go together, we could get something cool here.  For example, an office environment could have desks and chairs, and chairs should normally be next to desks.  Cubicle walls follow the same general footprint.  You don’t even need to randomly generate these things per-se; in order for everybody to have the same room, just have a function call which takes an int as an argument all the time; like a pseudo-random number generator, you’d get the same output every time that you ran it.  Ideally, what you would have is each floor of a building being a certain input to this generator of floors.  You don’t need to run through the code to generate the floor unless the player actually goes up to the floor. The environment artist also doesn’t have to create the floor at all, all he would have to do is to say “Okay, these are the floor dimensions. Here is the number.  Generate!” and it would do it.

It could work.  I’m not going to try and implement this, because it’s probably hard and I don’t really have anything to use it for anyway.  But it could be cool.

Leave a Reply

Your email address will not be published.