Hi guys,
I'm looking for some advice, ideas, what have you. I need to solve this problem fairly quickly so here I am :-)
Basically I need to procedurally generate a number of cities at runtime. Theres some specific requirements, namely I need to have a large central building, with smaller buildings in nearby space around it. Theres going to be billboards on the side of some of these buildings, and I need to try to minimize buildings obscuring another buildings billboards.
I don't know if in my head, I'm making this out to be harder than it really is.
-I've tried adapting some code that arranges rectangular regions.( basically a spin on the black pawn lightmap packing algorithm ) It sort of works but looks kind of wrong too since all the buildings shift over to a side. I'm looking for something better.
Does anyone know or can think of a better way to do this? I keep thinking there must be some magic algorithm using a tree( like a quadtree ) to partition everything up, but I can't for the life of me figure out how to do it right now. Especially because of the main building which should be centered between the others.
-I've thought of using some kind of brute force method, that just randomly places buildings, and if theres any penetrations, it moves the involved buildings as needed.
-I've also considered using a kind of grid system, but I'm thinking that will make the buildings look too even and uniform.
Anyways, if anybodys got ideas, shoot. I'd love to hear em. :-)
BTW, took a gamble and put the thread here in general discussion. Its not blitz specific, and I figured general discussion has a good amount of traffic in it. So yea. :P
I'm looking for some advice, ideas, what have you. I need to solve this problem fairly quickly so here I am :-)
Basically I need to procedurally generate a number of cities at runtime. Theres some specific requirements, namely I need to have a large central building, with smaller buildings in nearby space around it. Theres going to be billboards on the side of some of these buildings, and I need to try to minimize buildings obscuring another buildings billboards.
I don't know if in my head, I'm making this out to be harder than it really is.
-I've tried adapting some code that arranges rectangular regions.( basically a spin on the black pawn lightmap packing algorithm ) It sort of works but looks kind of wrong too since all the buildings shift over to a side. I'm looking for something better.
Does anyone know or can think of a better way to do this? I keep thinking there must be some magic algorithm using a tree( like a quadtree ) to partition everything up, but I can't for the life of me figure out how to do it right now. Especially because of the main building which should be centered between the others.
-I've thought of using some kind of brute force method, that just randomly places buildings, and if theres any penetrations, it moves the involved buildings as needed.
-I've also considered using a kind of grid system, but I'm thinking that will make the buildings look too even and uniform.
Anyways, if anybodys got ideas, shoot. I'd love to hear em. :-)
BTW, took a gamble and put the thread here in general discussion. Its not blitz specific, and I figured general discussion has a good amount of traffic in it. So yea. :P