• 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
1
Question by raggi · Apr 21, 2010 at 06:01 PM · lag

2d game lagging

Hey guys. I'm making a side scroller with orthographic view. When I build and run it it is lagging alot.

I made the background out of 12 tiles all of which are 4096 argb 32bit. I'm not sure if this is a problem or not. It seems to lag the most where the planes meet. Anyone have experience with this ?

Comment
Add comment · Show 3
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 x4000 · Apr 21, 2010 at 07:04 PM 0
Share

To add to what the others have said: I generally try to keep textures for 2D games to just 1024x768 at absolute most, and the majority are 512x512 or smaller. Unity can pump thousands of smaller sprites (64x64 and down) through the pipeline at a great framerate, but you don't want to go too crazy with the larger sprite sizes, even on the PC.

avatar image x4000 · Oct 13, 2010 at 03:48 PM 0
Share

Correct: I meant 1024x1024. Power of two is best.

avatar image mustafakemal · May 03, 2015 at 10:29 PM 0
Share

I have the same problem. But my animations work well after 3. or 4. playing. I think Unity don't load my sprites when i instantiate my prefabs. how can i force Unity to load animation sprites before when i want to play.

2 Replies

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

Answer by Eric5h5 · Apr 21, 2010 at 06:51 PM

12 tiles of 4096x4096 each = 780MB of VRAM, assuming mipmaps are off (or 1020MB if they're on). Which is far too much; you'd be constantly loading and unloading from RAM. A reasonable number of computers can't even use texture sizes of 4096 in the first place.

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 e.bonneville · Apr 21, 2010 at 06:31 PM

Well, yeah. The size of those images are massive... you have them on the highest setting, which eats up FPS like crazy. Did you do that on purpose? One way to bring up the FPS is to decrease the size of the images by changing 4096 to 2048 or some smaller number, and if possible, argb 32bit to rgba 16 bit. Remember, a good game features a combination of speed and quality, so if your game is still lagging, you may want to consider creating smaller images for your background.

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.

Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



Follow this Question

Answers Answers and Comments

1 Person is following this question.

avatar image

Related Questions

Enemy AI Lagging 0 Answers

Second camera in editor causes flicker/judder/lag in VR image. 0 Answers

Remove jitter from interpolation of multiplayer networking (C#, Smartfox Server) 1 Answer

Unity interface lags behind by one action... 0 Answers

Process heavy issues 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