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
1
Question by drGsus 1 · Mar 01, 2011 at 01:22 PM · 2dfpsiphonetextures

Best Unity configuration for 2D games on iPhone

Hey guys,

i have some questions.

I'm currently working on a 2D game for the iPhone.

Everytime I try to import a high quality image, for example an jpg. it always get kinda "washed out" when i try to display it, through a material or guiTexture.

What am I doing wrong?

another question:

I never get more than 30FPS on my iPhone 4, even when I'm only displaying a title screen with a gui texture. When I'm moving a simple gameobject, and let the camera follow, the followeing is very choppy and sluggish, the FPS at this time is around 29,5-30.

Is there a setting which prevents the game to run smoothly? I mean the iPhone is surely capable of handling at least 60 fps. What am i doing wrong?

and my last one :)

what is the best way to use backgrounds or textures in general in a 2d Game? Currently I have a big plane, which i equip with a material, which has the texture i want. The camera is directly above and configured to "orthographic".

This has the negative aspect, that the texture in materials always gets stretched if I want to make a level bigger, and therefore have to change the tiling settings to fit again. Is there another way? How does it Zombieville for example?

I really appreciate any help.

Comment
Add comment · Show 1
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 Jessy · Mar 01, 2011 at 02:49 PM 0
Share

This is many questions, and so not suitable for this site. Ask multiple questions or take it to the forum.

1 Reply

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

Answer by Jessy · Mar 01, 2011 at 02:50 PM

Use a better compression setting. Use the Advanced mode, and the per-platform override. You're probably using PVRTC.

To set the desired frame-rate, open your XCode project generated by Unity iOS, and select the AppController.mm file. Locate and change #define kFPS 30 to a desired value, for example:

define kFPS 60.

http://unity3d.com/support/documentation/Manual/iphone-Optimizing-MainLoop.html

I assume you're using a built-in Unity plane. Never use that. Learn to UV a quad.

Comment
Add comment · Show 4 · 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 drGsus 1 · Mar 01, 2011 at 03:19 PM 0
Share

thanks, now it runs smooth as silk :) What are the downsides of increasing the FPS? I mean, why is it configured to 30 by default?

Currently I'm using a giant plane, with 3*50 Scale. I attached a material, with the texture.

So you're saying that I should use a giant cube ins$$anonymous$$d of a plane? What would change?

avatar image Mattias-Wargren · Mar 01, 2011 at 03:22 PM 0
Share
  • I would like to here about this method to.

avatar image Jessy · Mar 01, 2011 at 04:23 PM 0
Share

Increased FPS = decreased battery life. And if you can't hit 60, anything about 30 is wasted. As I said, never use the Unity plane in an actual game; it's 200 triangles and you only need 2, unless you need vertex lit specular highlights. $$anonymous$$odel a quad at the size you need, and UV it appropriately. Not a cube. A quad is two triangles in a plane, that share an edge.

avatar image ExCx · Feb 08, 2013 at 04:13 PM 0
Share

"define kFPS" is not used anymore. Use this ins$$anonymous$$d. (setting it to 60 gives best results for iPad)

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

1 Person is following this question.

avatar image

Related Questions

best texture compression for unity 2D Casual game on iphone 2 Answers

Unity 2D and Texture Memory. 1 Answer

Noob: Question about standard c# mouselook script. And other probably noob questions others may ask. 3 Answers

2D game level building best practice 1 Answer

Assets/Scripts/PlayerController.cs(32,49): error CS0126: An object of a type convertible to `float' is required for the return statement 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