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 Omer.Hussain · Apr 08, 2014 at 02:36 PM · scenegraphicsdrawcallsdrawing

Game work slow in other devices..

Hi i am suffering from strange problem... my gaming is endless running game. my player is still and all the environment moves towards it.. everything was working perfect untill when i test my game on samsung galaxy omega 5.8 or Qmobile A12 and HTC one v. game works good in my galaxy note 10 and note1. But in other named devices it get slow, players starts moving through the obstacle, doesn't collide. i have added 2 scenes on left and 2 on right for environment. and applied the below script to repeat the scenes continuously. when i enable the scenes in inspector, game get slow and when i disable them it works perfect... ... i don't know whats get wrong with game on enabling the scenes...Kindly pleaseeeeee help me i am badly stuck... is it redering problim ? or any thing in graphics i need to adjust? or any other solution to create endless scenes like subway surfer type game

 #pragma strict
 
 function Update()
 {
     move();
 }
     function move(){
     if (transform.position.z<=-229)
         {
             //transform.position=Vector3(-18.25419,0.3061495,182);
             transform.position.z=299;
         }
     }

  
Comment
Add comment · Show 7
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 Omer.Hussain · Apr 09, 2014 at 06:06 AM 0
Share

no one is answering .. kindly help .. :(

avatar image supernat · Apr 09, 2014 at 06:38 AM 2
Share

Could you explain what this script does, and what you mean by two scenes on the left and right? Is this a side scroller?

These kinds of issues are why making anything for Android is difficult. Some devices will handle certain types of graphics processing better than others, (say one device may fall apart when there are a lot of transparent materials but others handle them well), and then when you repair the problem for the failing device by changing transparent textures to 3D meshes that use non-transparent materials to achieve the same result (for example), then you find the one that was working well before doesn't work well with lots of vertices now, but the one with transparency issues works great now. It's a back and forth effort to balance the various issues. If you're using any complex shaders, you should start by simplifying them and testing on the various devices to deter$$anonymous$$e the performance differences. Then start looking at the number of draw calls and reducing those as much as you can (16 to 20 is a good goal). Then look at the amount of transparent materials. Then look at the fill rate, how often do you have large textures overlapping, the list goes on.

Basically, there's no easy answer. You just have to start dumbing down things to find the bottlenecks and correct them/redesign them one at a time until it works on your target devices. I guarantee it will still have problems on other android devices. That's just a given with Android. But you want to test on a wide variety of devices, especially the more popular ones.

avatar image Omer.Hussain · Apr 09, 2014 at 08:50 AM 0
Share

Thanks for you response... i have road in the middle which is endless. it works like linklist. creates 3 roads patches.1st 2nd 3rd.. 1st road end it moves to the position of 3rd road. 2nd ends move to the position of 1st. so it works as a linklist.. player is on the road, and obstacles instantiates on the road as well and move towards player. it works perfect. player collides jump perfect. After that part, i created environment around the road. left side of the road and right side. you can say ground,buildings,plants. i created a parent empty object(left side and right side) and put all the ground and buildings in that and apply the above script and another script which moves them towards -Z direction. when left scene parent or right scene parent reaches to transform.position.z=-299; i move them back to transform.position.z=299; so it works like endless scenes around the road... like the road. i do not instantiate them again and again rather i move them like a list.. i had 2 devices note 10.1 gt n8000 and note1 gt n7000. it works fine on them but when i check on other devices low resolution i gues , player some time moves through the obstacles and do not show proper jump height...programmatically it jumps over the obstacles but visually on device show very little move not exact jump ... i hope you get my point now ... :/ ...

avatar image Omer.Hussain · Apr 09, 2014 at 08:58 AM 0
Share

and i am using simple diffuse shader for every object in the scene. is it because of the resolution? should i need to write any script for resolution? when i remove or disables scenes in the inspector it again works perfect. i remove the script of scenes movement(above script) and the script which moves them in the -z direction. now scenes on the left and right are still, static and road between them are moving. but again same issue with jump and collider. when i disable scenes it works. so issue is not with the script rather it could be with the resolution or something.. :/ .... please help its almost the last part of my game and i am stuck ... :(

avatar image HarshadK · Apr 09, 2014 at 09:30 AM 0
Share

The devices on which you are getting issues have low processing power (CPU and GPU) compared to your Galaxy Note devices. As @supernat pointed out you have to profile your game to find out bottlenecks and optimize it for your target hardware. Try to find out the particular issues that you see and post it here. Then we may be able to help you out.

Show more comments

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by $$anonymous$$ · Apr 09, 2014 at 11:55 AM

I agree with you @HarshadK CPU is slower, thats why GTA SA android isnt same as the pc version, commands are not all like PC, radio is similar, graphics not same, animations are similar. But from my view of looking to this, i see that u said: ENDLESS. every time the road is made, is it destroyed behind u on some distance or it stays there. Because if it stays u will maybe have a large problem on slower phones and machines. I know what i mean because i bugged my S4 with a game i made last month -_- :D. Sorry if u dont understand what i mean

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 Omer.Hussain · Apr 09, 2014 at 01:42 PM 0
Share

@$$anonymous$$RGX yes road destroys when it cross my fixed z position... and new road instantiate on the back of last road in the Que... my obstacles destroys as well after 10 seconds... but scenes on the other hand do not destroy they just changing their positions... as far i have figure out is drawcall problim.. drawcalls also slow down the speed.. as my same game works good in note1 and its resolution is 800x1280 pixels where as Galaxy mega with same CPU have 540x960 pixels.. if it could be the CPU problem then it shouldn't have work on the Note1... i am attaching the image as well on this image drawcall is 145... i tried another test.. i just enable my 1 left scene.. disable all others.. when my scene is out of the camera view it jumps perfect and does collide with the obstacles. when it again in the camera view game get little slow and jump visualization get low..

avatar image Omer.Hussain · Apr 09, 2014 at 02:29 PM 0
Share

alt text

screenshot_2014-04-09-18-27-59.png (471.8 kB)
avatar image HarshadK · Apr 09, 2014 at 02:40 PM 0
Share

Do not use default OnGUI elements for mobile device games. Default Unity GUI is not meant for mobile devices so do not use it. It is very resource intensive. Use any other GUI assets from store or open source like UIToolkit.

avatar image Omer.Hussain · Apr 10, 2014 at 06:34 AM 0
Share

ok @Harshad$$anonymous$$ i will change that but what about draw calls .. is it because of the draw calls.. ? i disable GUI but draw call are still 135-155... as now you can see in the image my rite and left scene... these are just the prototype materials .. here i will be using houses buildings etc .. but i couldn't figure out the solution yet ... i am at the end of my game .. i can't end it because of this.. as in other games turd bird,subway surfer, temple run etc they use full environment(building, bridges, houses etc )...and those games are working fine on all my devices... this is the only source i am seeking help ... :( ..

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

22 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

Related Questions

Graphics.DrawMesh not working 2 Answers

A node in a childnode? 1 Answer

Scene and hierarchy suddenly empty 0 Answers

Weird Scene View 'Glitching' 0 Answers

Removing scenes with set conditions 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