PDA

View Full Version : Can you guys test my FPS?



frenchfry164
06-08-2002, 12:06 PM
I am making a game, not anywhere CLOSE to being complete, but I just want people to test out my stripped down version of the game to see the FPS. I took off almost everything, so basically it's just the FPS reader thing and a few graphics. The FPS is at the top-left corner of the screen.

If you would do this big favor for me, I would greatly appreciate it. If you decide to do it, reply with your:

Operating System (Windows 98, XP, etc.)
Processor (Athlon XP 1800+ 1.4 GHZ, Intel P4 2.0 GHz, etc.)
RAM (how much memory you got, and the type of memory, if you know it)
DirectX version
Video Card Brand and/or Chipset and how much VRAM you have (ATI Radeon 8500 128 MB, WinFast GeForce 4 Ti4200 64MB, SiS 605 16MB, etc.)

I get an average of 11 FPS, sometimes 12 on my sytem, here is what I have

Windows ME
AMD K6-2 500MHz
184 MB PC100 RAM
DirectX 8.1
SiS 505 8MB (no GeForce)

Please note, that you need the Allegro 4.0 runtime or higher to run it (you can get the runtime at www.allegro.cc if you want it, it's like a 400k download I think)

frenchfry164
06-08-2002, 12:09 PM
I'm gonna post the file for it when I get it zipped (I'm so stupid, forgetting to attach the file lol)

frenchfry164
06-08-2002, 12:14 PM
here it is. Sorry for the big filesize.

DavidP
06-08-2002, 12:16 PM
woah...I just want to comment for a second on your post.

You are getting 11 fps on a stripped down version of your program?

The human eye sees at 16 fps....so therefore if you are truly getting 11 fps your graphics wont even appear to be animated...

A finished game should run at at least 25 fps.

I think you have a problem with your code to test fps.....because no one can have that slow of fps on a stripped version of a game....especially on the system you are using...

rewrite your fps code.

incognito
06-08-2002, 12:16 PM
I still don't see it.

frenchfry164
06-08-2002, 12:29 PM
here it is http://frenchfry164.tripod.com/BS_P1.zip

