Frame rate

Started by
15 comments, last by Qoy 24 years, 5 months ago
Yes, Flip can be faster. But I have never have experinced it. My computer seems to be in the same ballpark as Qoy. I have heard that the screen may flicker if you take away the Vsync from flip. But you are probably right. Everyone on the net says different things.
Advertisement
Flip should always be what you use UNLESS you have specific knowledge that the computer / video card don't support flipping OR hardware accelerated blitting. The cool thing is this: If you use Flip() and you're on a nice machine and the back buffer is in video memory, the Flip operation takes NO time (because the internal pointers are just flipped). If the computer doesn't support true flipping but you still have the back buffer in VRAM, the Flip() will execute a Blt() utilizing the hardware accelerated blitting.

Basically, Flip() is your choice unless you know you have a less-than-high end computer with no hardware acceleration.

- Splat

Splat: I'll back that up!

If you attempt to time flip(), remember that it will wait for e.g. blits to complete + for vertical blanking. So, timing flip() will almost certainly time more than just the flip operation.

/Niels

<b>/NJ</b>
If your back surface is in system memory I could see a Flip command taking more time than a BltFast command. Reason being that I think it uses the more generic and less optimized Blt command to do its drawing in such a case. Same could go for a video memory surface on a card that does not support hardware accelerated blting.
My computer has only got 1mb Vram. I put my backbuffert in the systemmemory. Im not sure what happens when I use flip but blt is twice as fast as flip.
Hello. I have made a simple Space Invaders clone, and am now working on a PacMan clone. I have it so that the levels are tile based, and every object (wall, characters, food, etc.) takes up one tile. The level loads from a text file, and that works fine, but I am having trouble with the code to draw the level. What it does is cycle through the array of tiles 1 by 1 (there are about 20*20 tiles) and based on their type, it draws the correct image to the screen, in the correct coordinates. This works fine, but brings the frame rate down to a whopping 8 fps. Granted, I am using a slow 120 mHz Pentium, but it still shouldn't be that slow... I was wondering if anybody could give me any tips on how to speed up the framerate. I am using the game engine that came with Windows Game Programming for Dummies.
Any help is appreciated,
Jonathan Little

------------------
http://qoy.tripod.com

I'm just wondering something that really doesn't belong here. You said you use a game engine from the book Windows Game Programming for Dummies. I was thinking of buying the new book from Andre Lamothé, which I've been told is just a longer version of Windows Game Programming for Dummies. Does the WGPFD have anything that Andre's new book hasn't?

This topic is closed to new replies.

Advertisement