• 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
fir

optimization and power consumption rate

8 posts in this topic

Do the optimization made less power consumption on computers?When long calculation can be done in a day instead of the week it is obviously yes, but what with game code when you optimize  the main loop (for example 5 times) It will make processor load 5 times lower and will it make it cooler?

 

Personaly I take a power consumption of my machine into a heavy account (in practise more than computation power) because it cost money and is quite noticeable (my own old machine + monitor  takes for example I think tess than 100W maybe even 50W, it seems that it consume less than my 14' tv set - and I would not want to buy a 400W monster or something)

 

It seem that worse than the CPU is GPU, Is it? Do the GPU code optymisation techniques lower the GPU energy consumption noticeable?

Edited by fir
0

Share this post


Link to post
Share on other sites

Optimizing game code can both save on power consumption and increase it, depending on the situation. In general the more time something spends executing instructions, the more power it will consume. However most of the time any sensible optimization (i.e. one targeted at the bottleneck to improve frame rates) will increase power usage.

 

For example let's say your game is running at 20ms / frame on the CPU and 10ms / frame on the GPU. This means the GPU is 50% idle, and the CPU is at 100% load. Now lets optimize the CPU usage down to 15ms. The CPU is still at 100% load, but the GPU is now at 67% load and therefore the overall power usage has increased.

 

There's one setting that can save lots of power - turning on vsync. With it on both the GPU and CPU can end up idle for significant quantities of time while waiting for the monitor to display the next frame.

 

Optimizations that don't improve the frame rate, should save on power usage instead.

2

Share this post


Link to post
Share on other sites

Do the optimization made less power consumption on computers?

Yes, with the exception of the situation Adam described - if you use the extra time you have to do more stuff (render more frames), then that might not be lower power. But if you use the time to do nothing (your process/thread sleeps) then it's lower power.

When you have >60 fps then you might want to put in a frame limiter to throttle it to 60 and sleep during the 'spare' time. Or substitute whatever X you want instead of 60.
2

Share this post


Link to post
Share on other sites

Adam_42 is totally correct.  Games aren't normal software.

 

Most software starts doing a task, and when it's done, it terminates.  Thus, if code optimization reduces the run time, then it very probably also reduces the consumed energy for accomplishing that task.  Games on the other hand tend to sit in a loop, and their task doesn't terminate until some external event occurs.

 

On a side note, there is also a fair bit of recent academic research that has been done on the topic of compiler optimizations specifically for energy efficiency.  It kind of started developing in the mid-1990's, but didn't see a lot of uptake until relatively recently, now that energy efficiency is becoming a really big deal.  Check out the 1994 paper "Power Analysis of Embedded Software: A First Step Toward Software Power Minimization" for a light introduction to the topic.  It's also cited nearly a thousand times, by everyone and anyone who has done work in this area, so you can very easily google scholar search for more details on this topic.

 

Bottom line though, energy efficiency is FAR more an architectural thing than a software thing.  One of the biggest decisions a software developer can do to save energy is just not compute stuff.  Everything you don't compute takes less energy than everything you do.  Thus, running your game at 30 fps is going to take less energy than running it at 60.  One of the only times that compilers start to really make a big difference with regard to energy consumption is when you're compiling for something that isn't just a processor, but features various kinds of processors and coprocessors that specialize at different things.  Anything a compiler can more from big & fast to small & slow without getting creamed on performance is going to save you energy, anything a compiler can move from general purpose to special purpose is going to save you energy.  These methodologies though aren't commonly seen in regular compilers though, because systems that are packed with specialized coprocessors aren't commonly seen in regular computers.

Edited by Oolala
2

Share this post


Link to post
Share on other sites

Since Mobile gaming has been focusing on saving energy (due to battery constraints), you may be interested in what they are doing.

For example, here's a good start (memory bandwidth consumes a lot more power & heat than cpu/gpu ALU).

visit the GDC 2012 vault (there's a free section), and google for the SIGGRAPH 2012 & 2013 presentations; there's a lot of mobile talks focusing on power efficiency. I haven't yet catch up with gdc 2013 slides so there may be something too, I don't know.

1

Share this post


Link to post
Share on other sites
Power consumption is proportional to how much work the processor is doing. Optimizing for speed does that, and tries to increase the number of things the processor does in parallel. Instruction Level parallelism does not add any additional overhead, that is not already incurred by virtue of the processor supporting it. So as long as you're not optimizing by making a program multi-threaded, optimizing for speed will optimize for power.

Optimizations that reduce access to main memory or improve cache performance may also reduce the power consumption of memory, I think. Certainly reducing page faults and Hard-disk IO will give power savings.

Optimizing by moving computation to the GPU is, IMO, likely to reduce power when it also improves speed, because these kinds of computations tend to use memory less efficiently when run on the CPU, but I'm not confident of that.

On the other hand, making a program threaded, or use threads more efficiently may consume more power, because there is a cost to synchronizing threads. The same applies to multi process or multi machine "programs", though power consumption tends not to be a dominant consideration in network communication.



Others have pointed out that if you optimize for speed, but increase the frame rate, you're not reducing power consumption. Edited by King Mir
1

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