WIP ioquake3-nx - an ioquake3 port

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

  1. aksyn

    aksyn Newbie

    Newcomer
    1
    Mar 18, 2019
    Australia
    Hi guys, I noticed the ioq3 release wasn't working and rebuilt it from source against latest SDL. Build is attached to this post. Also means it now has full USB keyboard/mouse support!!! Plays great. Enjoy, and thanks to fgsfdsfgs for all his porting efforts to-date.

    This build is working on my Switch running fw 7.0.1 Atmosphere 0.8.5 Hekate 4.9.1 fusee and starting ioq3 via HBMenu via title content override. YMMV.

    Can also confirm Team Arena works great with some editing of the q3config.cfg to fix the resolution:

    seta r_customPixelAspect "1"
    seta r_customheight "720"
    seta r_customwidth "1280"
    seta in_keyboardDebug "1"
    seta in_joystickUseAnalog "1"
    seta in_joystickNo "0"
    seta in_joystick "1"
     

    Attached Files:

    DSwizzy, ShadowOne333 and sj33 like this.
  2. Stwert

    Stwert GBAtemp Advanced Fan

    Member
    6
    GBAtemp Patron
    Stwert is a Patron of GBAtemp and is helping us stay independent!

    Our Patreon
    Jan 6, 2015
    United Kingdom
    Scotland
    Great to see homebrew like this coming to Switch, thank you for the work you are putting in on these.
     
  3. fgsfds
    OP

    fgsfds GBAtemp Fan

    Member
    7
    Aug 28, 2018
    Russia
    Version 0.2.0 released. Thanks for @aksyn / jfenton for PRing the necessary changes to allow it to run with libnx 2.0.
    Notable changes:
    • PK3 "caching" workaround is gone, meaning that music now plays correctly, among other things;
    • the game now uses OpenAL-Soft for audio output;
    • you can now bring up the on-screen keyboard in menus to enter stuff in text fields (press L to do that, R to delete text);
    • Home button exit is now handled correctly;
    • all libraries were updated to their latest versions;
    • performance has improved somewhat, probably caused by the previous change.
    See the original post for download links and installation instructions.
     
    DSwizzy, bad361, cucholix and 8 others like this.
  4. Csmrcc

    Csmrcc GBAtemp Regular

    Member
    4
    Sep 13, 2018
    Spain
    Working on atmosphere 0.85, fw 7.01, just it doenst close properly, black screen and i have to "home menu>close hbmenu.nsp".
     
    Last edited by Csmrcc, Mar 19, 2019
  5. Ch0wW

    Ch0wW Advanced Member

    Newcomer
    3
    Feb 2, 2019
    France
    France
    I don't understand how the joystick sensitivity can be changed.

    j_pitch / j_yaw doesn't do anything, and the movement joystick is really really sensitive, unlike, say, nxQuake2.

    Besides, if you disable joystick support in the options, well, time to FTP and get back the default q3config.cfg included in the release...

    also, I just saw that changing a few buttons can't be done with the current button "hack".
     
    Last edited by Ch0wW, Mar 20, 2019
  6. fgsfds
    OP

    fgsfds GBAtemp Fan

    Member
    7
    Aug 28, 2018
    Russia
    Like stated in the OP, j_pitch and j_yaw control right analog (look) sensitivity. Left analog (move) sensitivity should be controlled by j_forward and j_side. I am fairly certain that I have made no alterations to joystick input code and this is the way it works in ioquake3 by default, but if those variables don't do anything, then I might've replaced some of the movement code.
    It is true that you can't control the menus without the joystick, this can be solved by making A act as ENTER for example, however A is already bound to the left mouse button, so care has to be taken to disallow duplicate menu button presses when the button is highlighted by the cursor.
    The reason why I haven't altered any menu options is because the UI code is in a separate DLL, or in this case a VM bytecode file. I just couldn't be arsed to recompile it, really, and it's also different for every mod. This is also the reason why swkbd support is so awkward: I would have to expose IN_SwitchKeyboard to the VM code.
     
    Last edited by fgsfds, Mar 20, 2019
  7. sj33

    sj33 GBAtemp Psycho!

    Member
    13
    Oct 22, 2013
    Japan
    Unfortunately, I've not had any luck getting Team Arena working with the new version even using these cfg entries. Has anybody else had any issues?
     
  8. Ch0wW

    Ch0wW Advanced Member

    Newcomer
    3
    Feb 2, 2019
    France
    France
    ioQuake3 has one of the worst (and thus, hackiest) joystick code I've ever seen. And even when changing those 2 CVARs, nothing would change, the speed stays unfairly high for me.

    When you have a very very slight angle to the right while pressing forward, ioQuake3 believes you do a Strafe40... But this is maybe a problem the ioQuake3 team could solve/rewrite.

    Agreed, that was one of the very first things I've done on my fork. And adding a combo button for the console ( (-) + L + R ).

    That said, I've to make some hacky stuff aswell, since the controller buttons were thought for x360 and not the Switch)

    Besides, some more CVAR alterations have to be done, and that won't be a piece of cake (

    I see. Usually, mods port over your original Q3 settings, and most of them don't change anything (exception done for rare mods like Urban Terror)... But if we can get at least the console at all times, we're fine.
     
  9. fgsfds
    OP

    fgsfds GBAtemp Fan

    Member
    7
    Aug 28, 2018
    Russia
    Looking at the code, yeah, it does seem that j_side/j_forward only affect the sign of the move, but the move itself is binary and not "analogue" in any way. In yquake2 iirc joystick values go directly into cmd->forward_move and cmd->side_move or whatever, making it "analogue". Don't know if this is possible in ioq3, but should be. If it isn't, I could probably at least add a deadzone value for every axis.
     
  10. ShadowOne333

    ShadowOne333 GBAtemp Guru

    Member
    19
    Jan 17, 2013
    Mexico
    Could all of these latest updates, including the ones in libnx and other libraries perhaps help other ports you've done as well?
    Like Doom 3 and the other Quakes?
     
  11. Ch0wW

    Ch0wW Advanced Member

    Newcomer
    3
    Feb 2, 2019
    France
    France
    nxQuake 2 has received a few improvements over the libnx 2.0.0, mostly a better joystick support. I'd believe we only have to fix DNS name resolution first before officially updating it. But you can have a fork build in its respective thread.

    QuakeSpasmNX has a major issue right now that we're currently trying to fix after updating updating it (but once it's done, I'll make the same favor treatments as nxQuake2). Can't say anything about DOOM3NX.

    ... Speaking of Doom, is there a way to port Odamex to Switch ? That'd be the very first Doom port which would have online multiplayer (and would technically boost interest in the Switch homebrew community :P )
     
  12. fgsfds
    OP

    fgsfds GBAtemp Fan

    Member
    7
    Aug 28, 2018
    Russia
    dhewm3-nx has to be updated with the same libnx 2.0 related changes and it'll work. Same with Doom64EX and NXQuake.
    Technically I've been working on a k8vavoom port, which is a Vavoom fork that adds some modern ZDoom features and other cool stuff, but I haven't updated it in a while and haven't released the binaries, although it is open source. Don't remember if multiplayer works in there though.
    Don't know much about Odamex, but if it uses the same SDL2 + OpenGL [+ OpenAL] combo as basically all of my ports, then it's probably possible. Would probably need a Switch-specific launcher/server browser/WAD selector if I port it, like k8vavoom and most other Doom source ports.
     
    ShadowOne333 likes this.
  13. Ch0wW

    Ch0wW Advanced Member

    Newcomer
    3
    Feb 2, 2019
    France
    France
    Odamex was very recently ported to SDL2 with the 0.8.0 release. It only uses OpenGL for the screen support, then rendered in software.

    Also, it uses Timidity or portmidi for midi output.

    For now, the wad selection isn't a problem, since it has a built in wad command. And there'll be an ingame serverbrowser in the works.
     
  14. bad361

    bad361 GBAtemp Regular

    Member
    4
    Jun 18, 2018
    Russia
    Moscow
    • you can bring up swkbd in menus by pressing L, but it works slightly weird: stuff you enter will just get added to the end of the input field, to edit it you have to move the in-game cursor and use R to delete characters;
    • you can also bring up swkbd by entering showosk in console, you can also bind the command to a button in q3config.cfg and use it in-game;
    L doesn't work for me (nothing happens) and dont know how to bring up the console or what command should i bind? everything else works perfect tho

    upd: updated to 0.2.0, works now
     
    Last edited by bad361, Mar 22, 2019
  15. mathew77

    mathew77 Advanced Member

    Newcomer
    3
    Jan 19, 2019
    Norway
    Dear fgsfds, is there any chance (even theoretically) to find out the precious Heavy Metal F.A.K.K. 2 / Alice McGee port on the Switch? It's also on the Quake 3 @ id Tech 3 engine afaik, and there's a Linux port of it, and open-source Spearmint-based fork (link) ..
     
    Last edited by mathew77, May 19, 2019
  16. fgsfds
    OP

    fgsfds GBAtemp Fan

    Member
    7
    Aug 28, 2018
    Russia
    From what I can tell, the game DLL source for those games was never released, so no. The Spearmint-based reimplementations are far from playable.
     
    mathew77 likes this.
  17. Mikep90

    Mikep90 GBAtemp Regular

    Member
    4
    May 29, 2018
    United States
    Could you try and see about porting redneck rampage . That would be fun to play on switch
     
  18. bad361

    bad361 GBAtemp Regular

    Member
    4
    Jun 18, 2018
    Russia
    Moscow
    Mouse and keyboard work fantastic but i cant seem to type anything in console, it just debugs all pressed keys there without typing and actual console command.