Project Setup - acbarker19/Godot-Action-RPG GitHub Wiki

Edit Toolbar Menu

A list of options will appear in the top center of the window, and some may not be needed. To edit this toolbar, do the following:

  1. Go to Editor > Manage Editor Features
  2. Create a New profile
  3. Click Make Current
  4. Check or uncheck options under Enabled Features
  5. Click Ok

Set Project Up For Pixel Art

  1. Go to Project > Project Settings
  2. Go Do Display > Window
  3. Set Size > Width and Height of window (This game uses 320 x 180). This sets how many pixels are visible in the window.
  4. Set Size > Test Width and Test Height of window (This game uses 1280 x 720). This sets the size of the window.
  5. Set Stretch > Mode to 2d

Handling Screens with Different Aspect Ratios

There will likely be players with screens that do not match the game's aspect ratio. To handle this, do the following:

  1. Go to Project > Project Settings in the window menu
  2. In the left menu, go to Display > Window
  3. In the main area, go to Stretch > Aspect
  4. Choose one of the options

The options for aspect ratios can be read about here with image examples, or read below:

  • Ignore: Pixels will stretch so the entire window is filled
  • Keep: The aspect ratio is preserved, the game is centered in the window, and black bars are added to the top and bottom or the left and right depending on if the window is taller or wider than the aspect ratio
  • Keep Width: The aspect ratio is preserved, the game is centered horizontally in the window, and black bars are added to the sides if the height is too short, but the content is expanded downwards if the window is too tall
  • Keep Height: The aspect ratio is preserved, the game is centered vertically in the window, and black bars are added to the top and bottom if the width is too short, but the content is expanded to the right if the window is too wide
  • Expand: The aspect ration is preserved, but the content is expanded downwards or to the right if the window is too tall or too wide

Add Custom Keys for Actions

  1. In the Godot top menu, press Projects > Project Settings...
  2. Click the Input Map tab
  3. Next the an action, press the Add Event button (Looks like a plus icon)
  4. Click Key
  5. Press the desired key

Add Custom Actions

  1. In the Godot top menu, press Projects > Project Settings...
  2. Click the Input Map tab
  3. Type a name in the top textbox and click Add
  4. Add input keys

Add a Camera to Follow the Player

  1. In the World scene, add a Camera2D node
  2. In the right menu, turn on Current
  3. Add a RemoteTransform2D node as the child of the Player node
  4. In the right menu, click Remote Path
  5. In the popup window, select Camera2D
  6. To make fixed position UI (such as hearts) move with the camera, add a CanvasLayer node to the World scene
  7. Move the HeartUI node to be a child of the CanvasLayer node
  8. To make the camera have less precise movements, select the Camera2D node and turn on Smoothing > Enabled in the right menu
  9. To make the camera snap to pixels, select Project > Project Settings in the top menu
  10. In the popup window, turn on Rendering > Quality 2d > Use Pixel Snap