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

    I.K.E.M.E.N GO on Raspberry Pi 4 [Now with an Install Guide!]

    Scheduled Pinned Locked Moved Ideas and Development
    golangikemenikemen gomugentutorial
    153 Posts 20 Posters 66.0k 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.
    • J
      joamjoamjoam @SuperFromND
      last edited by

      @superfromnd

      The crt does look pretty cool lol. Glad to hear the full screen on hdmi works. The problem with matchbox is that when Ikemen opens the window it doesn’t specify a location it just asks for a certain sized widow. So it’s up to whatever the X server defaults to when creating a new window it could be easily fixed by specifying a location like always start on top left etc in the source.

      It looks like we finally have a working Ikemen implementation for RetroPie. Good job everyone!

      SuperFromNDS 1 Reply Last reply Reply Quote 1
      • SuperFromNDS
        SuperFromND @joamjoamjoam
        last edited by SuperFromND

        @joamjoamjoam Huzzah indeed! 🎉

        All that's left is to test my current scriptmodule on a fresh RetroPie install to verify that it does indeed work properly, and then I guess it'll be it'll be time to submit it to RetroPie! Or maybe I should post the script here and ask for people to test it themselves for a day or two before submitting?

        Let me know, what do you guys think I should do?

        ADDENDUM: I just installed a fresh copy of RetroPie on an SD card, no fancy USB mounting or anything, and ran the script and... it works! Although I did have to add one more chown since the files were being copied with root as the owner and 644 permissions, meaning the user couldn't edit them.

        # Recursively set all files in the ports folder to be owned by the user, so that they can be edited (which is pretty important in a highly customizable game engine)
        chown -R $user:$user "$romdir/ports/ikemen-go/."
        

        Took about 30 minutes to install from the scriptmodule, but once it did, it booted without any other hassle. Cue sigh of relief.

        ▲▼▲▼▲▼▲▼▲▼
        IKEMEN Go
        SRB2Kart
        ▼▲▼▲▼▲▼▲▼▲

        J 1 Reply Last reply Reply Quote 0
        • J
          joamjoamjoam @SuperFromND
          last edited by

          @superfromnd nice i would say submit it. i also ran it from a fresh install and only hit these permission errors. so since they are ironed out i say lets do it. If you post you the full script here ill run it one more again to test it out.

          SuperFromNDS 1 Reply Last reply Reply Quote 0
          • SuperFromNDS
            SuperFromND @joamjoamjoam
            last edited by SuperFromND

            @joamjoamjoam Alrighty, here's the script:

            #!/usr/bin/env bash
            
            # This file is part of The RetroPie Project
            #
            # The RetroPie Project is the legal property of its developers, whose names are
            # too numerous to list here. Please refer to the COPYRIGHT.md file distributed with this source.
            #
            # See the LICENSE.md file at the top-level directory of this distribution and
            # at https://raw.githubusercontent.com/RetroPie/RetroPie-Setup/master/LICENSE.md
            #
            
            rp_module_id="ikemen-go"
            rp_module_desc="I.K.E.M.E.N GO - Clone of M.U.G.E.N to the Go programming language"
            rp_module_licence="MIT https://raw.githubusercontent.com/Windblade-GR01/Ikemen-GO/master/License.txt"
            rp_module_help="Copy characters, stages, screenpacks, etc. to $romdir/ports/ikemen-go\n\nConfig.json can be found at $configdir/ports/ikemen-go/save"
            rp_module_section="exp"
            
            function depends_ikemen-go() {
                getDepends golang-go libgl1-mesa-dev xinit xorg xorg-dev libopenal1 libopenal-dev libgtk-3-dev libasound2-dev freeglut3-dev
            }
            
            function sources_ikemen-go() {
                gitPullOrClone "$md_build" https://github.com/Windblade-GR01/Ikemen-GO.git
            }
            
            function build_ikemen-go() {
                go clean
                go mod tidy
                make TAGS='-tags al_cmpt' linux
                # grabs default screenpack and content required for the game to run; note that the screenpack has a CC-BY-NC 3.0 license
                make elecbyte
                md_ret_require="$md_build/Ikemen_GO"
            }
            
            function install_ikemen-go() {
                cp 'elecbyte/LICENCE.txt' 'ScreenpackLicense.txt'
                mkdir save sound
            
                md_ret_files=(
                    'Ikemen_GO'
                    'License.txt'
                    'ScreenpackLicense.txt'
                    'data'
                    'save'
                    'sound'
                    'font'
                    'external'
                    'elecbyte/chars'
                    'elecbyte/stages'
                    'elecbyte/data'
                    'elecbyte/font'
                )
            }
            
            function configure_ikemen-go() {
                mkRomDir "ports/ikemen-go"
                addPort "$md_id" "ikemen-go" "I.K.E.M.E.N GO" "XINIT:$md_inst/ikemen-go.sh"
            
                moveConfigDir "$md_inst/chars" "$romdir/ports/ikemen-go/chars"
                moveConfigDir "$md_inst/stages" "$romdir/ports/ikemen-go/stages"
                moveConfigDir "$md_inst/data" "$romdir/ports/ikemen-go/data"
                moveConfigDir "$md_inst/external" "$romdir/ports/ikemen-go/external"
                moveConfigDir "$md_inst/font" "$romdir/ports/ikemen-go/font"
                moveConfigDir "$md_inst/sound" "$romdir/ports/ikemen-go/sound"
                moveConfigDir "$md_inst/save" "$configdir/ports/ikemen-go/save"
            
                cat >"$md_inst/ikemen-go.sh" << _EOF_
            #!/bin/bash
            export MESA_GL_VERSION_OVERRIDE=2.1
            xterm -g 1x1+0+0 -e 'cd $md_inst && ./Ikemen_GO'
            _EOF_
                chmod +x "$md_inst/ikemen-go.sh"
                chown -R $user:$user "$md_inst"
                chown -R $user:$user "$romdir/ports/ikemen-go/."
                chown -R $user:$user "$configdir/ports/ikemen-go/save"
            }
            

            ▲▼▲▼▲▼▲▼▲▼
            IKEMEN Go
            SRB2Kart
            ▼▲▼▲▼▲▼▲▼▲

            J 1 Reply Last reply Reply Quote 0
            • J
              joamjoamjoam @SuperFromND
              last edited by

              @superfromnd

              Worked for me with no permission changes on a fresh install.

              SuperFromNDS 1 Reply Last reply Reply Quote 1
              • SuperFromNDS
                SuperFromND @joamjoamjoam
                last edited by

                @joamjoamjoam Awesome! I just submitted the PR:
                https://github.com/RetroPie/RetroPie-Setup/pull/3384

                ▲▼▲▼▲▼▲▼▲▼
                IKEMEN Go
                SRB2Kart
                ▼▲▼▲▼▲▼▲▼▲

                BuZzB 1 Reply Last reply Reply Quote 0
                • D
                  duiz @joamjoamjoam
                  last edited by

                  @joamjoamjoam Amazing! Does this allow multiple MUGEN games to be installed or is it one game only per now? Basically wondering if it generates a game list like emulators do or not.

                  SuperFromNDS 1 Reply Last reply Reply Quote 0
                  • SuperFromNDS
                    SuperFromND @duiz
                    last edited by SuperFromND

                    @duiz Right now, with how the file structure is set up, it just deals with one game for the sake of simplicity.

                    Theoretically it should be possible to set it up in a way to allow multiple MUGEN fullgames to be installed at once (as really all you need to do is point to different system.def files, which handle the selectable character/stages and screenpack from there; you can do this in IKEMEN via Ikemen_GO -m foo/bar/system.def and it shouldn't be too hard to modify the script to pass a specific system.def as an argument), but for now it's just the one.

                    ▲▼▲▼▲▼▲▼▲▼
                    IKEMEN Go
                    SRB2Kart
                    ▼▲▼▲▼▲▼▲▼▲

                    D 1 Reply Last reply Reply Quote 0
                    • D
                      duiz @SuperFromND
                      last edited by

                      @superfromnd This sounds really exciting! I'll hold off on trying it until it is a bit more complete but I love the work you been doing! This is like a dream come true.

                      1 Reply Last reply Reply Quote 1
                      • BuZzB
                        BuZz administrators @SuperFromND
                        last edited by

                        @superfromnd Thanks for this. I have done a quick review only so far but appreciate the contribution.

                        To help us help you - please make sure you read the sticky topics before posting - https://retropie.org.uk/forum/topic/3/read-this-first

                        1 Reply Last reply Reply Quote 1
                        • SuperFromNDS
                          SuperFromND @SuperFromND
                          last edited by

                          Good news for composite-out/CRT people like me! I figured out how to make IKEMEN GO center itself in windowed mode, and thus display properly on CRT without an overscan hack!

                          Jools gave the scriptmodule a quick review and informed me of a few things that needed to be rectified, and one of them was the removal of a few unnecessary dependencies that were rendered redundant by their -dev package variants.

                          Well, it turns out that the binaries installed by apt-get install xorg were the cause of IKEMEN GO not centering itself! Simply removing the package was all it took to fix it, and now it displays at the proper size on CRT (which looks pretty awesome and elegaic when you turn off all the other lights, by the way):
                          crt fixed.png

                          ▲▼▲▼▲▼▲▼▲▼
                          IKEMEN Go
                          SRB2Kart
                          ▼▲▼▲▼▲▼▲▼▲

                          1 Reply Last reply Reply Quote 1
                          • SuperFromNDS
                            SuperFromND
                            last edited by SuperFromND

                            Progress report on the RetroPie submission: The review noted a few things that needed to change in the script. Most of it was relatively easy stuff, like using the git_module_repo system and some minor re-ordering of commands. The one that's proven to be more difficult is minimizing the number of dependencies that are installed. Here's a quick re-cap of those:

                            • golang-go: Required; this is the language IKEMEN GO is written in.
                            • libgl1-mesa-dev: Required; Go-GLFW dependency.
                            • xinit: Required; this launches the X server for displaying the game.
                            • xorg: See below.
                            • xorg-dev: See below.
                            • libopenal1: Not required; libopenal-dev makes this redundant.
                            • libopenal-dev: Required; Go-GLFW dependency.
                            • libgtk-3-dev: Unsure. Originally added due to errors early on in this project.
                            • libasound2-dev: Required; Go-GLFW dependency.
                            • freeglut3-dev: Not required. Originally added due to errors early on in this project.

                            The two that have proven to be the most contentious are xorg and xorg-dev. xorg-dev is a dependency for Go-GLFW, and theoretically xorg is unnecessary... right? Well, no, because if you exclude it in the scriptmodule, Xinit crashes due to not being able to find X:

                            Parameters: 
                            Executing: xinit /dev/shm/retropie_xinitrc -- vt1 -keeptty
                            
                            xinit: unable to run server "X": No such file or directory
                            Use the -- option, or make sure that /usr/bin is in your path and
                            that "X" is a program or a link to the right type of server
                            for your display.  Possible server names include:
                            
                                Xorg        Common X server for most displays
                                Xvfb        Virtual frame buffer
                                Xfake       kdrive-based virtual frame buffer
                                Xnest       X server nested in a window on another X server
                                Xephyr      kdrive-based nested X server
                                Xvnc        X server accessed over VNC's RFB protocol
                                Xdmx        Distributed Multi-head X server
                            
                            xinit: giving up
                            xinit: unable to connect to X server: Connection refused
                            xinit: server error
                            

                            So by process of elimination, xorg-dev is the one that would need to be removed and xorg by itself is good. Mystery solved... right? Well, no, because if you have just xorg installed, then IKEMEN GO can start correctly... until a K.O. is achieved, which causes IKEMEN GO to crash with an error like this:

                            ./external/script/randomtest.lua:257: ./external/script/start.lua:1251: __len undefined
                            stack traceback:
                            	./external/script/start.lua:1251: in function 'f_turnsRecovery'
                            	./external/script/global.lua:239: in function 'loop'
                            	<string>:1: in function <<string>:0>
                            	[G]: in function 'game'
                            	./external/script/randomtest.lua:257: in function 'f'
                            	external/script/main.lua:2992: in function 'loop'
                            	external/script/main.lua:3076: in function 'loop'
                            	external/script/main.lua:4051: in main chunk
                            	[G]: ?
                            stack traceback:
                            	[G]: in function 'game'
                            	./external/script/randomtest.lua:257: in function 'f'
                            	external/script/main.lua:2992: in function 'loop'
                            	external/script/main.lua:3076: in function 'loop'
                            	external/script/main.lua:4051: in main chunk
                            	[G]: ?
                            

                            It seems as if xorg-dev isn't installing certain packages that xorg is, but at the same time xorg isn't installing something that's causing IKEMEN GO builds to be a little screwy as a result. Installing both does seem to fix the problem, but I imagine that's not ideal for RetroPie's maintainers.~

                            There's also the possibility the real cause is something less severe; these changes were made at the same time as some directory-creation and permission changes, so it's completely possible that IKEMEN GO just isn't able to read or write something and that's causing it to go kerpoot somehow.

                            ADDENDUM: Scratch all that, turns out I was just being a tad paranoid; this doesn't seem to be a bug with the libraries, and xorg on it's own is sufficient after all. My reasoning: there's a consistent way of reproducing this crash, and there's a consistent way to fix it too:

                            Starting up IKEMEN GO and going straight into Random Test causes the crash, but going into any other mode first and then Random Test averts the crash. I've actually seen this exact behavior when trying to make my own LUA addons before, so it's possible this is a bug on IKEMEN's side and not on the Pi specifically. Crisis averted.

                            ADDENDUM 2: This was indeed a bug on IKEMEN's side, and one of the devs fixed it once I posted about it. That's a relief.

                            ▲▼▲▼▲▼▲▼▲▼
                            IKEMEN Go
                            SRB2Kart
                            ▼▲▼▲▼▲▼▲▼▲

                            D J 2 Replies Last reply Reply Quote 0
                            • D
                              duiz @SuperFromND
                              last edited by

                              @superfromnd Amazing to see such rapid progress on this. This might be the most exciting addition to RetroPie IMO.

                              1 Reply Last reply Reply Quote 1
                              • J
                                joamjoamjoam @SuperFromND
                                last edited by

                                @superfromnd

                                Sweet looks good. I'm curious as to what the issue was so ill cruise by the Github and check it out.

                                Out of curiosity how does the Retropie/Script pack process go. Do you submit it to them for addition to the experimental packages??

                                SuperFromNDS 1 Reply Last reply Reply Quote 0
                                • SuperFromNDS
                                  SuperFromND @joamjoamjoam
                                  last edited by

                                  @joamjoamjoam Correct! You create a scriptmodule and then PR it to the RetroPie/RetroPie-Setup Github for approval. If it's merged, it's added.

                                  The randomtest fix was apparently this.

                                  ▲▼▲▼▲▼▲▼▲▼
                                  IKEMEN Go
                                  SRB2Kart
                                  ▼▲▼▲▼▲▼▲▼▲

                                  J 1 Reply Last reply Reply Quote 0
                                  • J
                                    joamjoamjoam @SuperFromND
                                    last edited by

                                    @superfromnd oh nice seems like it was completely unrelated a to a CRT or fullscreen then. Sweet let me know if there is anything else I can help out with to help make this a reality.

                                    Side Note: I did find another bug on the pi side only where the command list for the characters is drawing some random white triangles when you try to view it. I might take a look at it this weekend. If i can confirm it ill post an issue in github to track the progress. Its most likely another difference in precision thing.

                                    SuperFromNDS 1 Reply Last reply Reply Quote 0
                                    • SuperFromNDS
                                      SuperFromND @joamjoamjoam
                                      last edited by SuperFromND

                                      @joamjoamjoam Oh actually, that command-list text bug isn't Pi-specific! Some AMD cards were getting that on IKEMEN on PC as well; it's apparently supposed to be fixed when the next version of IKEMEN is released (v0.98, sometime either this week or next week). No idea if that fix will also apply to the Pi though, so I guess we'll have to wait and see.

                                      ▲▼▲▼▲▼▲▼▲▼
                                      IKEMEN Go
                                      SRB2Kart
                                      ▼▲▼▲▼▲▼▲▼▲

                                      J T 2 Replies Last reply Reply Quote 0
                                      • J
                                        joamjoamjoam @SuperFromND
                                        last edited by

                                        @superfromnd oh that’s good to hear. The command list of probably my favorite Ikemen feature over the regular mugen cause I always forget the inputs.

                                        1 Reply Last reply Reply Quote 0
                                        • T
                                          Troopaking @SuperFromND
                                          last edited by Troopaking

                                          @superfromnd
                                          Hello again so as you've seen we made decent progress with mugem through box86 i think performance with mugen/ikemen will be better with ikemen go . Due to pi accepting go language better than comping and running through wine.
                                          I see you made some changes to stuff since my last comment.
                                          I will be trying to reinstall your scripts this evening to see if it works for me .

                                          Should I use your retropie scripts and then do fixes discussed or have to updated the scripts fixes not needed?

                                          SuperFromNDS 1 Reply Last reply Reply Quote 0
                                          • SuperFromNDS
                                            SuperFromND @Troopaking
                                            last edited by SuperFromND

                                            @troopaking The scripts alone should work just fine (at least the one over on the PR I've submitted).

                                            ▲▼▲▼▲▼▲▼▲▼
                                            IKEMEN Go
                                            SRB2Kart
                                            ▼▲▼▲▼▲▼▲▼▲

                                            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.