How doomed is using pixel art in Unity, now, still, in 2017?

So, I’m finishing a mobile game in another engine and looking to learn a new engine by porting/tweaking my game for tablet and desktop. It’s a fairly simple 2D pixel art game. Unity may be overkill, but I like its marketplace, export options, and future viability.

But am I stupid? I have been researching Unity for pixel art, and the prospects look grim. Here’s a sample of the workarounds I’ve seen people recommend:

And there’s more. But the problem: Many of these are a bit old. Some have been necroed recently. Some say that Unity’s 2D rendering plus its implementation of floating point precision mean that pixel art is simply doomed. Some give conflicting advice.

Two things: First, it’s hard to find up-to-date information on this, particularly since 2D has been a recent focus for Unity’s updates. Second, I don’t care about “pixel perfect” as such; once you scale a pixel-art sprite to four or more times its original size, then, so long as the aspect ratio is maintained and nearest neighbor scaling is used, it doesn’t matter if the pixels are “perfect,” it’ll look good.

If this is a problem I can fix with some of this information that’s out there, I’m confident I can do it. But if Unity’s engine just fundamentally leads to erratic difficulties with pixel art*,* and this is going to be a running headache, please! Someone please let me know now before I invest more time into this steep learning curve!

I have pixel perfection in my project using various methods so it is still doable.
I have all my sprites set to the same pixel per unit of my project, I use super tilemap editor because it just works great, I use the pixel perfect camera scripts as well as have the camera always snap to the nearest whole pixel, all my sprites have pixel snap set in their materials, I made my own bitmap font (you can’t scale it but it’s pixel perfect), i set all my filtering to point and turn off anti-aliasing, i have all of my sprites snap to the nearest pixel, i think that’s it.

2 Likes

But it’s not even real art!

The threads being old (around the end of last year being the most recent) could mean that people are doing just fine without having to resort to the forums. The vast number of pixel art games made with Unity still being released should indicate it’s not impossible.

At its core, pixel art is just low-res art scaled up without any smoothing/dithering. Start your project and ask if you’re stuck, rather than planning for failure :slight_smile:

1 Like

Answer: Not doomed. Just annoying.

I would refer you to the threads I posted in most often. Pixel Perfect 2D in Unity & Tile Map Tearing Problems.

You are correct about there still being floating point precision problems. It is especially bad in pixel art & huge open world games.

I get alerts every now & again, about all this stuff. Then I see this fresh post. So it’s not an old problem. It’s still current. At least in part. At least to the point new users have to learn how to do things right. It’s still a big headache. The latest post for the tilemap thread was two days ago. Very recent. I see necro alerts all the time over the years.

I also would just refer you to an incredibly cheap, headache-free solution: Pixel Perfect. Drag & Drop a component, and you don’t even have to research anything else. Incredibly worthwhile for $10, since it takes hours of research just to find out this problem exists in Unity (not your own fault) and then hours more wasted in research attempting to achieve it).

I talked about this asset in my own thread and in my asset review thread.

I do however remember after I posted this

1614181--98272--$Unity-pixel-distortion.gif

There was a big update which claimed to fix the problem. I think it did fix it? I honestly don’t remember because I bypassed Unity’s rendering method & used Vectrosity from ASCII text files, I think. My sprites looked like this:

Space Character Idle
0000BBBBB0000
000BRRRRRB000
000BRRRRRB000
000BRDDRRB000
0BBBDFFDDBBB0
B1IIB444BEE3B
B1II2BBBEEE3B
BBBIZZZZSEBBB
BFB1IZZZE3BfB
BDBB12223BBDB
0B0BPABAPB0B0
000BAABAAB000
000BPPBPPB000
0000BB0BB0000

Which when parsed
3184505--243006--S_Idle.png

(Just thought I’d share that innovative way to render. I only created it because at the time I had serious problems with pixel perfect rendering in Unity.) So I’m not sure if it was ever fixed. Pixel Perfect was too easy to bother finding out. I just stuck with the headache free solution.

The number of games released isn’t indicative of anything. Unity games are notorious for having performance problems, hitching, unsmooth behavior, etc. I would be surprised if anything but the best Unity releases didn’t have these common issues.

Whether or not those games achieve smooth, pixel perfect rendering is what matters. Last time I checked, every pixel game I’d try out had subpixel problems (not smooth, flickering pixels, blur, etc.)

If you actually play those games, like The Escapists: The Walking Dead, you can see obvious problems & their failure to fix the issues. (At least you used to; I have not tried the latest updates in any unity pixel game). The Escapists isn’t made in Unity, and was pixel perfect. When they changed to Unity for The Escapists: TWD, their game had a ton of new problems. Amateur hour over at that studio, but I’ve found that to be common among devs who switch to Unity without the experience to know all the problems & quirks to avoid.

That’s why I think Unity is best as a kindof paid engine. Download it for free, but pay for a bunch of assets right off the bat so you can’t go straight into gamedev without worrying about UT’s lack of foresight or bug fixes or some of the more hideous flaws in the engine. Otherwise you have to spend months/years learning Unity’s quirks & all the secret fixes required to make a truly smooth game. Although to do that, you basically need to pay for Unity’s source.

2 Likes

I agree. There are a few purists out there who throw their device down in disgust if a pixel comes out smeared now and then, but I’m not one of them. If a game is fun, it’s still fun even if pixels get interpolated at bit. If a game is not fun, no amount of pixel perfection is going to make it fun. (Edit: I’m thinking about Rocket Plume, which has pixel-perfect environments but a dynamically-rotated, i.e. not pixel-perfect, rocket — and not one person has ever complained to us about it.)

That said, you do want your game to look as good as it can, and when it comes to pixel art, that usually means taking care with camera and artwork scale and position. The asset @CarterG81 recommends can make this easier, from what I’ve heard.

But my advice would be to not worry about it so much — Unity is great for 2D games, and shmeary pixels is not high on the list of greatest risks to your project. A much greater risk is that you will simply never finish it; you’ll get distracted by newer ideas for other projects, or find serious design flaws that make your game no fun, or it will collapse under the accumulated weight of bugs that you can’t fix because the code is fundamentally fragile.

So, get busy and make that game! And see it through to the end, if you can — or if it falls victim to one of these other pitfalls, then learn from it, dust yourself off, and try again. I look forward to seeing what you create!

2 Likes