• Recent
  • Tags
  • Popular
  • Home
  • Docs
  • Register
  • Login
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
152 Posts 20 Posters 53.4k 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.
  • D
    duiz
    last edited by 7 Aug 2021, 23:07

    I'm new to the topic so apologies of this is a tired question. But what exactly is the compatibility for MUGEN titles on IKEMEN? Can this basically play most MUGEN games on the pi, or do they need to be recompiled for IKEMEN specifically?

    S 1 Reply Last reply 7 Aug 2021, 23:12 Reply Quote 0
    • S
      SuperFromND @duiz
      last edited by 7 Aug 2021, 23:12

      @duiz IKEMEN GO is fully backwards compatiable with MUGEN stuff, pretty much the exact same file structure (with the only big difference being a lack of mugen.cfg, with config.json taking that functionality).

      I actually tested Hyper Dragon Ball Z over here on Twitter, and it pretty much worked with near-zero hassle (the only thing I had to modify was a single line in system.def to fix a broken file path).

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

      D 1 Reply Last reply 8 Aug 2021, 00:13 Reply Quote 0
      • D
        duiz @SuperFromND
        last edited by 8 Aug 2021, 00:13

        @superfromnd Interesting. Has anyone tried that Justice League vs TMNT to see if that works?

        S J 2 Replies Last reply 8 Aug 2021, 01:59 Reply Quote 0
        • S
          SuperFromND @duiz
          last edited by 8 Aug 2021, 01:59

          @duiz Not to my knowledge, but theoretically it should work just fine.

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

          J 1 Reply Last reply 8 Aug 2021, 18:33 Reply Quote 0
          • J
            joamjoamjoam @SuperFromND
            last edited by 8 Aug 2021, 18:33

            @superfromnd

            Im having reproducing the fullscreen lets call it wonkiness that you saw on Windows 7. I have .97 release on windows 10 (a brand new laptop actually) and i can toggle fullscreen on and off without issue. What Ikemen version are you using?

            I also installed a fresh retropie distro on a fresh sd card and was able to run the og scriptpack with the manual permissions fix without issues. Setting fullscreen on that also worked as intended on a 4k TV via HDMI.

            I wonder if the issues you are seeing are related to overscan and running on your super fancy CRT. The fullscreen and resolution options are handle by a well tested graphics library (GLFW) so i wouldn't suspect that there is something wrong in the Ikemen source. It doesn't handle overscan natively as digital video outputs do no use overscan (usually) so that could explain why your video is offset. If there was anything that might be needed to be handled buy Ikemen it would be the sset your screen size stuff that games do where you have to shrink the screen until you see the arrows but that is done under the hood by just chaninging the resolution on the screen.

            You can do this in the config.json by setting a custom resolution to see if it resolves the screen being off center.

            Just for clarity the fullscreen bug you mention is the screen being off center leaving black bars on the screen or cutting off the screen etc? If so is this only on a CRT or does this also affect a screen using hdmi or other digital output?

            S 1 Reply Last reply 8 Aug 2021, 19:50 Reply Quote 0
            • J
              joamjoamjoam @duiz
              last edited by 8 Aug 2021, 18:37

              @duiz

              I just added TMNT to my arcade last night and it converted to Ikemen just fine. Its as simple as taking all the Mugen files and copying them on top of the Ikemen files. Then you have to start Ikemen once to generate a config.json file in the save folder. After that copy the motif setting from data/mugen.cfg to the motif field in save/config.json.

              D 1 Reply Last reply 9 Aug 2021, 20:58 Reply Quote 0
              • S
                SuperFromND @joamjoamjoam
                last edited by SuperFromND 8 Aug 2021, 21:08 8 Aug 2021, 19:50

                @joamjoamjoam I just now re-tested fullscreen (using the regular launching script, not matchbox) and it seems to work on HDMI now, strangely enough! Previously it would just instantly crash the second I toggled it on, but I guess at some point that got fixed on RPi. Or maybe the crashing was always fixed on HDMI, and it only crashed when trying to run fullscreen on composite... actually that probably IS the reason.

                You can indeed just set a custom resolution (720x480) on IKEMEN to fill the screen on composite (though that's not ideal for me since that results in slightly upscaled sprites, which looks a little weird; it's something that can always be fixed later down the line though). Admittedly I spend almost all of my RetroPie time on HDMI anyways; the CRT I used to record demos was purely for looks (as MUGEN/IKEMEN running on a CRT just looks plain awesome).

                The bug I was running into via matchbox was very different; the screen would be correctly set to the given resolution, but when trying to fullscreen, matchbox would crop itself to the top-left corner and not adjust itself to the position of the game, resulting in most of the game's screen being cropped off:
                matchbox output.png
                I'm assuming that this is because of OpenGL fundamentally using the bottom-left corner as its basis instead of the top-left. Since the fullscreen crashes I was getting earlier have apparently fixed themselves, matchbox won't be needed anyways, but it's still pretty odd. The main reason I was trying to use it was hope that it would center the IKEMEN window (which would solve my CRT display problems), but for whatever reason that doesn't seem to be the case.

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

                J S 2 Replies Last reply 8 Aug 2021, 21:59 Reply Quote 0
                • J
                  joamjoamjoam @SuperFromND
                  last edited by 8 Aug 2021, 21:59

                  @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!

                  S 1 Reply Last reply 8 Aug 2021, 22:13 Reply Quote 1
                  • S
                    SuperFromND @joamjoamjoam
                    last edited by SuperFromND 8 Sept 2021, 00:34 8 Aug 2021, 22:13

                    @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 9 Aug 2021, 00:47 Reply Quote 0
                    • J
                      joamjoamjoam @SuperFromND
                      last edited by 9 Aug 2021, 00:47

                      @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.

                      S 1 Reply Last reply 9 Aug 2021, 01:14 Reply Quote 0
                      • S
                        SuperFromND @joamjoamjoam
                        last edited by SuperFromND 8 Sept 2021, 02:14 9 Aug 2021, 01:14

                        @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 9 Aug 2021, 01:46 Reply Quote 0
                        • J
                          joamjoamjoam @SuperFromND
                          last edited by 9 Aug 2021, 01:46

                          @superfromnd

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

                          S 1 Reply Last reply 9 Aug 2021, 03:56 Reply Quote 1
                          • S
                            SuperFromND @joamjoamjoam
                            last edited by 9 Aug 2021, 03:56

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

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

                            B 1 Reply Last reply 10 Aug 2021, 02:20 Reply Quote 0
                            • D
                              duiz @joamjoamjoam
                              last edited by 9 Aug 2021, 20:58

                              @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.

                              S 1 Reply Last reply 9 Aug 2021, 21:11 Reply Quote 0
                              • S
                                SuperFromND @duiz
                                last edited by SuperFromND 8 Sept 2021, 22:24 9 Aug 2021, 21:11

                                @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 9 Aug 2021, 23:00 Reply Quote 0
                                • D
                                  duiz @SuperFromND
                                  last edited by 9 Aug 2021, 23:00

                                  @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
                                  • B
                                    BuZz administrators @SuperFromND
                                    last edited by 10 Aug 2021, 02:20

                                    @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
                                    • S
                                      SuperFromND @SuperFromND
                                      last edited by 10 Aug 2021, 09:20

                                      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
                                      • S
                                        SuperFromND
                                        last edited by SuperFromND 8 Nov 2021, 05:14 11 Aug 2021, 02:22

                                        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 11 Aug 2021, 04:58 Reply Quote 0
                                        • D
                                          duiz @SuperFromND
                                          last edited by 11 Aug 2021, 04:58

                                          @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
                                          57 out of 152
                                          • First post
                                            57/152
                                            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.

                                            This community forum collects and processes your personal information.
                                            consent.not_received