Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 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 Bananaman · Apr 28, 2013 at 07:38 PM · androidslow

how do i make my game run more smoothly?

So I released a game on the android market and it seams to have this very strange issue on some phones and tablets. It pixalates everything and runs super glitchy. Anyone have this problem or know how to fix it? the game is minemaze if you need to test it to see for yourself.

Update:

Just got the information, it is a Motorola droid 3 running on android 2.3.4 gingerbread. As for the the game, it is a 3d first person game, no multiplayer. Problem is still persisting after I did more optimization. Game is now running over a thousand fps in the editor haha. Still no luck on this individual case.:

Comment
Add comment · Show 2
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 Fattie · Apr 29, 2013 at 07:22 AM 1
Share

Your images are too large. It's that simple.

avatar image Bananaman · Apr 30, 2013 at 05:58 AM 0
Share

So I reduced all the textures to compressed format with a size limit of 512x512 except for some nontiling textures at 1024x1024. The game is running silky smooth at over a thousand fps and still looks fantastic. No luck on the problem though. This continues to be a very intriguing problem.

1 Reply

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

Answer by DESTRUKTORR · Apr 28, 2013 at 09:35 PM

Performance can be a tricky thing to master, with mobile devices, and without knowing about how you've set up the game, and given I don't have an android, there's no way of knowing, from where I stand, exactly what the issue is. However, here are some pointers on pinning down performance issues, with unity:

  1. As with any program, look for non-IEnumerator loops (loops that are not handled on another thread, or at least don't behave as though they were) and inefficient algorithms in your code that might be hogging the processor's time.

  2. Reduce the number of "dynamic" method calls as much as possible. This includes, but is not limited to, GetComponent, SendMessage, BroadcastMessage, GameObject.Find, FindObjectOfType, FindObjectsOfType, etc. Unity is full of expensive, but deceptively convenient built-in methods and functions.

  3. Reduce memory overhead - If you can accomplish the same logic with less variables, within an acceptable (or lower) amount of time, do it.

  4. If you're not sure if something is causing the delays, try a stress-test. For example, if you suspect a specific method of causing the delay, try writing another method to call it a very large number of times (on the order of 1000 or greater, is best), and run a clocking system to test how long it takes (c# has the StopWatch class, for this).

  5. Make sure you're using ONLY mobile-friendly shaders! By the sounds of things, this may well be your problem, but, again, without any input from you, I can't be sure.

Comment
Add comment · Show 7 · 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 Bananaman · Apr 28, 2013 at 10:05 PM 0
Share

Thanks for the reply! I am using all mobile shaders but I did find however that I never set up the performance settings. I made sure there was only one setting that had good quality but not slow and the fps shot through the roof unlike before. SO possibly the devices that were having the issue thought it had enough power to run the highest settings. Anyways, need to get my hands on some testing devices that were having some problems and see if the problem has been solved.

avatar image whydoidoit · Apr 28, 2013 at 10:07 PM 1
Share

I should point out that IEnumerator loops are also run on the main thread, just potentially spread out across frames.

avatar image DESTRUKTORR · Apr 28, 2013 at 10:40 PM 0
Share

Ahh. Well they behave as though they were running on multiple threads, whydoitdoit XD

avatar image whydoidoit · Apr 28, 2013 at 10:41 PM 1
Share

No they really don't. They don't run in parallel, there is no need to lock access to variables and an infinite none yielding loop in one will totally crash the program.

avatar image DESTRUKTORR · Apr 29, 2013 at 01:37 PM 0
Share

That's not what I meant T_T What I meant was the -desired- behavior of "sharing" processing time is there... The fact is that if you run something in a while loop within an IEnumerator, with a yield return, it will still allow other things to run, in s$$anonymous$$d of just holding up the processor, similarly to what one might make a separate thread to accomplish.

Show more comments

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

15 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

Related Questions

android project issue/error/problem...help!! 0 Answers

Problem parsing the package - android 1 Answer

App restarts Android device on launch 1 Answer

iPhone 4 game lags 2 Answers

How do I make a double tap for android? 0 Answers


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