• 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.
Sign in to follow this  
Followers 0
parinho7

Do I need a frame cap?

18 posts in this topic

I am completing some beginner projects with c++ and SDL and I've read most of the lazy foo and sdltutorials. Up until now I used "frame independent movement" (as one of the tutorials explains) in the games I've made. Searching around I saw that the code in many tutorials uses regulated frame rate (using SDL_Delay). I was thinking witch method is better? Since with "frame independent" the program can run in my pc at about 175 fps isn't it better to just leave it uncapped?

I am in a learning process right now and I'd like to learn from people here on this matter. Thanks in advance!
0

Share this post


Link to post
Share on other sites

Wait a second...

 

If you turn v-sync off you will need to take extra steps to ensure you don't accidentally burn out the player's video card or CPU, both of which have happened with badly-developed games.

 

What kind of hardware was that? The hardware should slow down in the worst case (due to running out of processing time) o_O That looks more like faulty hardware or hardware not running under the proper conditions or something like that.

 

Back on-topic: it depends. A fixed framestep is much easier to handle, but you can't go beyond its speed and if it slows down you need to start applying frameskip. A variable framestep is supposed to be able any framerate but it's much harder to handle, especially if you want to handle situations that happen in the middle of two frames that would affect what happens later (e.g. collision of two objects).

Edited by Sik_the_hedgehog
0

Share this post


Link to post
Share on other sites
Wait a second...



If you turn v-sync off you will need to take extra steps to ensure you don't accidentally burn out the player's video card or CPU, both of which have happened with badly-developed games.


What kind of hardware was that? The hardware should slow down in the worst case (due to running out of processing time) o_O That looks more like faulty hardware or hardware not running under the proper conditions or something like that.
You see it every few years on major games.

Starcraft 2 had v-sync disabled on their main menus with no delay in place. It burned out quite a few cards. http://www.gameinformer.com/b/news/archive/2010/07/28/blizzard-confirms-starcraft-ii-overheating-bug.aspx
1

Share this post


Link to post
Share on other sites
It's not game's fault if you have dusty graphics card or overclock it till it fries. That's not even a bug. Edited by Zaoshi Kaba
0

Share this post


Link to post
Share on other sites
It's not game's fault if you have dusty graphics card or overclock it till it fries. That's not even a bug.
The cards did not need to be overclocked, nor did it require dust. As for it not being a bug, Blizzard issued a software update that fixed it.

Starcraft 2 was not the only game to do it, a few seconds on google finds a rather long list of games that have a tendency to overheat the hardware.

The point is that caution is warranted. I'm among the people who have accidentally fried hardware, and many times have triggered overheating warnings on my machines -- and notably, I don't overclock. Turning off v-sync to get higher framerate has risks and probably shouldn't be encouraged in beginners.
0

Share this post


Link to post
Share on other sites
It's not game's fault if you have dusty graphics card or overclock it till it fries. That's not even a bug.
The cards did not need to be overclocked, nor did it require dust.

 

So you're basically saying it's normal that GPU is unable to operate at full power?

Following your logic Prime95 supposed to overheat and fry CPU as well. That's NOT normal, it's hardware/user issue, not software.

0

Share this post


Link to post
Share on other sites



It's not game's fault if you have dusty graphics card or overclock it till it fries. That's not even a bug.

The cards did not need to be overclocked, nor did it require dust.
So you're basically saying it's normal that GPU is unable to operate at full power?
Following your logic Prime95 supposed to overheat and fry CPU as well. That's NOT normal, it's hardware/user issue, not software.
Graphics cards are pretty complex pieces of hardware, and they are engineered to survive "normal" operation, but swapping buffers 500-1000 times per second with a very simple scene, which can happen in menues that is not capped is not really "normal operation".
I imagine it puts a lot of stress on small parts of the hardware and create hotspots.
One could argue that the hardware or the drivers should be smart enough to not do things like that, but obviously they aren't.

I remember my old card starting to emit a high pitch noise (not from the fans) when the fps got above 200-300 or so... didn't dare to run it long like that.

I wouldn't call it normal, but it's the reality... Edited by Olof Hedman
0

Share this post


Link to post
Share on other sites
<blockquote class="ipsBlockquote" data-author="Olof Hedman" data-cid="5014385"><p><br /></p><blockquote class="ipsBlockquote" data-author="Zaoshi Kaba" data-cid="5014378"><p><br /></p><blockquote class="ipsBlockquote" data-author="frob" data-cid="5014357"><p><br /></p><blockquote class="ipsBlockquote" data-author="Zaoshi Kaba" data-cid="5014353"><p><br />It's not game's fault if you have dusty graphics card or overclock it till it fries. That's not even a bug.</p></blockquote>The cards did not need to be overclocked, nor did it require dust.<p><br /></p></blockquote>So you're basically saying it's normal that GPU is unable to operate at full power?<br />Following your logic Prime95 supposed to overheat and fry CPU as well. That's NOT normal, it's hardware/user issue, not software.<p><br /></p></blockquote>Graphics cards are pretty complex pieces of hardware, and they are engineered to survive "normal" operation, but swapping buffers 500-1000 times per second with a very simple scene, which can happen in menues that is not capped is not really "normal operation".<br />I imagine it puts a lot of stress on small parts of the hardware and create hotspots.<br />One could argue that the hardware or the drivers should be smart enough to not do things like that, but obviously they aren't.<br /><br />I remember my old card starting to emit a high pitch noise (not from the fans) when the fps got above 200-300 or so... didn't dare to run it long like that.<br /><br />I wouldn't call it normal, but it's the reality...<br />&nbsp;<br /><p><br /></p></blockquote><br />Thats pretty bad, this would mean that it is still possible to write a virus that damages the users hardware. (a practice that should have died with DOS). It is most definitly a driver bug/flaw and while we should work around those for the sake of our users we shouldn't be held responsible for them.
1

Share this post


Link to post
Share on other sites

In response to Zaoshi Kaba;

 

It's no different then the engine in your car.... Good for about 100000 miles, assuming normal driving conditions. But if you have a tendency to keep the revs up at 8,000 your not going to get there and the possibility of major failure is greatly increased if the vehicle is redlining.

0

Share this post


Link to post
Share on other sites

That's just usual deterioration. Everything wears down eventually and that's not software's (or in car's case fuel's/road's) fault. GPU was old and for unknown reasons it caught fire instead of downclocking. 

 

If you take old enough computer it'll have troubles playing high resolution movie, doesn't mean it's supposed to explode just because it works at 100%.

-1

Share this post


Link to post
Share on other sites
That's just usual deterioration. Everything wears down eventually and that's not software's (or in car's case fuel's/road's) fault. GPU was old and for unknown reasons it caught fire instead of downclocking. 

 

If you take old enough computer it'll have troubles playing high resolution movie, doesn't mean it's supposed to explode just because it works at 100%.

The fact is that it has happened before.  While we would like to think that hardware and drivers are smart enough now to no longer do this it can still happen.

 

It has happened to me before also.  Without overclocking and with a GPU that was in good shape it did get overheated by a game that VSync turned off at the menu like was stated.  I remember seeing numerous of posts on the games forums about it.  The developers came out and released a patch for the issue.  Exactly like StarCraft 2.

 

Hell their are even 360 games (one that was released last year) that wold overheat certain driving wheels.  Game did not not have proper force feedback programmed and a couple users wheel went out because the game would overheat them.  I don't see this as any different than  GPU overheating.  The wheels hardware and drivers should be smart enough so this doesn't happen yet it still did happen.  Sadly this game never did release a patch on the 360 that fully fixed this issue.  Issue only happened on the 360 didn't happen on the PS3 version of the game.  

 

Though I feel this thread has gone off topic to more talking about hardware overheating.

0

Share this post


Link to post
Share on other sites
I am completing some beginner projects with c++ and SDL and I've read most of the lazy foo and sdltutorials. Up until now I used "frame independent movement" (as one of the tutorials explains) in the games I've made. Searching around I saw that the code in many tutorials uses regulated frame rate (using SDL_Delay). I was thinking witch method is better? Since with "frame independent" the program can run in my pc at about 175 fps isn't it better to just leave it uncapped?

I am in a learning process right now and I'd like to learn from people here on this matter. Thanks in advance!

I would say it almost entirely depends on the game you have.

 

Normally you want to allow the user the option of turning vsync on, the only real reason for vsync is to prevent screen tearing(which arguably is not as big a problem as it once was.) Most games tend to leave it disabled at the start and let the user enable it if they require it.

 

