Homebrew WIP ioquake3-nx - an ioquake3 port

aksyn

New Member
Newbie
Joined
Mar 18, 2019
Messages
1
Trophies
0
Age
44
XP
70
Country
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"
 

Attachments

  • ioquake3nx.zip
    4.1 MB · Views: 201

fgsfds

Well-Known Member
OP
Member
Joined
Aug 28, 2018
Messages
445
Trophies
0
Age
123
XP
3,332
Country
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.
 

Csmrcc

Well-Known Member
Member
Joined
Sep 13, 2018
Messages
412
Trophies
0
Age
37
XP
905
Country
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,

Ch0wW

Well-Known Member
Newcomer
Joined
Feb 2, 2019
Messages
79
Trophies
0
Age
31
Location
France
Website
www.youtube.com
XP
402
Country
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,

fgsfds

Well-Known Member
OP
Member
Joined
Aug 28, 2018
Messages
445
Trophies
0
Age
123
XP
3,332
Country
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,

sj33

Well-Known Member
Member
Joined
Oct 22, 2013
Messages
4,072
Trophies
2
XP
4,726
Country
Japan
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"
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?
 

Ch0wW

Well-Known Member
Newcomer
Joined
Feb 2, 2019
Messages
79
Trophies
0
Age
31
Location
France
Website
www.youtube.com
XP
402
Country
France
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.
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.

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

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.

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.
 

fgsfds

Well-Known Member
OP
Member
Joined
Aug 28, 2018
Messages
445
Trophies
0
Age
123
XP
3,332
Country
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.
 

ShadowOne333

QVID PRO QVO
Editorial Team
Joined
Jan 17, 2013
Messages
12,184
Trophies
2
XP
33,690
Country
Mexico
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.
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?
 

Ch0wW

Well-Known Member
Newcomer
Joined
Feb 2, 2019
Messages
79
Trophies
0
Age
31
Location
France
Website
www.youtube.com
XP
402
Country
France
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?

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 )
 

fgsfds

Well-Known Member
OP
Member
Joined
Aug 28, 2018
Messages
445
Trophies
0
Age
123
XP
3,332
Country
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.
 
  • Like
Reactions: ShadowOne333

Ch0wW

Well-Known Member
Newcomer
Joined
Feb 2, 2019
Messages
79
Trophies
0
Age
31
Location
France
Website
www.youtube.com
XP
402
Country
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.
 

bad361

Well-Known Member
Member
Joined
Jun 18, 2018
Messages
1,168
Trophies
0
Location
Moscow
XP
2,447
Country
Russia
  • 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,

mathew77

Lovin' life.
Member
Joined
Jan 19, 2019
Messages
1,184
Trophies
0
Age
47
XP
3,673
Country
Kazakhstan
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,

fgsfds

Well-Known Member
OP
Member
Joined
Aug 28, 2018
Messages
445
Trophies
0
Age
123
XP
3,332
Country
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.
 
  • Like
Reactions: mathew77

bad361

Well-Known Member
Member
Joined
Jun 18, 2018
Messages
1,168
Trophies
0
Location
Moscow
XP
2,447
Country
Russia
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"
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.
 

fgsfds

Well-Known Member
OP
Member
Joined
Aug 28, 2018
Messages
445
Trophies
0
Age
123
XP
3,332
Country
Russia
Version 0.3.0 released. Thanks to @aksyn / jfenton for PRing gyroscope controls and other fixes.
Notable changes:
  • basic gyroscope aiming:
    • disabled by default, enable in Setup -> Controls;
    • sensitivity is controlled by the console variables in_gyromouse_pitch and in_gyromouse_yaw;
    • set in_gyromouse_yaw_axis to 1 to map gyro yaw to turning instead of roll.
  • menu and console controls have been tweaked:
    • cursor moves slower in menus and you can now select items with the DPAD and X button as an alternative;
    • you can now bring up the console while in menus using the Y button;
    • you can now actually enter console commands by pressing A after inputting them.
  • old incorrect NWindow handling routines have been thrown out, should now crash less;
  • synced with upstream and rebuilt with latest libnx (9.0.0 support).
Download link is in the OP.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    K3Nv2 @ K3Nv2: Sak is a fishy pineapple