• Recent
  • Tags
  • Popular
  • Home
  • Docs
  • Register
  • Login
RetroPie forum home
  • Recent
  • Tags
  • Popular
  • Home
  • Docs
  • Register
  • Login

[Emulator] Play games made with the Godot game engine

Scheduled Pinned Locked Moved Projects and Themes
godotgame-engineemulatorraspberry piretropie
8 Posts 5 Posters 4.5k Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H
    hiulit
    last edited by hiulit 11 Nov 2019, 09:17 21 Aug 2019, 16:22

    First of all, if you don't know what I'm talking about, Godot is a 2D and 3D cross-platform game engine released as open-source software under the MIT license.

    There are plenty of games made with Godot, most of them hosted on https://itch.io/.
    You can find Godot games using the following links:

    • https://itch.io/games/made-with-godot
    • https://itch.io/games/tag-godot

    So, to play Godot games on RetroPie, I've created this scriptmodule :D https://github.com/hiulit/RetroPie-Godot-Game-Engine-Emulator

    RetroPie Godot Game Engine "Emulator" (v1.2.0)

    A scriptmodule to install a Godot "emulator" for RetroPie.

    Thanks to @efornara (for creating FRT - A Godot "platform" targeting single board computers) you can now play* games made with Godot on your Raspberry Pi (and other single board computers) using RetroPie.

    If you are running RetroPie on an x86 PC, the Godot "emulator" uses the Linux/X11-32bits export template instead of FRT, so most games should work fine.

    There are plenty of games made with Godot, most of them hosted on https://itch.io/.
    You can find Godot games using the following links:

    • https://itch.io/games/made-with-godot
    • https://itch.io/games/tag-godot

    *Games that (would) work on a Raspberry Pi must have been created with Godot 3.1.x using GLES2 (or maybe Godot 2.x.x) and not using any 'fancy VFX' like particles and other CPU/GPU demanding stuff.

    Install the setup script

    cd /home/pi/
    git clone https://github.com/hiulit/RetroPie-Godot-Game-Engine-Emulator.git
    cd RetroPie-Godot-Game-Engine-Emulator/
    sudo chmod +x setup-godot-engine-scriptmodule.sh
    

    Update the setup script

    cd RetroPie-Godot-Game-Engine-Emulator/
    git pull
    

    Usage

    ./setup-godot-engine-scriptmodule.sh [OPTIONS]
    

    If no options are passed, you will be prompted with a usage example:

    USAGE: ./setup-godot-engine-scriptmodule.sh [OPTIONS]
    
    Use '--help' to see all the options.
    

    The script assumes that you are running it on a Raspberry Pi with the RetroPie-Setup folder being stored in /home/pi/RetroPie-Setup. If your setup differs, you can pass the path where your RetroPie-Setup folder is stored as a parameter, like this:

    ./setup-godot-engine-scriptmodule.sh [OPTION] "/path/to/your/RetroPie-Setup"
    

    Options

    • --help: Print the help message and exit.
    • --install: Install the scriptmodule.
    • --uninstall: Uninstall the scriptmodule.
    • --update: Update the scriptmodule.
    • --version: Show script version.

    Examples

    --help

    Print the help message and exit.

    Example

    ./setup-godot-engine-scriptmodule.sh --help

    --install

    Install the scriptmodule.

    Example

    ./setup-godot-engine-scriptmodule.sh --install

    --uninstall

    Uninstall the scriptmodule.

    Example

    ./setup-godot-engine-scriptmodule.sh --uninstall

    --update

    Update the scriptmodule.

    Example

    ./setup-godot-engine-scriptmodule.sh --update

    --version

    Show script version.

    Example

    ./setup-godot-engine-scriptmodule.sh --version

    Install the Godot "emulator" from RetroPie-Setup

    Once you've successfully installed the scriptmodule, run:

    sudo /home/pi/RetroPie-Setup/retropie_setup.sh
    

    and then go to:

    • Manage packages
    • Manage optional packages
    • godot-engine
    • Install from source

    A new godot-engine folder will be created in /home/pi/RetroPie/roms/, where you can put your games using .pck and zip extensions.

    For example, if you download a game from https://itch.io/, the downloaded .zip usually contains 2 files: the executable and the game. The later is, most the times, a .pck file and that's the one we want. Just copy it to /home/pi/RetroPie/roms/godot-engine.

    The script installs different versions of the "emulator" for maximum compatibility:

    • 2.1.6
    • 3.0.6
    • 3.1.0
    • 3.1.1

    If the game you are trying to play doesn't work, try changing the "emulator" in the runcommand.

    If you are using an x86 PC, the "emulators" used are Godot's export templates downloaded from https://godotengine.org/download/.

    For the Raspberry Pi, the script will auto-detect if you are using a 0/1 or a 2/3 version and it will install the proper FRT "emulators". Same for any arm64 single computer board.

    In case none of the "emulators" work... Sorry.

    Uninstall the Godot "emulator" from RetroPie-Setup

    Run:

    sudo /home/pi/RetroPie-Setup/retropie_setup.sh
    

    and then go to:

    • Manage packages
    • Manage optional packages
    • godot-engine
    • Remove

    Update the Godot "emulator" from RetroPie-Setup

    Run:

    sudo /home/pi/RetroPie-Setup/retropie_setup.sh
    

    and then go to:

    • Manage packages
    • Manage optional packages
    • godot-engine
    • Update from source

    Using a GPIO/Virtual keyboard

    Warning! When using a GPIO/Virtual keyboard, the actual keyboard won't work anymore. But you can always remove the GPIO/Virtual keyboard (see below).

    As of v1.2.0, when using the FRT emulator, you can use a GPIO/Virtual keyboard, such as GPIOnext or Adafruit's Retrogame.

    Add a GPIO/Virtual keyboard

    Run:

    sudo /home/pi/RetroPie-Setup/retropie_setup.sh
    

    and then go to:

    • Configuration/tools
    • godot-engine

    You will be prompted with a menu showing all the results from the command cat /proc/bus/input/devices. Select the GPIO/Virtual keyboard that you want.

    Remove the GPIO/Virtual keyboard

    If you don't want to use the GPIO/Virtual keyboard anymore, run:

    sudo /home/pi/RetroPie-Setup/retropie_setup.sh
    

    and then go to:

    • Configuration/tools
    • godot-engine

    Select No when asked if you want to use a GPIO/Virtual keyboard.

    How to create a new Godot system for an EmulationStation theme

    As there is no way to create a script to automate this, because themes don't have the same structure, the best way is to manually create a new system in your preferred theme.

    • Download the Godot system.svg.
    • Download the Godot controller.svg.
    • Copy any system folder in your theme (e.g. /etc/emulationstation/themes/[THEME]/nes).
    • Rename it as godot-engine.
    • Move the Godot system.svg and controller.svg to the godot-engine/art folder.

    Note

    The folder structure in the theme you are using might differ. Take a look at how this particular theme works to create the godot-engine folder accordingly. You might need to delete extra icons that are not needed.

    Premade Godot systems

    I've created Godot systems for the default EmulationStation theme that comes in RetroPie, Carbon theme, and for my personal favourite theme, Pixel theme.

    Copy the theme/[THEME]/godot-engine folder from this repository to /etc/emulationstation/themes/[THEME].

    Carbon theme

    Godot system for EmulationStation's Carbon theme

    Pixel theme

    Godot system for EmulationStation's Pixel theme

    Changelog

    See CHANGELOG.

    Authors

    Me 😛 @hiulit.

    Credits

    Thanks to:

    • Emanuele Fornara @efornara - For creating FRT - A Godot "platform" targeting single board computers.
    • Andrea Calabró - For creating the Godot logo. Changes made to it:
      • Created an outline version.
    • Alícia Folgarona Ribot (Alfórium Studios) @alforiumstudios - For creating the Pixel Godot logo. Changes made to it:
      • New colors.
      • Added white outline.

    LICENSE

    • Source code: MIT License.
    • Godot logo: CC BY.
    • Pixel Godot logo: CC BY-NC-SA.

    My little contributions to the RetroPie project:

    • Shell-Script-Boilerplate
    • Fun-Facts-Splashscreens
    • Limit-Last-Played-Games
    1 Reply Last reply Reply Quote 6
    • H
      hiulit
      last edited by 2 Sept 2019, 12:47

      @BuZz @herb_fargus Any chance this could be integrated in the official RetroPie repository? I would be responsible for its maintenance and possible issues and of course I'll make the proper documentation on the Wiki, etc.

      Godot it's licensed under MIT as well as FRT, the binaries included in the scriptmodule. And of course, my code is also licensed under MIT. Some of the the art used is licensed under CC, so I think it there should be no problem there.

      Thank you for your time! :)

      My little contributions to the RetroPie project:

      • Shell-Script-Boilerplate
      • Fun-Facts-Splashscreens
      • Limit-Last-Played-Games
      1 Reply Last reply Reply Quote 0
      • E
        ellohir
        last edited by 2 Sept 2019, 14:29

        Love2D is a similar engine and is included on Retropie so I see no problem with this being included. I love my retro machine but one of the reasons I chose Retropie and not other closed systems was to be able to tinker and add or develop new games :)

        You should ask for the Godot engine to be officially accepted into the Carbon repository, I know the guys from Solarus did and it was so easy to install. No messing with folders, pictures and xml. You could ask @hhromic for help with that.

        There seem to be some limitations to the games you can play based on their VFX, and many games do not support gamepads... What games would you recommend us to try?

        1 Reply Last reply Reply Quote 0
        • B
          backstander
          last edited by 3 Sept 2019, 21:10

          @ellohir
          What games would you recommend us to try?

          @hiulit
          I'm wondering the same thing. What are some of the games you liked that you got working?

          cellyC 1 Reply Last reply 4 Sept 2019, 00:00 Reply Quote 0
          • cellyC
            celly @backstander
            last edited by 4 Sept 2019, 00:00

            @backstander I thought the exact same thing too. Went digging into some of the games listed and Ikki’s Dungeon looks like a game I would be into.

            Currently Playing: Tetris (Gameboy)

            1 Reply Last reply Reply Quote 1
            • H
              hiulit
              last edited by 4 Sept 2019, 09:25

              @ellohir @backstander @celly Thanks for your interest in Godot :)

              First and foremost, if you are using a Raspberry Pi up to the 3 B+, most likely almost no games will work :(
              We'll see how the new Raspberry Pi 4 works, because it brings GLES3 and that's what most Godot games are built upon.

              That said. if you have an x86 machine running RetroPie most games will work :D

              I would suggest you to try some of Securas games https://securas.itch.io/ for starters.

              My little contributions to the RetroPie project:

              • Shell-Script-Boilerplate
              • Fun-Facts-Splashscreens
              • Limit-Last-Played-Games
              1 Reply Last reply Reply Quote 1
              • H
                hiulit
                last edited by hiulit 11 Nov 2019, 09:29 11 Nov 2019, 09:28

                I've released v1.2.0 of the Godot "emulator" scriptmodule!

                Changelog

                • Support for GPIO/Virtual keyboards (GPIOnext or Adafruit's Retrogame, among others) for single board computers, such as the Raspberry Pi.

                Here's a little video* of a game I'm workin on using Godot for the Raspberry Pi.

                capture.jpg

                *Click on the thumbnail to go to the video.

                My little contributions to the RetroPie project:

                • Shell-Script-Boilerplate
                • Fun-Facts-Splashscreens
                • Limit-Last-Played-Games
                1 Reply Last reply Reply Quote 1
                • T
                  teethree89
                  last edited by 26 Oct 2021, 15:36

                  Hello, had a quick question, what is the best way to execute an OS command with this emulator? I have the following but it falls short of executing:

                  	OS.execute("bash", ["~/RetroPie/scripts/killgodot.sh"], true, output)
                  

                  the script contents are:

                  ps -ef | awk '/godot-engine/ {print $2}' | xargs kill
                  

                  it simple looks for the emulator in the process list and kills it, so I can switch games with it being a custom launcher.
                  Figuring this out would also help in launching games :)

                  Thank you,

                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post

                  Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.

                  Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.

                    [[user:consent.lead]]
                    [[user:consent.not_received]]