• 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 siddharth3322 · Oct 21, 2014 at 10:42 AM · spritegridgrid based gameblocks

Performance tips on grid base game

I am working on Pacman in 2D. For this I have used following image to create wall.

alt text

My game contains grid of 40 x 27 blocks means total 1080 blocks exist on game screen. I am putting those much blocks on game board because of this I am getting lots of performance lack in game. I am getting around 30 fps for game play scene. At present I have created only dummy level no other game feature and there is lots of fps loss for game.

I want some performance improvement tips here.

rsz_wall.png (3.4 kB)
Comment
Add comment · Show 2
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 KpjComp · Oct 21, 2014 at 10:49 AM 0
Share

Putting 40 x 27 blocks of images on a game board should not be giving any performance issues. So without knowing what's causing the slowdown it's hard to tell what to improve.

avatar image siddharth3322 · Oct 21, 2014 at 10:54 AM 0
Share

I have edited my question with more detail. Rendering cost affect the performance of game. If I assign none sprite to wall then it does not create any performance problem or fps loss but if I attach sprite to it then it gives loss in fps in mobile devices. Though there is no problem of fps in pc game.

1 Reply

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

Answer by robertbu · Oct 21, 2014 at 03:45 PM

Consider using a single mesh and UV mapping your blocks into the mesh. Search for Voxels or Minecraft for more information on the concept. The following question has some starter code you can use. It is both more and less than what you need.

http://answers.unity3d.com/questions/769358/tile-game-slow-lots-of-sprites-texture-atlas.html

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 siddharth3322 · Oct 30, 2014 at 07:18 AM 0
Share

@rebertbu,Please add above comment as answer so that other member find it useful.

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

28 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

Related Questions

Code for gridColour[x,y] == gridColour[x+1,y] || colour at [x-1,y] || colour at [x,y+1] ||colour at [x, y-1] to detect if 4 of the same colours are connected? 0 Answers

Grid snapping 0 Answers

Interrupting an animation cycle in Unity2D 1 Answer

Grid System (Unblock me) Unity3d 1 Answer

How to create a rotating tiles with walls on edges of tiles? 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