Skip to content

Rinnegatamante/StaticJK

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpenJK Emscripten Port

Demo

Playable demo levels: https://jk.qubit.rs

Description

This is an emscripten port of OpenJK engine used in Star Wars: Jedi Academy and Star Wars: Jedi Outcast games.

The whole game engile is compiled into javascript and WebAssembly and can be ran inside the web browser.

Currently, only JA single player engine is ported. Additional PRs porting multiplayer and Jedi Outcast versions are welcome.

Screenshot: screenshot

Internals

The codebase is based on OpenJK engine with some tweaks to make it work with emscripten.

The whole project is built as a single executable, without any static or dynamic linking between engine files. This is done because emscripten doesn't play well with linking.

Rendering is currently implemented as a GLES emulation of OpenGL using Regal.

Performance

The performance is far from perfect. This is mainly because all OpenGL calls are emulated into WebGL. All PRs improving performance are welcome.

Building

Emscripten

Make sure you have version 2.0.11 of emscripten activated. You can check the version by doing emcc -v.

mkdir build
cd build
emccmake ..
emmake make -j8

Native

This project also supports native builds. Note that native builds use OpenGL instead of GLES. Native build steps:

mkdir build
cd build
cmake ..
make -j8

Running

The bin folder contains prebuild binaries. You need to place your assets0.pk3, assets1.pk3, assets2.pk3, assets3.pk3 and default.cfg inside the base folder and serve everything with:

python3 -m http.server

After that, the game should be available on http://localhost:8000/jedi_academy.html

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages

  • C++ 74.0%
  • C 24.9%
  • Other 1.1%