Best Approach to Implement 2D Backgrounds for a 2D Game

Hi, I’m a self-taught beginner using Unity, so I apologize if this is a basic question.

I’m making a 2D game similar to Monkey Island, but not in pixel art. My scenes include rooms, hallways, and other environments.

My question is: what’s the best approach for implementing background art assets in Unity?

For example, let’s say I have a room with furniture, a floor, a ceiling, and various objects. Until now, I’ve been slicing a 2440 x 1080 background image in Photoshop and assembling the pieces inside Unity. However, I’ve noticed that when the camera moves quickly (horizontally), the background glitches or looks off.

Let’s say I have a scene with a background like the one above - was I supposed to export each item separately (e.g., sofa, floor, window, album, lamp, wall)? If so, what’s the recommended maximum texture size for Unity? Right now, I’m targeting PC, but I might release the game on mobile as well.

Thanks so much for your help!

Yes usually you’d produce each asset separately.

This is so the assets could be rearranged, reused, adjusted, moved within Unity.

Or let’s say you want an item to be interactable. To show interactivity with an outline you’d probably want a separate asset so you can apply a shader to it.

There is a marginal advantage to a single background image, less overdraw, but that’s usually swamped by the aforementioend workflow and scene considerations.

As for the size, consider how large it’ll be on the screen. It’s always safer to produce the art at a larger size. You can always downsize it within Unity or set per-platform quality settings on the Texture Importer. But since you’re asking for the maximum, you’re probably already planning to do that. I can’t quite remember what the maximum size is (16K?) but 4K is realistically the largest consumers are going to expect. That’s for the screen, not the assets within the screen.

2 Likes

Thank you so much! I didn’t realize it was okay to have art assets larger than 1000 px! As long as I use compression and a sprite atlas to save file size, I guess having sprites at2048 or even 4096 px is pretty normal? Thanks again!

You can have textures up to 16k on desktop but few graphics cards will handle this well enough. You have to consider the on-chip GPUs like Intel HD Graphics with shared memory. For those you definitely want to stick to 2k or 4k textures.

On mobile you can force the texture resolution to a max size, you’d really want to keep it to 2k max.

Note that if your image is 2440x1080 then this will demand a 4096x2048 texture if it has to be power of two for either efficiency reasons or requirements (most compression formats only work with POT textures). Meaning it’s more memory efficient to use a 2048x900 texture and scale it up, or split the texture in a 2048x1024 and a 512x1024 part (either scale up to 1080 or leave a 56 pixels bar).

1 Like

Thank you so much for your help! This really clarifies how to handle 2D art assets!