Real-time scenery changes
by Don DuRousseau · in Torque Game Engine · 03/16/2005 (5:38 am) · 0 replies
Hello All. I just licenced Torque and made my first experiments using it
(just tried to modify the demo that comes with the SDK).
My problem is the following: I would like to interface my Torque game with another application.
Depending on the output of this application, the main scene of the game should change dynamically (example: weather could alter, trees would be added/removed, etc.).
One simple solution would be to have a thread that periodically reads a file, that gets updated by the other app.
Here are my issues:
1) is there support in the Torque scripting for creating threads? Or where is the scene main loop?
2) how do I control the scenery using scripting? For instance, how do I grab an object, change its scaling and force a scene redrawing ?
(I know how to do all this in OpenGL, and I suppose the scripting API must support these features)
Any comments, code snippets, recommendations are appreciated. Thanks
(just tried to modify the demo that comes with the SDK).
My problem is the following: I would like to interface my Torque game with another application.
Depending on the output of this application, the main scene of the game should change dynamically (example: weather could alter, trees would be added/removed, etc.).
One simple solution would be to have a thread that periodically reads a file, that gets updated by the other app.
Here are my issues:
1) is there support in the Torque scripting for creating threads? Or where is the scene main loop?
2) how do I control the scenery using scripting? For instance, how do I grab an object, change its scaling and force a scene redrawing ?
(I know how to do all this in OpenGL, and I suppose the scripting API must support these features)
Any comments, code snippets, recommendations are appreciated. Thanks
About the author