Tutorial  Updated

Play/port your GameMaker games on NintendoSwitch

DISCLAIMER:
THIS TUTORIAL IS A WIP, I'm still (eventually) updating it to contain the latest methods/fixes to allow mostly any gamemaker game to be ported onto the switch. Take in mind this guide is still incomplete, but does contain valuable info to start porting!


So... As you might (or not) already know there is a way to run different Gamemaker games by "overwriting" the main game.win file of an existant switch-gamemaker game (like Undertale for example) with another one (props to Chocolate28 who originally discovered this method). Hoowever, some games might not work properly or might not even launch at all! So here I am, with a guide that will most likely help you fix most of the relevant issues, and hopefully will guide you through the process of doing it so. Good luck!

REQUIREMENTS:

• Having Atmosphére CFW up and running (guide here)
• Having a gamemaker game installed on the switch ("DELTARUNE Chptr 1" is the recommended target)
• The data.win file of the game you want to port (You can find this in your game's installed location, sometimes it's embedded inside the exe of the game itself, so just open it as if it was a zip file and you may find it there!)
• The super awesome but somewhat tricky tool... UnderModTool aka UMT by krzys-h (download here)

LET'S START:

First compilation/testing:
You will want to open UMT tool (aka Undertale-Mod-Tool huh) and once opened drag your data.win file from the game you want to port inside this tool. Once loaded we will just try to compile it and see what's working and what's not.

To compile it again with any changes you've done just go into File >> Save, and save the new modified file as "game.win". Now create a folder named "010023800D64A000" (Deltarune's TitleID) and inside this folder create another one called "romfs", now place your "game.win" file inside this romfs folder. You can now place this folder with a bunch of numbers inside your sdcard to inject it in your switch, you must place this folder inside sdcard:/atmosphere/content/

Great! Now whenever you boot Deltarune in your switch you should see your game running!
Wait... it's not running?
Oddly expected

