Quantcast
Channel: Questions in topic: "framerate drops"
Viewing all articles
Browse latest Browse all 141

(Unfixable?) iOS frame drops/stutter issues

$
0
0
I have a REALLY basic game and I have done my best to optimise the hell out of it but I still get an odd pause that lasts around 0.2 of a second every so often. I have noticed that the longer I leave the game running, the less is occurs. I have cached EVERYTHING in my game, I have tried running without collision, I have turned off all the sound, removed game objects, I have literally tested with and without every single item in the game and I can't get it to go ways. The other issue is that the collision is very delayed. When my ray cast hits the object, there is a decent pause before it triggers the "game over" function. This is a basic game with 5 obstacles that I recycle, a player ship that is made out of six separate parts that breaks up on game over, a cylinder, a few 3D text objects and a few quads rotating with stars. All movement is being handled with transform.Translate (I have also tried every other possible combination of moving everything but nothing helped with the stuttering or the collision issues). As you can see from the image, the game is VERY simple, but because it's fast paced, the pauses are really noticeable and the game is difficult enough without these hiccups! ![alt text][1] It also needs to be noted that these issues ONLY happen on iOS, on all of my devices (iPad4, iPhone 4, iPhone 4S, iPhone 5C). What's even stranger is that I get a perfect 60fps on all devices, even the 4, so I'm certainly not doing anything to test the grunt of these machines! Here is my collision code and yes, I tried with triggers/colliders too, still have the issues. I've even tried using box colliders instead of mesh colliders... NOTHING works! function CheckCollision() { RayStartPos = _rayEmitterTransform.position; if (Physics.Raycast (RayStartPos, transform.right, hit, fRayDistance) || Physics.Raycast (RayStartPos, transform.forward, hit, fRayDistance * 2) || Physics.Raycast (RayStartPos, -transform.right, hit, fRayDistance)) { bGameIsOver = true; } else { Debug.DrawRay (RayStartPos, transform.right * fRayDistance, Color.green); Debug.DrawRay (RayStartPos, -transform.right * fRayDistance, Color.green); Debug.DrawRay (RayStartPos, transform.forward * (fRayDistance * 2), Color.green); } yield; } [1]: https://fbcdn-sphotos-a-a.akamaihd.net/hphotos-ak-frc3/t1/1959250_590622711031304_1329120180_n.jpg

Viewing all articles
Browse latest Browse all 141

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>