Forums > Jitter

Strategies around instantiating visual objects from Java code ?

May 21, 2012 | 10:41 am

HI there,

Intuitively, I’d like to do that:
- design a global Java piece of code instantiating the whole world global stuff.
- design small java piece of code, each one instantiating 1 visual object

The global one would contain array of objects.
It would take care of all properties of all objects instantiated currently.

In a second step, I’ll have the current object instantiated and positionned in the 3D world stored in XML preset (probably) ; then, at the launch time, the global stuff would load the preset, then instantiate the required small java stuff in order to display them.

The idea would be to have all objects made on a same structure ; probably:
- properties
- setup / update / draw / playSound like methods (considering draw would be unuseful because an object instantiated is drawn til it is hidden/removed or…)

That way, the global stuff would instantiate all, would be also able to instantiate stuff at runtime (pushing back objects in global arrays), then at each turn (master clock involved probably), all method would be invoked for each objects…

Any strategies to implement this ?
Would it make sense ?

(This question is about a larger thread I opened around my project : http://cycling74.com/forums/topic.php?id=40000 – putting that here for reference purpose)


May 22, 2012 | 8:10 pm

merged with http://cycling74.com/forums/topic.php?id=40000


Viewing 2 posts - 1 through 2 (of 2 total)