Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 Ryox92 · Jun 12, 2019 at 10:03 PM · mobilegraphicsoptimization2d sprites

What Resolution to draw sprites for Mobile game??

Hey everyone,

I'm really confused what resolution to use for some environmental sprites I'm using for a 2D endless runner game for mobile. Currently I'm using 400 ppi for most environmental sprites such as rocks, trees sizes 512x512 and 1024x1024 (etc..). These are only pooled every once in a while. Also currently my character's body part images for a skeletal animation have a resolution of ~ 1000 ppi.

I heard that I need to 72 dpi for my sprites, but isn't that more for pixelated games? I'm trying to have an HD game to play on newer generation phones (Current and previous 4 generations).

I'm just not sure what to use for mobile?

I'm sorry I'm still a beginner so I'm not sure how to optimize for graphics for mobile.

Thanks

Comment
Add comment
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

1 Reply

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

Answer by robnw · Jun 13, 2019 at 02:13 AM

Common question, but a convoluted one. :) A single pixel in Unity has no fixed size. If you have a character that is 16p x 16p pixel resolution, she can take up any amount of world space that she wants via Transform scaling. You may ask, "but how many pixels will this take up on-screen?", well, that's where "camera space" comes in. You never have to worry about exact resolution of a screen or display.


All you worry about is how much the player can "see" of the world space, and you do this by scaling the camera viewport. Your camera can render 10000mx10000m in the game (you couldn't even see a 1mx2m character), but that display will still render 1920x1080 resolution. And vice versa, 1mx1m camera viewport is still 1920x1080 on the display. You can only control how much your camera can see, and this changes the "size" of a sprite on camera (in camera space), which in turn changes the exact pixels of the sprite.


And likewise, if you have your 10km camera rendering 1mx2m characters, you can scale those characters up so the camera can see them. You can make your 2m tall character 5kmx10km tall. Now she takes up 1/4th of the screen. In other words, the pixels don't matter. Only the world space and how much of that you camera can see matters.


So, if you need sprite sizes, you say "32x32 characters, bushes should be half that size, and ogres should be twice that size" and be done with it. Because after that, you are simply adjusting the camera and scaling your sprites so that they look good on the camera.


(Unity has a package for nice pixel cameras here, also make sure you choose the right filtering for your sprite images - should be point filtering - otherwise scaling the image up will cause blur)

Comment
Add comment · Show 1 · 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 Ryox92 · Jun 13, 2019 at 09:48 PM 0
Share

Thank you for the detailed answer :)

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

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

Related Questions

Mobile: Diffuse Cutout shader with NormalMap. Very bad performance. 0 Answers

Checking for transparency in texture when clicking on GameObject 1 Answer

Smooth edges on android 1 Answer

HELP!!!! GetAxis to Accelerometer :) 0 Answers

How to improve FPS on mobile? 1 Answer


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