Time to get hands dirty and fix things by yourself! This part is a little more advanced than what you may think, so there's that, nonetheless... I believe in you!
Welcome to the awesome world of GMS decompilation and game modifying! (aka Gamemaker's modding hell)

First issue, Resolution Scale:
Usually lots of gamemaker games run in a window of a certain resolution, the switch can kind of handle different resolutions but only at supported scales. Most of the times this is the only fix you need to make the game display at all. So, go back to UMT, and with your data.win loaded double click on General Info in the left panel and look for Default windows size to check the resolution values. These values must be compatible with what the switch supports, so set them to 640x480 if the game uses 4:3 ratio scale or set them to 1280x720 if the games uses 16:9 ratio scale. Sometimes different values are valid and can cause much better image results than others (wide resolutions for example) so just play along with them while testing to see what works best for you.
Tbh I still have no clue to this day what the full supported resolutions are, so just try and let me know what worked and what didn't, ty!

Test again, Compilation/Testing reminder:
Now try and do the compiling process you followed earlier (File, Save, game.win...) and save the new modified game.win file in your sd card where you placed earlier the old one. This is how you are going to do the testing for the rest of the porting process, so get comfortable with it (because you're gonna be doing it a A LOT).

Uncommon issue, Collisions: (Todo, quote the use of the flag "FastCollision" system)
Now that your game is likely booting and all... you might have noticed that when you collide with certain objects, these don't have a proper collision (if every collision works fine just skip this step) and you would sometimes get stuck within those. To fix this you will want to navigate to the room where this collision is glitching and make sure it's marked as a solid object. So go into the left panel >> Rooms and search there for the room (go in fullscreen mode to see the whole room displayed). Once found your room, locate the collision object, it's usually an ugly block or something like that. Once found the collision object, double click on it and it will highlight the object in the object-list above, double click on the one highlighted and you will be now in that object's property panel. Now once there make sure the Solid checkbox is ticked, if it already is, you might want to go into the main character object properties and check the Solid box there as well (disclaimer: making your character solid can cause additional issues).
If this tips weren't enough to fix the collisions, please, report it and let me know here!

Implementing, Joycons:
You might have noticed that joycons work out of the box but only do so when attached to the console in handheld mode. To fix this you're gonna have to create an object that handles the joycons processes. Find the "Game Objects" section in the left panel and right click on it, click then on "Add". Name this object whatever you want and uncheck the Visible checkbox. You now want to place this object in the first loaded room, to do this open the Rooms section and navigate to the one where your character spawns, double click to open it and now navigate to the Game Objects section and find your object (do not click on it). While the room view is opened drag your newly created object to the room viewport. If UMT asks you to select a layer click on the Layer section above in the room's property panel and select any layer, then drag and drop your object in the viewport again and your done. Great! Now let's add some code! Double click on the created object and double click behind "Create" in the Events section. A new entry will be created but it's empty, you will see now the two buttons at the right of the new created entry, it's a plus sign next to a cross, click on add (+). Now a new code entry will be created, double click on it.

[THIS TUTORIAL IS A WIP]
 
Last edited by KardchCode, , Reason: update altar link and a few advises

KardchCode

Well-Known Member
OP
Member
Joined
Sep 18, 2017
Messages
133
Trophies
0
XP
906
Country
Spain
I also have to advice that there are a few problems left to solve like performance on fps, and savedata files with a few others, but this guide covers (and will cover) the most important fixes, right now is just the size, which is the most important one but I will provide more fixes to the problems left, as always stay tuned and follow me on Twitter! (@kardchcode)
 
Last edited by KardchCode,

KardchCode

Well-Known Member
OP
Member
Joined
Sep 18, 2017
Messages
133
Trophies
0
XP
906
Country
Spain
Also, if a mod is watching this please change the tag to none since it's a tutorial and not a release, my bad
 

cheese the chao

Member
Newcomer
Joined
Mar 15, 2009
Messages
14
Trophies
1
XP
696
Country
United States
Can you tell me the error log?, (Sorry for double message, it somehow got bugged)

"Exporting rooms... (98/391)An error occured during export

Unhandled Exception: System.IndexOutOfRangeException: Index was outside the bounds of the array.
at Altar.Unpack.Serialize.SerializeRoomTile(RoomTile tile, BackgroundInfo[] bgs)
at Altar.Unpack.Serialize.<>c__DisplayClass31_0.<SerializeRoom>b__3(RoomTile t)
at Altar.Unpack.Serialize.SerializeArray[T,TRet](IEnumerable`1 coll, Func`2 converter)
at Altar.Unpack.Serialize.SerializeRoom(RoomInfo room, BackgroundInfo[] bgs, ObjectInfo[] objs)
at Altar.Program.Export(ExportOptions eo)
at Altar.Program.<>c.<Main>b__10_0(String verb, Object vo)
at CommandLine.Parser.ParseArgumentsStrict(String[] args, Object options, Action`2 onVerbCommand, Action onFail)
at Altar.Program.Main(String[] args)"
 

KardchCode

Well-Known Member
OP
Member
Joined
Sep 18, 2017
Messages
133
Trophies
0
XP
906
Country
Spain
"Exporting rooms... (98/391)An error occured during export

Unhandled Exception: System.IndexOutOfRangeException: Index was outside the bounds of the array.
at Altar.Unpack.Serialize.SerializeRoomTile(RoomTile tile, BackgroundInfo[] bgs)
at Altar.Unpack.Serialize.<>c__DisplayClass31_0.<SerializeRoom>b__3(RoomTile t)
at Altar.Unpack.Serialize.SerializeArray[T,TRet](IEnumerable`1 coll, Func`2 converter)
at Altar.Unpack.Serialize.SerializeRoom(RoomInfo room, BackgroundInfo[] bgs, ObjectInfo[] objs)
at Altar.Program.Export(ExportOptions eo)
at Altar.Program.<>c.<Main>b__10_0(String verb, Object vo)
at CommandLine.Parser.ParseArgumentsStrict(String[] args, Object options, Action`2 onVerbCommand, Action onFail)
at Altar.Program.Main(String[] args)"
What game are you trying to export?
 

KardchCode

Well-Known Member
OP
Member
Joined
Sep 18, 2017
Messages
133
Trophies
0
XP
906
Country
Spain
AM2R . Wondered if this fix would solve its not booting problem. But can't even get all the files exported out of it.
Ohh I see, I'm casually trying to export it right now hehe, it's going ok, we will see if it gets past rooms and if not I will track the problem!
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • SylverReZ @ SylverReZ:
    That's really cool.
  • RedColoredStars @ RedColoredStars:
    Sorry you're not good with Windows Sylvester. lol
  • RedColoredStars @ RedColoredStars:
    Because co-pilot doesnt even show up on my pc. Not in the taskbar, not in the start menu search, and the option in settings to turn it on and off in the taskbar is not even displayed.
  • SylverReZ @ SylverReZ:
    Well, I complain about Microsoft all the time. You seem to enjoy it, no offense. If you like using Windows, that's fine by me.
    +1
  • SylverReZ @ SylverReZ:
    Everything is my own opinions.
  • RedColoredStars @ RedColoredStars:
    Liking Windows or not is an opinion. Yes.
  • RedColoredStars @ RedColoredStars:
    Being able to disable copilot is not an opinion. lol. its a fact that it can be disabled.
  • RedColoredStars @ RedColoredStars:
    Yet you just laugh about it when I tell you, like Im lying
  • RedColoredStars @ RedColoredStars:
    People can dislike Windows all they want. But I will call out the over-exaggerations, misconceptions, half truths, and lies about it.
    +2
  • RedColoredStars @ RedColoredStars:
    Tired of the entire "BUT BUT BUT WINDOWZ SPYWARE!!!" thing too, when the same people give out tons of their personal info to plenty of other companies but say nothing about it.
    +2
  • SylverReZ @ SylverReZ:
    @RedColoredStars, Companies do the exact same thing with other companies as well, so it's not just Microsoft. There are 3rd-parties like 'data brokers'.
  • RedColoredStars @ RedColoredStars:
    I'm 52 years old and one of my jobs in life was marketing research. Im well aware. I've been online for around 30 years. Everyone and their grandmother already has my personal information. One more having my email address isn't ruining my life or even effecting me in any way whatsoever.
    +1
  • RedColoredStars @ RedColoredStars:
    In fact. I freely give info. Stuff like gasoline apps, to save $, grocery apps, lots of cash back from rakuten, etc. etc.
    +1
  • RedColoredStars @ RedColoredStars:
    $300 back last year from Rakuten for allowing them to track my purchase. I'll take the money for them to know I bought a bunch of stuff for my cat and some video games. lol
  • K3Nv2 @ K3Nv2:
    No matter what you sign up for your info is out there
    +1
  • RedColoredStars @ RedColoredStars:
    Thats what im saying
  • SylverReZ @ SylverReZ:
    @K3Nv2, Exactly.
  • RedColoredStars @ RedColoredStars:
    And for people to say things like "But I use all fake info". No, they don't. lol. They use fake info for all of their banking and online shopping? Fake shipping address, fake payment info? lol
  • RedColoredStars @ RedColoredStars:
    Fake name, address and payment info for internet service, etc? lol. Ill say it again. Everyone freaks out about OMG WINDOWS!! But crickets on anything else they do.
  • RedColoredStars @ RedColoredStars:
    Other windows stuff people complain about hypocritically too. Like "But but but Windows bundle junk apps!!!!" Yeah?? So do many Linux distributions. Dont like it? Use one without them. Same with windows. Either find a pre-made version without the bundled stuff, or very easily make your own installer with what you want and do not want.
  • console @ console:
    I agree with all above! Microsoft made a biggest mess with us and everyone! I wish Microsoft company should be fired then lost it. LOL :rofl2:
    console @ console: I agree with all above! Microsoft made a biggest mess with us and everyone! I wish Microsoft...