- Home /
How do you integrate huge sprite sheets?
These past few days, i looked at a few a games and i found alto's adventure. My question is, how do i put in these large animated spritesheets. I mean, the hole background and everything is animated, do i put it in one large spritesheets or pick many smaller ones? Because it has to run on phone too so the performance is a very important factor! Would be glad if somebody could answer it ;)
Answer by Wolfride · Dec 16, 2018 at 02:27 AM
Phones cap at 2k resolution with few exceptions, 1k for older models. I worked on a 2D mobile game that used a heap of graphics. The easiest way: Fit all spites by scene/menu so everything you see on the screen at one time is on the same sprite sheet. So if you're scrolling across a huge map, draw calls are only being made for what the camera is viewing. As you pass from one zone to another, spritesheet changes would be made.
I managed to make a fish breeding sim with a lot of bones and dynamics by only having a few fish on screen at the time and having to change ponds.
So group graphics by spritesheet. Animated backgrounds can be a sky shader with night/day and a particle system or two, like falling leaves or snow.
For characters I tend to give them their own spritesheets so if I ever need to edit in more animations, there is room to do so without having to change other things or move characters around.
Edit: Reusing the same graphic from the spritesheet is still one draw call. So you could fill it up with flipped and scaled plants for example, or make a plant from different parts from the sheet and save it as a lot of different prefabs and use the Unity's color slider to give all sorts of changes without upping draw calls. Reuse and don't change materials, use the same material as much as possible for as many things as possible.
Your answer
Follow this Question
Related Questions
How to save and load string using google services ? 0 Answers
Pixels artifacts after building project 0 Answers
Android Game Problem 2 Answers
change sprite animation in ex2d ? 4 Answers