Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

How to Set Up Godot for LOWREZJAM Sticky

A topic by Callum John created Jul 30, 2019 Views: 1,294 Replies: 9
Viewing posts 1 to 7
(+7)

Introduction

In this tutorial, I'm going to show you a rough guide for setting up your Godot workspace for a valid LOWREZJAM submission. Please keep in mind that this method isn't perfect and was achieved using a of trial and error.

I'm also going to assume that you're going to be making a 2D game with Godot, but you can easily adapt this to work for 3D as well just by using different nodes. By the end, you should have something like this:

Without further ado, let's begin.

Instructions

  1. Create a new Godot project inside a blank folder. The render engine you use shouldn't matter too much as far as getting the correct resolution is concerned.
  2. Open your new project in the editor.
  3. Go to Project > Project Settings.
  4. On the left hand side of the window, you should see a lot of different tabs stacked vertically. Go to the "Window" tab under the "Display" section.
  5. There should be a lot of different options here that change the properties of the game window. Under the Size header, set both the Width and Height properties to 64.
  6. Scroll all the way down to the bottom until you see the "Stretch" header. Change the display mode from "disabled" to "viewport".
  7. Change the Aspect from "ignore" to "keep".
  8. We're done with the window settings for now. Go to the "Quality" tab under the "Rendering" section.
  9. Turn on "Use Pixel Snap" to prevent blurring during sprite rotation.
  10. Create a blank scene with a single sprite and save it. Run the game and set the main scene to see if it worked properly.

Conclusion

Thanks for reading my tutorial! If I've gotten something wrong, please let me know. Hopefully this helps someone out there...

(+1)

Yo thanks for this I'm gonna use Godot for my game.

No problem!

Submitted(+2)

Didn't see your topic and made a base project for 3D game in godot >.<


LowRezJam_Base.zip

Submitted

Thanks for the setup and tip! I will be using Godot now... works fine for me.

Submitted

Great to see such a wide variety of tech being used and supported for this jam.

Submitted

You can use OS.window_size = Vector2(512, 512) in the _ready function of your main scene to force the window to change its size, if you combine that with a preset size of 64 by 64 in the project settings, you can have a 64x64 game stretched and ready for hi-dpi modern screens :). Be sure to use the setting stretch: viewport as Callum John explained.

I've been using a very similar method to upscale the window, but I've found just altering the window size causes the window to become off-center, which could cause it to become lost on some screens. To combat this, I also alter its position as well:

OS.window_position = (OS.get_screen_size() / 2.0) - (OS.window_size / 2.0)

Which should put the window in the middle of the primary display every time. There's a slight flicker when the game starts up, but it's barely noticeable.

Submitted(+3)

I think it could be interesting to use the shrink property here (it's in the stretch options). It downscales the rendering by the factor you put there, so that way you can set the window size to something like 256x256, and then a shrink of 4 will make the game still render at 64x64 (256/4=64). That way you can have the game window at a higher default size, but you will still always have the 64x64 internal resolution.

So I don't have to override it with code?

That does sound nice.