frenchfry164
06-08-2002, 12:35 PM
here is my FPS code (I am using Allegro's timer handler)


prepare_next_frame(); // Prepare the next frame
new_frames++;
if (FPS_Counter > 0)
{
old_frames=new_frames;
new_frames=0;
FPS_Counter = 0;
}


It takes a second to warm it up. I would do the division thingy, but I forget the equation for that way. prepare_next_frame starts up the next frame, and when that's done, new_frames go up. There is a timer going, and when the timer gets to one second, it reads how many frames went through that second, then resets the timer and the frame counter. Now I know this won't give you accurate reading because of the counter code taking time.

DavidP
06-08-2002, 12:49 PM
try this code, include time.h and fstream.h when doing it:



int numFrames = 0;
int startTime = clock();
int finishTime;

while(1)
{
//the next 3 lines are pseudocode
drawObjects();
getUserInput();
handleUserInput();
//okay, back to real code

numFrames++;
finishTime = clock();
if(finishTime >= startTime + 1000)
{
ofstream save ("fps.dat");
save << numFrames << endl;
save.close();
numFrames = 0;
startTime = finishTime;
}
}


This will create a file called fps.dat and it will contain your frame rate.

frenchfry164
06-08-2002, 01:08 PM
Your method made it say 6 FPS, because in the beginning of the level it initializes stuff so the FPS is low for like 2 seconds, then it goes to full speed.

PS: I got it up to 13 FPS! Yay!

incognito
06-08-2002, 01:09 PM
It tells me I cannot download.

DavidP
06-08-2002, 01:38 PM
>in the beginning of the level it initializes stuff

Initialize as much as you can before you do ANY drawing at all.

Draw everything at once, dont draw spread out throughout the program. If a user presses the arrow key to move down....then just set a flag saying you need to draw the thing a pixel down the next time you draw, but dont actually draw it a pixel down at that moment....then when it comes around to draw time again, then draw it a pixel down.

I dont understand why you are getting 13 fps. that is still slower than the human eye. revisit your drawing algorithms, you should not be getting that frame rate. think about it, it is taking almost 100 milliseconds to draw one frame of graphic.

not to brag or anything, but my game that I am making is getting 73 fps....that is just 13.7 milliseconds per frame...something is wrong with your code somewhere if you are getting a reported 13 fps.....remember, you want at LEAST 16 fps....that is human eye speed....try for at least 25 fps....but it is good to have around 50....or more if you can...

maybe you are reporting the amount of milliseconds it takes to draw a frame and not your actual frame rate...that might be a problem....but if you use the code i gave you, then you shouldnt be doing that....hmm...

so either your algorithms are slow and you need optimization or you are placing your fps code in the wrong place.....

if you're animation looks pretty smooth then you must be reporting frame rates wrong somehow, because at 13 fps it would look kinda choppy...

oh, and i clicked on the link and i cant download it either..bad link..

DavidP
06-08-2002, 01:46 PM
wait a minute....

what graphics mode are you working in?

I remember awhile back ago doubleanti had some troubles in 112h and 11Bh (high res modes, like 1280x1024 modes with 32 bit color) with getting low frame rates....

he would constantly get get around 13 to 15 fps or something around there....if you are working in one of those high res modes you might be having the same problem he did a long time ago....try asking him about it...

frenchfry164
06-08-2002, 01:53 PM
Try typing the link into the address bar (Tripod is mean like that)

No, I'm running in 800x600x16 resolution using Allegro 4. The game doesn't look choppy at all, it may SEEM choppy, but it is just because of the animation (I made big pixel skipping, I think like 7 pixels, I'm going to shrink that back a bit). But the starfield is moving smoothly and everything.

incognito
06-08-2002, 02:05 PM
I got 29 fps.........................hey ummmmm.......yeah now remembered.......there's no game play right? Because I couldn't kill none of the little enemies.

incognito
06-08-2002, 02:07 PM
oh yeah 800*600 and 16 bits here, that's how I am running my computer right now.

DavidP
06-08-2002, 02:50 PM
okay, tested your game...

its pretty cool, i like it.

it doesnt seem like it is getting 13 fps....it seems faster....huh...i dunno...but the game looks good

how did you make your particle system that you used for the explosions? i am gonna need a particle system eventually for explosions and blood on my game that i am making....

Betazep
06-08-2002, 02:56 PM
>>>The human eye sees at 16 fps


That just isn't true. Modern security system applications record video at 30fps. I have recording equipment that I can set to 16fps, and the playback is choppy... I assure you.

Human eye is realtime. There really isn't an ips or fps. It is calculated as fast as nuerons can transfer data, which is really damn fast.

No current video equipment can compete with the human eye.

Commander
06-08-2002, 03:20 PM
I couldn't play the game, it gave me an error and closed the window, it didn't stop long enough for me to read the second error :(, but the first error was,

Loading main graphics file...

Anyone know how to fix it?

frenchfry164
06-08-2002, 06:19 PM
it means your tiles.dat file is corrupt

Did I include the blood spraying with the particle engine on this ver? If I didn't, open up settings.ini and change the first number to one.

I don't know why, but my computer is SLOW. I play a game called Era Online and I also get 10 FPS on it, and there are people with crappier computers than mine, and they are getting 40 FPS. Anyone know why my computer is getting so low of framerate?

Did you really like my particle engine? It took me like two days to program it. Here is the prototype:

void start_particles(int x,int y, int rangex,int rangey, int intensity, int R,int G, int B,int direction, int life,int speed,int special_effects);

x is the starting point x (duh) and y is the starting y point.

rangex is the width of it if going up down, and rangey is the width if going left right (I'm going to combine this into one thing later on).

intensity is how many pixels are going to be part of the effect

R, G, and B, is the coloration of the particles. If you are doing blood effects, I got a seperate function, mainly to do the content filter (in the full version of it on my comp, you can remove language and gore). That is why the settings.ini's first number MUST be 1 to have the blood spray effects, 0 means gore off.

Direction is, well, the direction it goes. I set up an enumeration for it, UP, UPLEFT, UPRIGHT, DOWN, DOWNLEFT, DOWNRIGHT, LEFT, RIGHT.

life is how long on average that the pixels stay before being removed.

speed is how long on average that the pixels go.

special_effects is for doing stuff like the thrust behind the player's ship.

I basically have a linked list for all the pixels, each pixel has it's own struct. I initialize the pixels in start_particles(), by making random numbers for things like speed, life, and stuff, based on the user's specifications in the calling of start_particles(). How I do it, is I make the random number's lowest number the number specified in the calling, and the highest number is the low number +6 (sorry if I confused you). Every frame I call draw_particles, which basically draws all pixels in action, and after drawing it, it does all the movement, then checks if it is the pixel's time to be deleted. If so, it deletes it from the linked list, and scoots the rest of the structs to fill it's space.

That may be confusing, but I'm bad at explaining things.

Did you all turn on your sounds, it does have music and SFX too.

PS: Another trick you can do in the settings.ini is change the resolution to 1024x768. Do this by changing the second number to either 1, or 0 (I forget).

frenchfry164
06-08-2002, 06:32 PM
oh yeah, if you shoot an enemy twice and it doesn't die, it just stays there, you need a patch I made (it happened on my friend's comp, it's a prob with XP sometimes).

Here is the controls if you haven't figured them out:

Enter - Close a dialogue message
Spacebar - Fire your gun
Arrow Buttons - Move your ship
Escape - Close out

There are also some debugging stuff, that only I can know, hehe.

And elchulo, you can only kill all the enemies, and then some dialogue somes up, and it returns to windows. For some reason, whenever I quit the game, it comes up with one of those illegal operation dialogue boxes. I think it's because of how I am destroying the allegro datafiles. I'm trying to fix that right now.

Here is some specification of stuff I use in this:

* Double-Buffering for flicker reduction
* MIDI music and WAV sound effects, with support for MOD files, using DirectSound
* Simple particle engine
* Mouse support (in my full version that I have, it's just EXTREMELY buggy ATM)
* Joystick (see above on why I didn't put it in this version
* 16 Bit Color, perferred to be in 800x600 resolution (I get 6FPS running 1024x768 mode)
* BMP, and RLE Sprites for graphics
* Hardware Accelerated DirectDraw
* Support for goreless mode (I think this is set at default, see my last post on info on how to turn it back on)

GaPe
06-09-2002, 04:33 AM
On my machine the game is not running beacuse I don't have allegro installed. Please upload your game again and with the allegro files this time.

DavidP
06-10-2002, 11:06 AM
or you could go to the website he posted in his first post and download allegro yourself....its not that hard...

GaPe
06-10-2002, 11:31 AM
I know that it is not hard. But if he already uploaded a game than he could upload the needed allegro files too.

frenchfry164
06-10-2002, 12:13 PM
The reason I didn't include it is because some people already have allegro runtime, and there is no reason for them to download it again.