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 Talantyyr · Feb 19, 2014 at 10:23 PM · spriterigidbody2dstutter

Game stuttering

I'm making a 2D side scrolling game and my game is stuttering. It's very strange, since i have constant ~60 fps per second.

After spending a few hours of trying around, i ended up with the player character alone (allother objects disabled), and it still stutters on my Galaxy S3.

Here's a link to the APK http://www.talantyyr.at/FlippingBeaver.apk

All there's left is an animated sprite, with a Rigidbody 2D attached. (Mass 1, Linar Drag 0, Angular Drag 1, Gravity Scale 2, isKinematic true, interpolate none, sleeping mode start awake)

All i do to move the beaver is

 myCharacter.rigidbody2D.AddForceAtPosition(Vector2.up, new Vector2(-1, 0));

Strange thing is, that the framerate doesn't drop...

Edit: I've tested the scene i've uploaded on my Tablet (Asus Memo Pad HD7) and there's no stuttering at all... Then i've tried the complete game on the tablet (Older version, where i use instantiate instead of using gameobjects from a pool) and even that version runs perfectly fine on the asus memo pad, which has less powerful hardware than the S3.

Could it be, that there's a problem with the Galaxy S3? My Wife has the same phone and i've tested it on both devices with the exact same result. Is there something known about this?

Comment
Add comment · Show 4
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 POLYGAMe · Feb 19, 2014 at 11:40 PM 0
Share

Do you have any dynamic fonts in the game? That gave me that issue, as every time a new letter or number is rendered, a new texture is created and it can cause a CPU spike.

avatar image Chris2k · Feb 20, 2014 at 06:56 AM 0
Share

I've read about that already and disabled all texts for testing purposes.

I guess it must be something device specific, since it runs very smooth on my Tablet. I've also tested the whole game (including dynamic fonts) on a friends nexus 4 device today and it also runs perfectly fine on his device.

avatar image POLYGAMe · Feb 21, 2014 at 12:02 AM 0
Share

Best not to use dynamic fonts at all on mobiles as some devices just hate them.

avatar image Chris2k · Feb 21, 2014 at 09:01 AM 0
Share

yeah, but it's still stuttering on the Galaxy S3, even with no dynamic fonts. :(

2 Replies

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

Answer by Talantyyr · Feb 25, 2014 at 06:34 PM

Problem solved. When i started the project, i enabled "Multithreaded rendering"... it sounded like a good idea :) In fact, it wasn't.

I'm just happy that the problem occured on my device and not after releasing the game.

Now i've finished Flipping Beaver and released it to Google Play.

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
avatar image
0

Answer by matra · Feb 19, 2014 at 10:43 PM

I had a similar problen chaning mass of Rigidbody to minimum (0.0001) and Gravity Sacle to 0 has fixed the problem for me. However, I was not using AddForceAtPosition, I am moving the object by explicitla setting it's transform (I do not need to use Physics).

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

21 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

Related Questions

Not able to Get clicked sprite name in this code 1 Answer

How can I stop my endless runners background sprites from falling out of sync? 1 Answer

RigidBody2D.MoveRotation() Custom Pivot 0 Answers

2D character movement is jittery (top-down) 1 Answer

2D sprites flickering when moved at high speed 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