WIP QuakespasmNX - a better Quake port

Discussion in 'Switch - Emulation, Homebrew & Software Projects' started by fgsfds, Sep 17, 2018.


    Front-page WIP
    I ported Quakespasm to the Switch. Why? Because it's better than NXQuake/TyrQuake and I'm too lazy to backport features from it into NXQuake.
    Github repo: /fgsfdsfgs/QuakespasmNX
    Latest version: 0.1.0 (Sep 17, 2018)
    Download link: Github release page

    Warning: Spoilers inside!

    Some of the features of the port:
    • hardware-accelerated OpenGL 2.x-based rendering in 1280x720;
    • sound, including support for OGG and MP3 music tracks;
    • supports the Mission Packs and other mods compatible with Quakespasm (Quoth, Arcane Dimensions), with a simple mod selector menu;
    • analog controls and shit;
    • most other features of Quakespasm, such as:
      • advanced renderer with cool stuff, such as colored lighting, fog, translucent water, high-res textures, model interpolation, etc;
      • scalable, optionally translucent HUD and menus;
      • music support, as mentioned earlier;
      • raised engine limits;
      • built-in controller support, which means I had to do basically nothing to make it work on the Switch.

    To install it, just unzip quakespasmnx_v010.zip to the root of your SD card, then copy pak0.pak and (optionally, if you have the full version of Quake) pak1.pak from your Quake installation to /switch/quakespasm/id1/. You can then run the game using the Homebrew Launcher. You can get pak0.pak from the Shareware Quake data files in this archive.
    If you want to play Mission Pack 1, copy hipnotic/pak0.pak to /switch/quakespasm/hipnotic/ from your installation.
    If you want to play Mission Pack 2, copy rogue/pak0.pak to /switch/quakespasm/rogue/ from your installation.
    For any other mod, just copy its folder to /switch/quakespasm/.

    Some notes:
    • if it crashes and exits back to HBL/Horizon silently, check /switch/quakespasm/error.log to find out what caused it;
    • reboot into orange screen means GPU crash, please report that if it happens;
    • music should be copied into a music subfolder inside of the appropriate game folder, and the tracks should be named track02.ogg - track11.ogg (or .mp3 if you're using MP3s), e.g.:
      • Quake music goes into /switch/quakespasm/id1/music/;
      • Mission Pack 1 music goes into /switch/quakespasm/hipnotic/music/.
    • Arcane Dimensions doesn't actually work 100%, since it requires more memory, but most maps do, I think;
    • to enable texture filtering, change gl_texturemode in config.cfg to GL_LINEAR_MIPMAP_LINEAR;
    • to enable round particles, change r_particles in config.cfg to 1, 2 for square particles;
    • to change right analog sensitivity, change the joy_sensitivity_pitch (up/down) and joy_sensitivity_yaw (left/right) variables in config.cfg;
    • to get out of the "Completed" intermission screen at the end of a map, press "jump" (LTRIGGER by default) a few times;
    • I'm too lazy to write a post from scratch, so I just copied the NXQuake thread OP again;
    • better exit the game using the Quit option in the menu, don't just press the Home button, use Y to confirm the exit prompt;
    • multiplayer doesn't work yet, just like in NXQuake, but probably will be added later;
    • read the original Quakespasm readme for more information;
    • if you have any suggestions or bug reports, please post them here or in the Github issues.

    • Quakespasm was made by:
      • Ozkan
      • Eric
      • Sander
      • Stevenaaus
      • based on FitzQuake by Fitzgibbons
      • and probably others;
    • fincs, Armada651, Subv and probably others for their work on the OpenGL/mesa/libdrm stuff;
    • id Software for Quake.
    Discussion (85 replies)
  1. kikongokiller

    kikongokiller GBAtemp Advanced Fan

    Jan 12, 2017
    NXQuake: Who are you?
    QuakespasmNX: I'm you but better.
    DSwizzy, Mazamin, Dr.Hacknik and 8 others like this.
  2. Memoir

    Memoir Just a Memory

    Jun 24, 2007
    United States
    Somewhere, over there!
    Loaded it up. Runs great. Shuts my system down on a 2nd reboot?
  3. sj33

    sj33 GBAtemp Psycho!

    Oct 22, 2013
    You're a fast worker!
  4. sj33

    sj33 GBAtemp Psycho!

    Oct 22, 2013
    Sorry for the double post. Here is a little fix to make the demo attract run at the start of the game. Apparently this is a Quakespasm limitation.

    I have attached an autoexec.cfg. Just drop this into the /id1/ folder. The flaw is that the demo will only play once, not loop. If anybody knows how to make it look, please post a modified autoexec.cfg.

    Attached Files:

  5. Mikep90

    Mikep90 GBAtemp Regular

    May 29, 2018
    United States
    as well I have the same problem/ The first boot works just fine but the second boot freezes up and have to hard reset it.
    Have to either hit home or play another game than boot it up back up it will work but if you hit quit than attempt to play again it will freeze up resulting in a hard reset
    Last edited by Mikep90, Sep 17, 2018
    Memoir likes this.
  6. sj33

    sj33 GBAtemp Psycho!

    Oct 22, 2013
    I found that exiting out to the Switch menu before loading again seems to avoid that issue.
  7. TunaKetchup

    TunaKetchup GBAtemp Fan

    Mar 20, 2018
  8. Purple_Shyguy

    Purple_Shyguy GBAtemp Advanced Fan

    Nov 8, 2008
    Republic of Ireland
    Dude, You're on fire! Thank you!
  9. lordelan

    lordelan GBAtemp Psycho!

    Jan 4, 2015
    @fgsfds Wow man! Keep porting stuff, you have a run right now.
    Also I don't know if the Switch is strong enough for the Quake III engine but if it is, maybe one of my fav Q3 games could be ported:
    Jedi Academy. In fact there's an open source efford here -> https://github.com/JACoders/OpenJK
    It would need the original files though obviously (which you can get from Steam or GOG).
  10. Billy Acuña

    Billy Acuña GBAtemp Addict

    Oct 10, 2015
    Hires textures only works under hbmenu.nsp btw (more RAM needed perhaps?)

    Enviado desde mi LG-X240 mediante Tapatalk
  11. fgsfds

    fgsfds GBAtemp Regular

    Aug 28, 2018
    That is correct. More RAM is needed for highres textures. It also currently preallocates 128 MB for its internal heap instead of the default 256, which makes some AD maps crash on load. I don't know of a way to get more memory from a homebrew applet, NSP might be the only way. You might want to rebuild it with a 256 MB heap or somehow pass -heapsize 256 to it, when you pack it into an NSP. You'd have to change this line to do that.
    As for crashing on the second time you start it up, I'm aware of this and I'm currently not sure what causes it. Might be incorrect deinitialization of the GL stuff. Restarting the Homebrew Launcher between runs helps.
    lordelan likes this.
  12. gnmmarechal

    gnmmarechal GBAtemp Guru

    GBAtemp Patron
    gnmmarechal is a Patron of GBAtemp and is helping us stay independent!

    Our Patreon
    Jul 13, 2014
    This is cool!
  13. Csmrcc

    Csmrcc GBAtemp Regular

    Sep 13, 2018
    Ok this is better for me because music overall, will test this afternoon thank you!
  14. raphamotta

    raphamotta GBAtemp Advanced Fan

    Jul 12, 2013
    Is this the first homebrew that uses the new OpenGL feature from libnx? Congratz!!
  15. sj33

    sj33 GBAtemp Psycho!

    Oct 22, 2013
    Does launching hbmenu itself as an nsp actually grant all subsequent homebrew the unlocked resources?
  16. radicalwookie

    radicalwookie GBAtemp Fan

    Sep 15, 2018
    United States
    I really want to try this but I dont know where my Quake2 cd is :(
  17. Reploid

    Reploid GBAtemp Maniac

    Jan 20, 2010
    Serbia, Republic of
    Better, than nothing?
  18. chikoo_69

    chikoo_69 GBAtemp Regular

    Jan 16, 2015
    Saint-Hubert, Quebec
    FYI, i am not sure why but mine does not crash at all when restarting a new game from a loaded one. I've been trying to make it crash for a while now and still running new games.
  19. fgsfds

    fgsfds GBAtemp Regular

    Aug 28, 2018
    It crashes when you exit out of the game entirely and run it again without exiting HBL. I think it was NXQuake that was crashing at starting a new game while already running one.