Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7131 in orxonox.OLD for trunk/src/story_entities/game_world.h


Ignore:
Timestamp:
Feb 14, 2006, 12:23:11 PM (18 years ago)
Author:
bensch
Message:

orxonox/trunk: framerate calculation is much more 'accurate' meaning, if it is falling from one value into another one, the rate will be averanged to the middle.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/story_entities/game_world.h

    r7004 r7131  
    1111#include "game_world_data.h"
    1212
    13 class TiXmlElement;
    1413class Shell;
    1514class WorldEntity;
    16 class GameWorldData;
    1715
     16/** How many frames time values to keep
     17 * The higher the value the smoother the result is...
     18 * Don't make it 0 or less :)
     19 */
     20#define TICK_SMOOTH_VALUE 10
    1821
    1922//! The game world
     
    8285
    8386    /* world timing */
    84     Uint32              lastFrame;                    //!< last time of frame
     87    Uint32              lastFrame;                    //!< last time of frame (in MiliSeconds)
    8588    Uint32              cycle;                        //!< The cycle we are in (starts with 0 and rises with every frame)
    86     Uint32              dt;                           //!< time needed to calculate this frame (in milliSeconds)
    8789    float               dtS;                          //!< The time needed for caluculations in seconds
    8890    float               speed;                        //!< how fast the game flows
    8991    double              gameTime;                     //!< this is where the game time is saved
     92    Uint32              frameTimes[TICK_SMOOTH_VALUE];//!< The time used for the last TICK_SMOOTH_VALUE's frames.
     93
    9094
    9195    /* external modules interfaces */
Note: See TracChangeset for help on using the changeset viewer.