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 EntertainmentForge · Apr 03, 2014 at 03:54 PM · mobilelagtopdownshooterpreformance

Preformance for 2D top down shooter

Hey guys. I'm new to unity and I could really use your help. Coming from flash (ActionScript3). I am trying to make top down shooter for mobile devices but performances of my prototype project are just terrible. I used this class for Object Pooling http://forum.unity3d.com/threads/76851-Simple-Reusable-Object-Pool-Help-limit-your-instantiations!

And I used this function for moving bullets:

 void FixedUpdate () 
 {
     transform.Translate(new Vector3(directionX,directionY));
 
     if(transform.position.y > 7)
     {
         ObjectPool.instance.PoolObject(gameObject);
         transform.position = new Vector3(0,0);
 
     }
 }

And now I even removed all collision so I am sure that they do not impact performances.

So there are about 200-300 bullets at the time. I know its a lot but since there are no other effects I figured this should run smooth on my mobile device but actually its super laggy. Device I used is android Sony Xperia M that have 1gb ram and 1gh dual core processor. So its not even the slowest device I want to target.

Here is the screenshot of the project: http://prntscr.com/36ni91

Do you think it could be doing something wrong with my approach to this or is unity just not fast enough for 2D bullet hell game?

Thanks!

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 Stevenwithaph · Apr 03, 2014 at 05:31 PM 0
Share

Not really sure what the problem could be without seeing more of the project, but unity should be able to handle this kind of game.

One issue I can think of is the way you are handling the bullets. You should probably attach a rigidbody component to them and move them using velocty. $$anonymous$$oving colliders without a rigidbody in unity causes a significant slow down.

Another is the ObjectPool, I'm not sure how that system is supposed to work or how well it performs on devices, so try removing it for now to see if that increases performance or not.

0 Replies

· Add your reply
  • Sort: 

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

Make joystick rotate object 0 Answers

How to improve mobile speed with particle systems? 1 Answer

Insane EventSystem.Update lag spike, no graphic raycasters in scene 3 Answers

How do I make a laser pointer? 2 Answers

Performance problems on Android (apk) 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