- Home /
Performance tips on grid base game
I am working on Pacman in 2D. For this I have used following image to create wall.
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.
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.
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.
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
@rebertbu,Please add above comment as answer so that other member find it useful.
Your answer
Follow this Question
Related Questions
Texture2D Power of 2 0 Answers
How do I change the draw rectangle of a sprite? 0 Answers
Unity2D getting all sprites in texture with multiple sprite 0 Answers
how to: make global variable 2 Answers
How to find sprite at grid location? 1 Answer