This is my port of solarus engine to the nintendo switch
You need devkitpro and quite a few libs installed. I did not keep track of which ones while building it, so here are the ones I currently have intalled:
deko3d 0.2.0-1 devkit-env 1.0.1-2 devkitA64 r16-1 devkitA64-gdb 9.2-1 devkita64-rules 1.0.1-2 devkitpro-keyring 20180316-1 general-tools 1.2.0-2 libnx 3.3.0-2 switch-bzip2 1.0.6-3 switch-examples 20200528-2 switch-flac 1.3.2-4 switch-freetype 2.10.1-1 switch-glad 0.1.27-1 switch-glm 0.9.9.7-1 switch-libconfig 1.7.2-3 switch-libdrm_nouveau 1.0.1-1 switch-libjpeg-turbo 1.5.3-2 switch-libmodplug 0.8.8.5-1 switch-libogg 1.3.4-1 switch-libopus 1.3-2 switch-libpng 1.6.37-1 switch-libvorbis 1.3.5-2 switch-libvorbisidec 1.2.1-2 switch-libwebp 1.0.2-1 switch-mesa 20.1.0-1 switch-mpg123 1.25.10-3 switch-opusfile 0.10-3 switch-physfs 3.0.2-1 switch-pkg-config 0.28-4 switch-sdl2 2.0.12-3 switch-sdl2_gfx 1.0.4-2 switch-sdl2_image 2.0.4-1 switch-sdl2_mixer 2.0.4-2 switch-sdl2_ttf 2.0.15-1 switch-tools 1.8.0-1 switch-zlib 1.2.11-2 uam 1.0.0-2
I did not find a prebuilt Plutonium or lua, so i included these in the source tree for convience.
I took some code from https://github.com/carstene1ns/solarus-engine but have since modified it quite a bit also upgrading it to 1.6.4.
I basically have the code for the switch ignoring the sdl axis movement and any of the joypad buttons that are directional and instead fake them as keyboard directions. Dont know if that's the best way to go about it, but it works.
The - key is mapped to 'escape' so you can actually exit the game
There are two ways to build:
make SWITCH_GUI=1
this builds a very primitive gui I made that will find all quests in sdmc:/switch/solarus/games and let you select one. You can have them in the zipped .solarus format or unpacked. If you leave them zipped the gui is a lot slower to load as it reads the titles from them.
The other is to build a standalone game where the game is put in romfs, to do this, for example Mystery of Solarus DX:
make EMBEDED_TARGET=MysteryOfSolarusDX EMBEDED_TITLE="Mystery Of Solarus DX" EMBEDED_VERSION="1.10" EMBEDED_ICON=MysteryOfSolarusDX.jpg ROMFS=romfs
the romfs dir should have a game renamed to data.solarus.zip or data.solarus unzipped or you can unpack the whole thing in the dir
this will create a standalone nro
Note: you will need to 'touch src/main/Main.cpp' when switching between the two
Solarus is an open-source adventure 2D game engine written in C++. It can run games scripted in Lua. This engine is used by our Zelda fangames. Solarus is licensed under GPL v3.
You might be interested in our fangames created with Solarus:
Zelda Mystery of Solarus DX, our first and main creation, release in 2011.
Zelda Return of the Hylian SE, a remake of Vincent Jouillat's game, released in 2015.
Zelda Mystery of Solarus XD, a parodic game released on April 1st, 2011.
Zelda XD2: Mercuris Chess, a sequel to the first XD, released on April 1st, 2017.
If you want to create your own games with the Solarus engine, see Solarus Quest Editor, our Solarus game creation software.
See our website to get more information and documentation about using the Solarus engine.
To compile Solarus, instructions can be found in the compilation.md file.