combining objects in real time?

Is there any way to combine objects when the game engine is running? say you have like a big platform and you have smaller cubes you want to attache to the main platform but make it so they all combine together with the main platform. also could you can disconnect them also if you wanted?

Parenting maybe?
There’s no way to actually combine meshes in-game, besides, then you wouldn’t be to disconnect them.
With parenting you can connect and dis-connect them in-game with the parent actuator.

ya thats what ive done so far but there are several problems

1 ther will be to many individual objects

2 sometimes they get disoriented when the objects are parented to something.

how about constraint?
It not combine but physic doesn’t mess.

how about writing your own “parent/child” structure?
I’m currently working on a System, where the parenting behaviour of bge is not fitting to my needs, so after a little bit more of coding, i got my dependendcies done. No messing around with wrong orientation or scalings anymore…

Look at LaHs Flexicomp system- I’m using it for my game and it allows you to generate Python constraints very easily without the drawbacks of parenting (which are many, including some annoying bugs).

Also, when parenting, consider using empties to line up the children- that way the objects will always line up.

i tried looking for LaHs Flecicomp system but i couldn’t not find it on the forum. could you point me a link :smiley: plz

LaH’s flexicomps are around, PM him if you want to use them.

Ok thanks guys.

ok so i tried it out and im kinda confused as to what to do in the .blend but ill keep working on it. one of the big reasons is that i need for objects to actually combine and decombine to save on the rasterizer speed because otherwise the scene could contain hundreds of objects at once.

ok ya cubes would be fine ill check it out thanks.

I know SolarLune was making something like what you describe in one of his crazy demos (for a MineCraft style effect) so you might want to check that out, although it was quite limited and for cubes and not any other shape (afaik).

In the same place I provided a way to use different shapes(trees), but it’s actually a simplified but slower version of SolarLune’s, or rather my simplified terrain detail system. You could make many modular pieces to “connect” to the object (they are really the same object), but it would require for your object to be static at worse.
So let’s call our cubes voxels, then for your object let’s give a limit of 4 modular pieces, and a variety of 4 per piece. Your object would need to have 16 pieces in total+ the default object. Good luck