Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by bawenang · Sep 22, 2015 at 12:26 PM · optimizationoptimizeoptimisationoptimizing

Power consumption optimization

Hi guys,

Currently my game is sucking up lots of power from the device. From 90% battery down to 10 in 45 minutes, and the phone became very hot. Do you have any suggestion to optimize this?

Thanks in advance.

Comment
Add comment · Show 1
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image bawenang · Sep 22, 2015 at 12:29 PM 0
Share

BTW, I've just remembered that once in a while my game is trying to connect to the internet. I'm using these plugins: Facebook SD$$anonymous$$, Soomla Profile, Soomla Store, GPGS, and NGUI. So it's probably one of those plugins that did it. How do I check if it is actually trying to connect to the internet or not and which part of the code did it? Thanks.

2 Replies

· Add your reply
  • Sort: 
avatar image
1
Best Answer

Answer by Hullu · Sep 22, 2015 at 01:26 PM

http://docs.unity3d.com/Manual/MobileOptimizationPracticalGuide.html

Comment
Add comment · Show 4 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image bawenang · Sep 29, 2015 at 04:26 AM 0
Share

Thanks for the answer. I actually have read that, but that's not exactly what I have in $$anonymous$$d. What I was asking is how do you make a game to not eat lots of power from the device's battery? $$anonymous$$y game has been optimized pretty well and can run smoothly around 40-60 FPS. But it turns out, it sucks up the battery of the device like Cookie $$anonymous$$onster eating up cookies. In 45 $$anonymous$$utes, the battery dropped like 30 - 40%. And it became very hot.

avatar image Eno-Khaon · Sep 29, 2015 at 06:24 AM 1
Share

In many cases, game engines try and get all the performance they can out of available resources on the device (computer, phone, etc.).

If you cut back on scene and script complexity, the game will attempt to run at the highest framerate possible (unless vertical sync or other means are capping it). If you increase scene and script complexity, the game may run poorly and still be working the device. There's no answer which can satisfy all circumstances, really.

For a phone, it's a combination of the engine and script processing, the video processing, and the backlight on the screen which all drain away the battery life. Simultaneously, you're working it hard, so the electronics heat up.

There's not any simple solution to offer without knowing what kind of game you're making. The only advice I can offer, essentially, is to lighten the computational workload (scripts), the visual workload (any complex shaders or large polygon counts) and the final workload, as necessary (framerate).

That said, when you say your game runs around 40-60 FPS, that means you're working it to the fullest and it's not exceeding a potential 60 FPS threshhold that you'd have processing power to spare. If it ran at a constant 60 FPS, you would more likely have processing power to spare and, therefore, not be working it as hard.

avatar image tanoshimi · Sep 29, 2015 at 06:37 AM 0
Share

Agree with @$$anonymous$$o $$anonymous$$haon - if your frame rate is varying, your phone is maxing out the resources it has, desperately trying (but failing) to maintain 60fps.

What happens if you explicitly limit the application targetframerate to 30? You should see battery life improve.

avatar image bawenang · Oct 22, 2015 at 03:58 AM 0
Share

Ok, I'm accepting this because of the comments. Thanks guys.

avatar image
0

Answer by JamsCenter · Apr 20, 2020 at 03:01 PM

Just saying, if you game run at 40-60 fps it is not optimized.
With Gear VR and Oculus Quest we need 60+fps minimum to be accepted to store and contest.

There are hundred of ways to make run your game on an potato with Unity.
Most of those way are "pain in the ass" and affect the quality of your game rendering.
- Don't use lighting
- Don't use shader without knowing if they are optimized and useful to your game
- Don't use shadow
- Don't underestimate the garbedge collector by recycling you object - Reduce batching the maximum you can - ...

If you do that your game will be ugly as hell (and will take your 2-6 times more to do it). So you need to be creative and use art design choose to make your game beautiful.
But it will run at 60+ on a potato leading to not overheat and significant less power consumption.

Here are for example a video talking about it:
https://www.youtube.com/watch?v=w0n4fuC4fNU&t=4s

Hope it helps people that will fall on this post ;).
May the code be with you.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

31 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Is it worth making tons of similiar methods or create big one that connects things together? 2 Answers

Toggle Script Optimization 1 Answer

Optimising Sprites for 2D Unity games 1 Answer

How do you optimize your fonts? 1 Answer

Help with optimize code 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges