Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add basegame/mod support to web client and automatically handle branding #670

Merged
merged 9 commits into from
Jun 11, 2024

Conversation

zturtleman
Copy link
Member

This adds support for playing Team Arena and the demo versions of Quake 3 and Team Arena in a web browser using ioquake3.html?fs_game=missionpack and ?com_basegame=demoq3 (or tademo).

This automatically handles branding for the client HTML and JSON filenames (based on CLIENTBIN in make) and the default game directory (BASEGAME). With these changes I was able to run a Star Trek Voyager Elite Force Holomatch project I maintain (Lilium Voyager) in a web browser by only adding the baseEF pk3 file list to code/web/client-config.json, compiling it, and browsing to liliumvoyagerhm.html.

There is also some clean up and reorganization of the emscripten support in the Makefile.

Have emscripten disable BUILD_RENDERER_OPENGL1 instead of hardcoded to
disable opengl1 client.
- Remove emscripten build steps from Makefile (see readme)
- USE_CURL=0 has no effect
- HAVE_VM_COMPILED=false has no effect
- WebGL 1 and 2 are supported by the OpenGL2 renderer
- FULL_ES2 (client-side arrays) isn't needed
- Rename EMSCRIPTENOBJ to GENERATEDTARGETS and separate it from
  TARGETS so it's more readable.
Compile the QVMs and automatically uses them when not using --preload-file.
Modify the client HTML file when copying it to the build directory to
apply current CLIENTBIN and BASEGAME. It always loads engine/data from
the current directory (no need to try to locate the build directory).
List files for multiple games in a single client-config.json file so
that com_basegame argument can pick different game data.

Use ioquake3.html?com_basegame=demoq3 (or tademo) to run the Quake 3 or
Team Arena demo. They require new QVMs from baseq3/missionpack to run.
ioquake3.html?fs_game=missionpack will run Team Arena when not using
--preload-file.
Also make viewing client.html directly use client-config.json in the
same directory so it's possible to "live edit" both the files without
having to run make.
@zturtleman zturtleman merged commit c1ab47a into ioquake:main Jun 11, 2024
4 checks passed
@zturtleman zturtleman deleted the emscripten_fixes branch June 11, 2024 08:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant