Random Level Generation Using addon "EasyEmit"

hi everyone

so im working on this project lately. its a space exploration/survival game. and im stuck at figuring the best way to make randomely generated levels [ fields of asteroids in a large chunk of space ]

[asteroids in screenshot are generated using normal particle system]


i played a little bit with the addon : EasyEmit. and i think this addon contains all the potentiel to make such basic random generation.

the idea here is to make the spawning area considerably large as in “space” ( wich is already posible ) and making the lifetime of spawned particles = to infinite. this way , the spawned asteroids will actualy stay there forever. or at least until the game is shut down. this , and also the possibility to spawn object that are contained in a group. [ this group will contain the different models of asteroids … in this particular case ]. of course this spawned asteroids will inherit their phisics properties and shaders and logic bricks etc…

if this changes can be done inside the innerworkings of EasyEmit. then this little hack will make for a nice random generation tool for my very humble game. :3

im very bad at python programming … this is why the working script behind easyEmit is like a dark room for me. and im reaching for help for people here who are just a bit familiar with python and maybe easyemit.

whats needed :
- to add the possibilitie to change the lifetime to infinite.

  • to add the possibility to spawn custom objects and groups as particles.

i dont know if this is actually already doable or not. i played with it and tried but couldnt figure out a way to do it. please help. <3

.

Set the lifetime to zero.

The BGE does not know groups. You can add instances (objects with a dupli group set). This comes in handy when handing several objects as one. As usual the template (the instance) must reside in an inactive layer.

simply setting the lifetime to zero does not seem to work. even when the change is made on the property handler and not in the adon ui itself. it seems that anything more than Zero works fine. but zero itself does not spawn any particle.

its sad bge cant work with groups :confused: but instancing single objects could work too as a workarroud i guess , if only easyemit can provide that option ( choosing a custom object to spawn instead of thoses already existing particle presets )

or maybe it does ? and i just dont know how to use the addon ? xD

It is an add-on. It supports you for easier usage of the BGE’s functionality. It does not introduce new “features”. Therefore you can manually do whatever that add-on does.

Basically it adds objects via API (Scene or EditObjectActuator).

With that you can write some Python script or module that adds objects to the scene on-the-fly.

Additionally you need to discover how to make a random choice on objects to add and calculate random positions and orientations.

There is a example of a dungeon generator in resources by battery,
And the bge supports group instances, and there is a test branch of UPBGE with geometry instancing, and we already have lod… And you can use a kdtree to move lamps.