Idea Random buildings generator for surface bases

N_Molson

Addon Developer
Addon Developer
Donator
Joined
Mar 5, 2010
Messages
9,995
Reaction score
4,419
Points
203
Location
Toulouse
I just had that idea while I was trying to sleep... :idea:

I've always found that the Orbiter world (well, especially on Earth) lacked of signs of human presence. One way to do that would be to add some housing and buildings around surface bases. But not several ones, a lot of them.

Doing that "by the hand" is an awfully painful, and extremely repetitive task. Exactly the kind of things that a computer can handle very well in a few milliseconds.

So the result would be a small utility program run under Windows, that would output in a .txt like format the base configuration file lines for the buildings you want to add. From there, a mere Ctrl-C / Ctrl-V, and it's done.

That utility would be able to :

- Generate a list of randomly of X positioned buildings, where you could define X ;

- You could define a few types of buildings amongst Orbiter "primitives", for variety (small houses, low buildings, towers...), and you could define the representation in % of each category.

- You could define the above categories by selecting the "primitive" type (block, hangar, tank...) and set a range of properties (like height 3-4 m, length 8-12 meters...) for each category. The numbers would be randomly defined into the ranges to add variety ;

- Heading (rotation) of the buildings could be random too ;

- It would be possible to define a "void" disc around the center of the base (so that you could lay the runways and the base itself without having houses & flats everywhere) ;

- It would be (of course) possible to define a radius, defining the outer limit of buildings generation ;

Now I have no idea how many buildings you can put on a surface base and which influence can have let's say 200 or 500 scattered basic buildings on framerate. That would for sure have been crazy back in 2001, on the first versions of Orbiter, but nowadays computers are much more powerful, plus we have DX clients...

:hailprobe:
 
Something like that is planned (a lot more involved, though) for the future of orbiter galaxy, but it will still be quite a while until I get there. Especially since Orbiter Galaxy development is currently impossible due to me being seperated from my rig the next few months and my laptop not meeting the system requirements for Orbiter Galaxy by far... :facepalm:

Still, a completely random version as you suggest (that has no internal logic and law of of building an actual city) would be very simple to do, so I'd encourage anyone with only a bit of c++ skills to just go ahead and do it. It's relly no big deal, you don't even need the orbiter API, all you need is randomness with very limited intelligence and file i/o. It would even make a nice beginners project, it's that simple.
 
Last edited:
A beginner's project you say? You underestimate my incompetence :P
 
Still, a completely random version as you suggest (that has no internal logic and law of of building an actual city) would be very simple to do

Yes, it's also my guess, and it's why I posted it there, I'm pretty sure that people with Windows API experience could do that in three clicks. So if anyone is interested, that could IMHO add some eye-candy to Orbiter. :cheers:

(I forgot something : there is a minimal spacing to define between buildings, else there is a probability that some will overlay, which produces clipping).
 
I'm pretty sure that people with Windows API experience could do that in three clicks.

What would you want with the windows API for something like this? there's standard c++ file i/o methods that are perfectly capable of doing the job.

A beginner's project you say? You underestimate my incompetence

I didn't say that you wouldn't have to learn a trick or two along the way, but there's nothing really complicated in there.
 
Last edited:
For compiling the App.exe file itself I mean.
 
I think you have a little misconception about what an [ame="http://en.wikipedia.org/wiki/Application_programming_interface"]API[/ame] is. You're program wouldn't have to interface with Windows, hence you wouldn't need the windows API ;) (unless you want to make a GUI, but I'd suggest just a config-based self-runner for starters).
 
Back
Top