5

I just want to say thanks in advance for anyone you can provide some help on this we're completely stuck at the moment.

Project Scenario : -> 2D side scrolling game with simple 2d sprites -> Camera is orthographic and stays in its place (camera doesn't move) -> My Character (A camel) is also static and does not move. -> The sprites (Platforms) move from right to left (movement done by script) -> Project Video is uploaded here (running on iphone5). It clearly shows the small hiccups and jerks.

Issue : The game works very smoothly on Android devices and Unity Editor (no spikes on the Unity profiler as well) But, when i run it on iOS devices (iphone5, iphon5s) the motion of my sprites is jerky. Like it will move smoothly for like 1 second and then a small hiccup/jerk of a split second occurs. This results in lag and lagging motion of the game which is very annoying as i am unable to get the right quality for iOS.

Things i have tried : -> I have studied many possible solutions on various threads and forums but none issue seems to be working for me :-( -> I have tried different scripting techniques like use Lerp function for movement, tried putting the code in LateUpdate and also FixedUpdate. -> I also turned off vSync in project Quality settings but no luck :-( -> I also tried the movement without the script by making an animation of the sprites to move from right to left. -> I tried making the project from the latest Unity 5.1 as well but still the same lag :-( -> I tried reducing the sprite sizes to very low (low quality pixels) but still issue prevailed. -> I also tried to change the camera to perspective view to see if it reduces the jerk or not

I am sure lots of other people around must have faced this issue while making a 2D game of such sort. I hope someone must have overcome the issue and can please help me with this. This has been an issue with me for long now ...

I would really appreciate any help ... any new technique in unity or any better optimised logic of making such a 2D game in Unity. Thanks.

Looking forward to everyones input.

YOUTUBE LINK TO VIDEO FOR REFERENCE - https://www.youtube.com/watch?v=cnST1QzoDw4

4
  • Hi, some ideas..: Have you tried profiling? Maybe it can be a way to know which process is consuming more resources and see if the cause of your problem could be a code issue. Are you using pooling? Are you resusing your scenario elements? Sometimes creating and destroying objects causes little lags.
    – mayo
    Jun 29, 2015 at 15:53
  • I have same issue, even my game is more simple than yours, just 1 sprite for background and 1 sprite renderer for moving object. I switch the Vsync on and off but it not work. I think this is Unity problem.
    – Anh Bảy
    Dec 2, 2015 at 7:34
  • Can you provide a link to that project? Or at least the code for the moving object?
    – RaidenF
    Dec 2, 2015 at 8:43
  • Hi,did you find the solution? It would be appreciated if you can help
    – Lanston
    Mar 10, 2016 at 7:47

0

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.