Pros:

  • No tearing: Tearing is one of those issues where if you aren't seeing it, you don't care, but if you do see it, it completely wrecks the game. Thus having it at least available can be important, but keep in mind that if it doesn't occur then vsync is a total waste short of being nice to the video card.

Cons:

  • Frame capping: The problem with Vsync is that the video card literally has to wait for the monitor to finish a refresh before it can swap the buffers and display the new image, this works all fine and dandy if your video card is kicking out -over- 60 FPS, but if it dips below the video card will be stuck dropping down to a number like 30 FPS due to the way refresh rates work. A lot of people find wasting possibly half the frames they could create in a time period a big issue, especially if your monitor isn't subject to tearing!

 

Personally I don't at all agree with some of the other posters here that you should consider capping framerate simply due to the fact a user's hardware might overheat, I see that as a hardware flaw and problem more than a software one.

 

Does that mean you shouldn't take it into consideration? Of course not, there is something to be said about vsync being enabled on things like game menus, these places of course should be expected to render at a very high rate compared to being actually ingame, and enabling vsync or at least putting a frame cap on might be beneficial here.

 

But like I said, what it comes down to is what you think the behavior might be. Frankly I have not once in the last few years seen screen tearing on any game with vsync disabled, it is almost a moot issue to most people anymore, and why it is usually optional. But consequently if you were making pong or something you wouldn't need it running at 300 FPS either.

 

I'm sorry if I'm not really pointing to one option or the other, I definitely think if you don't want to give the players a choice to enable it or disable it then what you leave it "stuck" at is a matter of personal opinion and it comes down to if you are more worried about low FPS or screen tearing.

Edited by Satharis
0

Share this post


Link to post
Share on other sites
So you're basically saying it's normal that GPU is unable to operate at full power?
Following your logic Prime95 supposed to overheat and fry CPU as well. That's NOT normal, it's hardware/user issue, not software.
It's not anyone's fault. But it's possible to add unnecessary wear and tear to things.

A lot of games use real time streaming. Some of those games keep it up at strange moments. Like in the menu screens between multiplayer rounds, the drive head is heard screeching back and forth reading off random spots on the disc. I had one game that played random video clips on the title screen, the creation/editor screens (which you could spend hours in), and anywhere else that wasn't the main game. It killed the machine.

Some of my PC games had SecuROM in it, and it would needlessly access my game discs at a very high rate. My drive would emit a high pitched squeal for the entire time I'd run those games. Eventually, my expensive, first gen, name brand CD burner that cost hundreds of dollars crapped out on me prematurely.

To have a menu screen(where people will often leave the game when they take a break) running uncapped, especially on screens that are only running 60 hz anyways, is highly irresponsible programming.

I have a game on my tablet that does the same. It makes the entire tablet heat up and stay hot the entire time it's running, and it's not actually doing anything. I can run netflix or youtube, or GTA 3 for hours and nothing happens. Tablet stays cool and responsive. But this crappy little app that just blits a few sprites is going to burn through my tablet. smile.png

You can always do un-needed wear and tear to someone's hardware by doing stupid things.
0

Share this post


Link to post
Share on other sites

It's something that hardware manufacturers should be getting yelled at for, but that's not the way consumers think and it's also not an optimal worldview. One of the keys to success in cases like this is to take responsibility rather than placing responsibility. If there's a potential problem with something that you're doing then solving the problem will get you a lot farther than passing the buck. It's not about who's at fault: it's about making things work.

 

Meanwhile, I'm sort of ambivalent about vsync: Typically I'm all for giving people control over what's going on, but in the case of allowing an end-user to disable vsync I'm a bit iffy since end-users tend to be of the mindset 'faster is better', even in cases where the truth is 'faster is the same or worse'. If your monitor is running at 60hz then a framerate of 5000 isn't going to give you smoother motion. Vsync'ing is a great way to avoid wasted work for the gpu, the cpu and etc. This means background apps/other threads/etc have more CPU time available and it also means you use less electricity, which isn't a huge deal on a PC but certainly can be on portable devices.

 

Just don't use it to set your framestep, lol.

-1

Share this post


Link to post
Share on other sites

[quote name='iMalc' timestamp='1356560361' post='5014512']
Think about how much power that little SC2 fix probably saved in Korea alone!
[/quote]

 

+1 sir, that was pure gold.

0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0