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
- put a scene capture 2D component in your scene. That will be the camera of the game.
- create a render target texture:
- create a UI Material and put as color the render target texture:
- set the camera render target texture with the render target
- 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
- in the image brush of the rectangle put the material
- in the level blueprint add the widget to the viewport
- turn off antialiasing in project settings
- set the desired screen resolution in the texture
also set texture group to 2d pixels (unfiltered)
done
hope it helps!
here is also a tutorial about add a pixelated postprocessing effect that may be useful for you
cheers!
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:
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.
- 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.
- 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.
- 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!
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?
You can do so with C++, but blueprints may be easier. Here is another thread that could be more enlightening to your problem:
I hope the above solution works for you!