Originally Posted By: JustSid
Rojart, thats evil because you assume that the user always has 60 frames per seconds.

JustSid, I see no problem to change the fps like this:

Code:
#include <default.c>
#define PRAGMA_PATH "%EXE_DIR%\samples"
#define FPS 68 // Frames per seconds can be changed individually
var seconds, minutes = -1;

FONT* A20b = "Arial#20b";
PANEL* pInfo;

function main()
{
	fps_max = FPS;
	level_load ("small.hmp");
	vec_set(camera.x, vector(0,0,150));
	
	pInfo = pan_create(NULL,0);
	pan_setdigits(pInfo,0,10,10,"SECONDS = %.0f", A20b, 1, seconds);
	pan_setdigits(pInfo,0,10,30,"MINUTES = %.0f", A20b, 1, minutes);
	set(pInfo, OUTLINE|SHOW);
	
	while(level_ent)
	{
		if ((total_frames %  FPS) == 1) seconds++;
		if ((total_frames % (FPS*60)) == 1) minutes++;
		wait(1);
	}
}




Regards, Robert

Quote
Everything should be made as simple as possible, but not one bit simpler.
by Albert Einstein

PhysX Preview of Cloth, Fluid and Soft Body

A8.47.1P