Raydium 3D Game Engine

Official forum for everything about Raydium, ManiaDrive, MeMak, ...
It is currently Fri Mar 29, 2024 12:00 am

All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Wed Aug 13, 2008 8:51 am 
Offline

Joined: Sat Oct 29, 2005 12:43 pm
Posts: 65
Hello,

I have few questions about raydium.

- Is it possible to add constraint objects to 2D ?
I found this : http://opende.sourceforge.net/wiki/inde ... ects_to_2d . Is this in Raydium ?

- When Raydium running, can I stop ODE without stop all others functions (opengl, sound, mouse, ... ) ? and next start ODE again ?
In others words, I would like stop et start physic without impact on the game (except physic of course ^^). The objects, who have no physic, when ODE is stopping, don't move.

- Yesterday I run an old test that I have made 1 year ago... I see that it take lots (all) of cpu (I have a core2duo). This test is 2 simples objects. Is it possible to free cpu time ?
I would like make a puzzle game, so the user can not be focused on the game and he can "work" on other programm in same time. If the game take 100% of cpu, it's not good. (My pc run on Ubuntu 8.04.1, I don't know if the problem is the same on windows or mac).

Totoro


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 13, 2008 10:35 am 
Offline
User avatar

Joined: Thu Sep 29, 2005 2:59 pm
Posts: 828
ODE constrained to 2D?
No idea, sorry

Stop ODE update each frame?
raydium_ode_time_change (GLfloat perc) allows you to change the speed of ODE steps. By default this value is 400Hz. Theorically if you set this to zero then ODE will be stopped until you set up this value again to 400.
For example for going to a transparent pause menu, you could do something like:
Code:
void display()
...code...
if(!pause && raydium_key_last==1027)
{
   pause=1;
   raydium_ode_time_change (0):
}
...code...
if(pause && raydium_key_last==1027))
{
   pause=0;
   raydium_ode_timer_change(400);
}

}


about limiting CPU usage?
Yes, you can use a framespersecond limiter: raydium_render_fps_limit() http://wiki.raydium.org/wiki/RaydiumApiReference#114


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 13, 2008 7:11 pm 
Offline

Joined: Sat Oct 29, 2005 12:43 pm
Posts: 65
Thanks Vincente :)

I read the ODE manual and I see that the object constraint to 2D is called "plane-2D".
Can we call directly ODE methods in Raydium ? or methods must be wrapped ?

Another thing : If I run again and again a scene with many collisions, the result will be always the same ?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 13, 2008 7:41 pm 
Offline
User avatar

Joined: Thu Sep 29, 2005 2:59 pm
Posts: 828
ODE is not my best, but calling directly ODE from raydium could be "hard". You first should read the source code of all the related raydium_ode functions, to know how the varaibles are wrapped and so.

And about the second question. Do you mean to try to get the same result from the same initial situation? Hmm, really I can not guarantee, but I'm almost pretty sure that yes. At least if no random function are involved.
For example the raydium_ode_explosion_* functions have random factors.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 29 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group