Raydium 3D Game Engine

Official forum for everything about Raydium, ManiaDrive, MeMak, ...
It is currently Tue Apr 30, 2024 2:00 pm

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Thu Jun 22, 2006 11:02 am 
Offline
User avatar

Joined: Thu Sep 29, 2005 2:59 pm
Posts: 828
I'm working on a new feautre.
The idea is: When you pass a circuit, the velocity of the game will become slower and slower and then the game will return to the menu for select a new ciruit.
Is a good idea?

Anyway i'm having problems to slowdown the game. Currently i'm trying with this code.

(this code goes at the end of change_game_state function)
Code:
if(type==GAME_FINISHING)
    {
    raydium_ode_time_change(100-slowdown);
    slowdown++;
    if(slowdown==100)
   {
   change_game_state(GAME_END);
   slowdown=0;
   leave();
   }
    raydium_log("slowdown: %d",slowdown);
    }

Of course there are more lines of code here and there, but that's the important thing, i suppose

It "works" but the slowdown is quite irregular, with variations in the velocity of the game... ideas?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jun 22, 2006 11:33 am 
Offline
User avatar

Joined: Sun Mar 16, 2003 2:53 am
Posts: 2591
Location: gnniiiii (Scrat)
Good idea. "slowdown" must be a float var and should be incremented with "raydium_frame_time" (with a factor ?) if you want a linear effect.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jun 22, 2006 2:29 pm 
Offline
User avatar

Joined: Thu Sep 29, 2005 2:59 pm
Posts: 828
still having problems, but i think that the problem is heredated from raydium_ode

I put here a link to a diff of mania_drive with my testing changes:
http://www.guadagames.com/demos/mania_drive_diff.diff

i have made the diff with diff -uw , is right?


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 114 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:  
Powered by phpBB® Forum Software © phpBB Group