Camera zoom, resolution and performance

I have a question about the performance of a game that has all its sprites in low resolution but then uses a camera zoom to expand to a game resolution of x4 (to be able to use text fonts with good quality).

The performance of the game, handling sprites, layered effects, etc., will be very similar to if the game runs at a native low resolution? All those effects and processes are now executed at x4 and therefore increases the cost of visualized?

Higher resolution requires more processing power regardless of the size of your sprites. Scaling is cheap and shouldn’t have a noticeable effect.

The way you described it sounds backwards though… If you want chunky sprites then just set their scale factor to 4, the camera zoom doesn’t have to change if you just set the original game resolution to the size you want.

I think I haven’t expressed myself well, or I haven’t understood you.

Let’s say that my original graphics are for a game of 128x128px, but I don’t want to use bitmap fonts and for them to look good I need the game to be configured as if it were 1024x1024 and thus use a layer for the text, while the layers of the game have a camera zoom to full the screen.

My question is if there is a lot of difference in performance in that case, being that the sprites are of low resolution, or if being at 1024 you will have to process everything as if they were graphics at that resolution (filters, etc.)

Another option is to create the graphics in a false way with very large pixels, but it is not the doubt I raise.

General Rule
More you see more it lags
Question when it will start lagging to the point you will notice it

As for text use bitmap text object instead of text objects

Free TTF Fonts
https://www.google.com/search?q=free+ttf+fonts

Convert TTF Font to Bitmap Font

1 - ON LEFT Click Add Font File
2 - ON LEFT Change Font Size to 20-30 (60-80 if it’s NOT Pixel Art)
3 - ON LEFT Change Sharp from 80% to 100%
4 - ON RIGHT Change Color from Black to White

(OPTIONAL) Adding Outline
4A - ON RIGHT Click on Stroke to set it to On
4B - Line Join set to MITER
4C - Color set to different than color of Fill

(OPTIONAL) Adding Drop Shadow
4D - ON RIGHT click on Shadow to set it to On
4E - Adjust it to your needs or leave as it is

5 - Click Export
6 - Click Save

OK, that makes sense… as for performance, in a sense you are right that the resolution being 1024 will affect performance, but it’s not because of the layer that is being scaled up. That layer would be processed and then scaled up at the end so it’s basically like scaling a single object (this is why effects on an entire layer are more efficient than on a bunch of objects).

However I’m pretty sure that the zoom happens before other effects? So in other words, if you had an outline effect, the outline would be drawn at the higher resolution… and that could add up to a performance hit if there’s a lot going on.

In any case I agree with @ZeroX4 that using a bitmap font would be a better option, although they are a little bit more work to set up. It really depends on your preferences and what you want to accomplish. I personally like low resolution games that are actually low res instead of just scaled up sprites. But there are advantages to doing the latter such as having smoother looking movement. If you want an “orthodox” pixel art game then it would be wise to learn bitmap fonts, but if not then your method should work just fine.

1 Like