Exact resolution for a pixel art game?

I’m making a pixel art game and I want to set the game’s resolution to 640x360, where can I set that, and what are the best practices when it comes to dealing with pixel games and making sure they look right when up-scaled on bigger monitors?

I don’t know if this is the best approach but I have a workaround for your case :slight_smile:

  1. put a scene capture 2D component in your scene. That will be the camera of the game.

image

  1. create a render target texture:

image

  1. create a UI Material and put as color the render target texture:

  1. set the camera render target texture with the render target

image

  1. create a widget and put an image on it. select the anchors from the bottom right (the big square and put all corners in 0 so the image covers exactly the whole screen

image

image

  1. in the image brush of the rectangle put the material

image

  1. in the level blueprint add the widget to the viewport

  1. turn off antialiasing in project settings

  1. set the desired screen resolution in the texture :slight_smile:

image

also set texture group to 2d pixels (unfiltered)

image

done

hope it helps!

1 Like

here is also a tutorial about add a pixelated postprocessing effect that may be useful for you

cheers!

1 Like

Both of those solutions seem to be aimed at making the game look 3D, But the game I’m trying to make is a retro 2D game, with the art drawn in pixel art style.
I’ll give them both a try and see what I can learn from them, but I might still need a solution aimed at 2D game development.

Hi @anonymous_user_cd4923f2! Welcome to the Forums!

Since you are working with 2D, I believe the main issue is exactly what you stated, scaling. You can set the screen resolution specifically using the “Set Screen Resolution” blueprint node. Here is more information on that:

Unreal Engine Documentation: Set Screen Resolution

However, there is a noticeable downside to restricting the window size (if that is the option you are wanting to go) to your desired resolution, as that is essentially a phone screen.

I’ve mainly seen 3 different approaches for scaling pixel games, though these are almost assuredly not your only options.

  1. Scale the art as is. Whether you want to scale the scene to whatever resolution whatever ratio the player chooses or restrict the ratio to ones you select, this will ensure the camera is exactly where you want it and no more of the scene is seen than you intended.
  2. Scale the view of the Camera. This method will ensure that your intended pixel ratio is always as intended. Games like Hero Siege I have seen take advantage of this.
  3. A little bit of both. You can scale the view to a max size and then have your pixels scale after the fact. Knights of Pen and Paper 2 is a good example of this.

I hope the above helps get you where you are trying to go!

1 Like

Thank you, that seems to be exactly what I need.
The description says “Sets the user setting for game screen resolution, in pixels.” Does this mean there is an initial setting somewhere that I can change without the need for blueprints?

Hey @anonymous_user_cd4923f2,

You can do so with C++, but blueprints may be easier. Here is another thread that could be more enlightening to your problem:

Set the default resolution of the project

I hope the above solution works for you!

1 Like