• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.

Archived

This topic is now archived and is closed to further replies.

Qoy

Frame rate

16 posts in this topic

Have you tried running it through the profiler to see what is occupying the majority of your execution time?
0

Share this post


Link to post
Share on other sites
If you sent me the code i could have a look at it,im familiar with that library as well.Thou i don't use it. Otherwise what resolution is your game and what depth im guessing 8bit with that lib.
0

Share this post


Link to post
Share on other sites
Ohh i forgot my email is lordvar@in-tch.com if you want to send me it to take a look. Also whats up with the new status? Im not use to seeing me as a guru.
0

Share this post


Link to post
Share on other sites
I think the Guru thing comes from 50+ posts

(Which is dead silly, since 50 stupid questions (or answers for that matter) doesn't really make anyone much of a Guru, )

/Niels

0

Share this post


Link to post
Share on other sites
A thing to check is to make sure you compiled the program in RELEASE mode. The other thing to check is if you are using the Debug Runtime DirectX files - that will slow you down as well.
0

Share this post


Link to post
Share on other sites
The Dummies book is good, but it forgets some stuff. Have you looked where your surfaces a placed. If you have an old computer (P120) I recommend that you take the primary buffer in the Vram and the secondary and offscreen surfaces in system memory. If you have it in any other way will it become slow.
0

Share this post


Link to post
Share on other sites
By the way don't use FLIP if you only got a primary and a backbuffer. It is SLOW use bltfast instead.
And see if you can update pieces of the screen instead of the entire screen.
0

Share this post


Link to post
Share on other sites
Macke I belive you are incorrect about flipping. Flipping is almost always faster then bliting. Reason being because flip just exchanges pointers to the surface ,and doesn't have to copy all the information from the one surface to the other. Only reason it might be slower is because it normaly waits for the vsync before flipping. However you can tell it not to do this. Also as a final point even if flip isnt supported in the hardware it acts as a bltfast then.
0

Share this post


Link to post
Share on other sites
The game is full screen. I don't have it in release mode, but I don't think having no optomizations is an excuse for code this slow... I have to work on the speed in the code. I keep telling myself to put the surfaces in VRAM, but I also keep forgetting to. I do have the primary surface in VRAM though... I am using the standard (not debug) DirectX runtime libs.
Is there anything special I should try that would make it considerable faster?

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

0

Share this post


Link to post
Share on other sites
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.
0

Share this post


Link to post
Share on other sites
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

0

Share this post


Link to post
Share on other sites
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

0

Share this post


Link to post
Share on other sites
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.
0

Share this post


Link to post
Share on other sites
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.
0

Share this post


Link to post
Share on other sites
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?
0

Share this post


Link to post
Share on other sites
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

0

Share this post


Link to post
Share on other sites