Creating a tile based game

I have started making a tile based game which has 36 tiles and plus a few GUI progress bars and my draw calls are 54 and triangles 8.2K ( i am guessing I shouldn’t be using the built in unity planes!) and I am now running 22 fps which is obviously too slow for this kind of game.

Obvious point to improve is use planes which are just 2 triangles. However I don’t know if I need too, or how to reduce the draw calls.

you are right, do not use unity build in planes, they add a lot of unneeded polys, rather make a quad through code or in your 3d app. Also, did you make sure your settings are not set to vsync? that normally kills fps

You could just have your “board” as a single object and then define the tiles by code, like position and what else. Else create them through code as chubbspet suggests.

Furthermore Unity’s build in GUI is baaaaad for performance, they even stated themself that it should only be used for prototyping and not productions.
So maybe use objects attached to an othographic camera in a special layer as GUI, if you dont want to spent money on another GUI solution.

They haven’t stated this, and it’s not nearly that bad. I have a project with heavy use of OnGUI (~60 draw calls generated by that) and it has no problem running 60fps on an iPod touch 5.

–Eric

Here is a good tutorial on how to do it by code.http://www.youtube.com/watch?v=bpB4BApnKhM

thanks for tips,

For now I am going to try make the simple tile and reduce my textures from 512 by 512 to 256 by 256 but I thought unity automatically scaled texture size down (but I am using truecolour to make sure it is perfect on screen.

Its true that the company did not state that, but hired engineers of Unity stated it at Tokyo Unite and i also think they mentioned it and Unite Nordic. They said that it should never be used for release builds.

Anyways, sure it can be used for a lot of things without being such a problem, but if people got performance problems it is a place to look at (specially for ios/android)

well just changing from unity planes = massive jump in performance. Up to 70+ fps so I guess the draw calls weren’t really important for my small app.