Git Product home page Git Product logo

openjk's Introduction

OpenJK

OpenJK is a community effort to maintain and improve the game and engine powering Jedi Academy and Jedi Outcast, while maintaining full backwards compatibility with the existing games and mods.
This project does not intend to add major features, rebalance, or otherwise modify core gameplay.

Our aims are to:

  • Improve the stability of the engine by fixing bugs and improving performance.
  • Support more hardware (x86_64, Arm, Apple Silicon) and software platforms (Linux, macOS)
  • Provide a clean base from which new code modifications can be made.

discord forum

build coverity

Supported Games

Game Single Player Multi Player
Jedi Academy โœ… Stable โœ… Stable
Jedi Outcast ๐Ÿ˜ง Works, needs attention ๐Ÿ™… Not supported - consider JK2MV

Please direct support queries, discussions and feature requests to the JKHub sub-forum or Discord linked above.

License

OpenJK is licensed under GPLv2 as free software. You are free to use, modify and redistribute OpenJK following the terms in LICENSE.txt

For players

To install OpenJK, you will first need Jedi Academy installed. If you don't already own the game you can buy it from online stores such as Steam, Amazon or GOG.

Download the latest build (alt link) for your operating system.

Installing and running OpenJK:

  1. Extract the contents of the file into the Jedi Academy GameData/ folder. For Steam users, this will be in <Steam Folder>/steamapps/common/Jedi Academy/GameData/.
  2. Run openjk.x86.exe (Windows), openjk.i386 (Linux 32-bit), openjk.x86_64 (Linux 64-bit) or the OpenJK app bundle (macOS), depending on your operating system.

Linux Instructions

If you do not have an existing JKA installation and need to download the base game:

  1. Download and Install SteamCMD SteamCMD.
  2. Set the download path using steamCMD: force_install_dir /path/to/install/jka/
  3. Using SteamCMD Set the platform to windows to download any windows game on steam. @sSteamCmdForcePlatformType "windows"
  4. Using SteamCMD download the game, app_update 6020.

Extract the contents of the file into the Jedi Academy GameData/ folder. For Steam users, this will be in <Steam Folder>/steamapps/common/Jedi Academy/GameData/.

macOS Instructions

If you have the Mac App Store Version of Jedi Academy, follow these steps to get OpenJK runnning under macOS:

  1. Install Homebrew if you don't have it.
  2. Open the Terminal app, and enter the command brew install sdl2.
  3. Extract the contents of the OpenJK DMG into the game directory /Applications/Star Wars Jedi Knight: Jedi Academy.app/Contents/
  4. Run OpenJK.app or OpenJK SP.app
  5. Savegames, Config Files and Log Files are stored in /Users/$USER/Library/Application Support/OpenJK/

For Developers

Building OpenJK

Contributing to OpenJK

  • Fork the project on GitHub
  • Create a new branch and make your changes
  • Send a pull request to upstream (JACoders/OpenJK)

Using OpenJK as a base for a new mod

  • Fork the project on GitHub
  • Change the GAMEVERSION define in codemp/game/g_local.h from "OpenJK" to your project name
  • If you make a nice change, please consider back-porting to upstream via pull request as described above. This is so everyone benefits without having to reinvent the wheel for every project.

Maintainers (full list: @JACoders)

Leads:

Significant contributors (full list)

openjk's People

Contributors

ensiform avatar xycaleth avatar razish avatar eezstreet avatar somaz avatar redsaurus avatar mrwonko avatar bibendovsky avatar smcv avatar bszili avatar dionrhys avatar daggolin avatar imperatorprime avatar zturtleman avatar deepy avatar madebr avatar monsterovich avatar klusark avatar alexandreblin avatar archangel35757 avatar exec64 avatar ahmedtd avatar lrns123 avatar yberion avatar taysta avatar xscooper avatar ouned avatar aufau avatar devnexen avatar svoboa avatar

Stargazers

 avatar Luka Klacar avatar Martin Schwan avatar Phanjam avatar Kirill Kabanov avatar  avatar  avatar DT avatar Alex avatar

Watchers

James Cloos avatar DT avatar  avatar

openjk's Issues

Cubemap loading

  • Add .hdr file export
  • Make sure cubemaps have unique names
  • Add cubemap exporting command (potentially use equirectangular images for storing)
  • Add loading of cached cubemaps

PBR IBL

implement ILB

  • convolute cubemaps
  • put in lightall
  • cleanup
  • DGF term to LUT (Look up texture)

rend2

Windows 11 KB5033375

movie battle moment

Launch game with rend2, join server, GPU freeze > GPU driver crash
not the above

I have 2 AMD bug report zip files I can discord DM but won't post publicly.

MD3's do not animate - misc_model_breakable

Operating system and version:

Windows 7 64bit

Description of the bug (and if possible, steps to reproduce the bug):

They just stay at 1 frame forever. They animate when using the GL1/vanilla renderer and jasp, but not GL2.

What did you expect to happen instead?

MD3's to animate.

shader definitions

  • Add some definitions for roughness shininess smoothness and gloss to the specularmap definition in the old shaders
  • remove cvar r_glossType

rend2 crashlog

Windows 10 Home
Version: 22H2
OS build: 19045.4046

Specs:
i7-13700k
32GB DDR5 6000 MHz
RTX 3070 Ti
Graphics Driver version: 551.23

Game crash when first loading in while using rend2 in Movie Battles 2 (multiplayer)
Also weird flickering when first loading in as well
Happened consistently every time on that beta version of the game, rend2 was unusable

Included a video but it's compressed to fit here so idk how well you'll be able to see the flickering

vlc-record-2024-02-21-15h28m01s-Desktop.2024.02.21.-.15.26.37.08.DVR.mp4-.1.mp4

crash_log_2024-02-21_15-22-17.log

add real time light editor

-> place misc_dlights in radiant

-> fire up the game

-> r_editMiscDLights 1 (???)

-> in the upper corner of the screen some variables appear (some get_closest_misc_dlight function is needed)

-> r_setColorCurrentLight 1 1 1 25 (not sure if this works, maybe with quotes)

-> engine shows edited misc_dlight

-> some save function would be nice

Sprites

Add missing sprite types and make wind affect them.

Flares

  • Create visibility buffer image
  • Create visibility fbo
  • Create pipeline to render visibility to that fbo
  • Use the visibility buffer for rendering flares

Crash when loading hdr lightmaps

It's quite weird. I get this crash when loading my baked lighting on laptop. It doesn't happen on desktop PC (why??) and doesn't happen on laptop with lighting baked by SomaZ (for t1_rail). The crash happens when it tries to load non-existing sky texture, but I didn't dig deeper. Anyway, solution is quite simple.

R_FindImageFile function in tr_image.cpp tries to load HDR image and then checks if it succeed by testing output buffer:

		R_LoadHDRImage(filename, &pic, &width, &height);
		if (pic == NULL)
			...

The problem is, R_LoadHDRImage doesn't reset buffer to NULL if it failed.
So, in shared/rd-rend2/tr_image_stb.cpp need to add three lines:

// Loads a HDR image from file.
void R_LoadHDRImage( const char *filename, byte **data, int *width, int *height )
{
	byte *buf = NULL;
	int x, y, n;

	int len = ri.FS_ReadFile (filename, (void **)&buf);
	if ( len <= 0 || buf == NULL )
	{
		// reset output varialbes
		*data = NULL;
		*width = 0;
		*height = 0;

		return;
	}
	...

Cubemap parallax correction

The current implementation uses a crude sphere approximation for the parallax correction of reflections. I want to extend the system to use convex shapes for the parallax correction. We need a gpu buffer to store the parallax planes then. Will probably use a TBO for this.

Ideally we would also limit surfaces to only use cubemaps in their view. We could easily use the PVS to do that.

MD3 tangent space missmatch when not Frame 0

Currently, when there's another frame rendered than frame 0 of a md3, the code falls back to the dynamic vbo/ibo path. This doesn't use mikkts, which results in weird normals popping on looping vertex animations.

  • Add frames data to static vbo
  • Make sure tangent space is consitent (all mikkts)
  • Add frame vertex shift
  • Fix remaining issues with gpu vertex interpolation

Weather

Complete weather code to use wind and add missing functions.

Lightstyles are broken

Surfaces that use Lightstyles (multiple Lightmaps) don't use shaders properly. Actually they completely ignore them. This results in not using normal/parallax mapping nor specular mapping.

go deferred

Change the rendering from forward rendering to deffered rendering. This results in a massive rewrite of the renderer. Xyc started to go deferred some time ago, this is a good point to start from.

Error when hit 3PO in torso by saber

It happens, because 3PO model has no "Motion" bone. Should use function similar to SP-vanilla renderer.

rend2-unified-wip/code/rd-rend2/G2_API.cpp

qboolean G2API_SetNewOrigin(CGhoul2Info* ghlInfo, const int boltIndex)
{
	if (G2_SetupModelPointers(ghlInfo))
	{
		/*
		if (boltIndex < 0)
		{
			char modelName[MAX_QPATH];
			if (ghlInfo->currentModel && ghlInfo->currentModel->name[0])
			{
				strcpy(modelName, ghlInfo->currentModel->name);
			}
			else
			{
				strcpy(modelName, "[Unknown - unexpected]");
			}

			Com_Error(ERR_DROP, "Bad boltindex (%i) trying to SetNewOrigin (naughty naughty!)\nModel %s\n", boltIndex, modelName);
		}
		*/

		// log instead of warning message on screen, like in SP-vanilla renderer
		G2ERROR(boltIndex >= 0 && boltIndex < (int)ghlInfo->mBltlist.size(), "invalid boltIndex");
		
		// check for valid boltIndex before applying new origin
		if (boltIndex >= 0 && boltIndex < (int)ghlInfo->mBltlist.size())
		{
			ghlInfo->mNewOrigin = boltIndex;
			ghlInfo->mFlags |= GHOUL2_NEWORIGIN;
		}
		return qtrue;
	}
	return qfalse;
}

Fog volumes

I applied a worldspawn fog which in SP defaults to r_drawfog 2 (gl fog) and in MP rend2 seems to use a different technique, however the fogged surfaces seem to not properly apply also the in fog volume check fails: https://www.youtube.com/watch?v=vtzdRw8DkYo

Glow textures disappear when using force push/pull

Test it out on 07yun_gl2. Glow light textures disappear when using force push/pull, but come back after the refraction effect is finished.

I don't know much about this stuff, but could refraction & glow be sorted in a way where only one of them can be rendered at a time?

Refraction

Write rg16 buffer with refraction transforms, apply as posteffect.

Add additional deluxemap loading

Vanilla JKA has a hardcoded maximum of 256 lightmaps per map. Deluxemaps are usually put into the lightmap lump, which doubles the number of lightmaps. If you compile a map with more than 128 lightmaps with deluxemaps, the map is not compatible with the vanilla renderer anymore because of the hardcoded limit.

To solve this issue, we can externalize deluxemaps and load them next to the internal lightmaps. Additional deluxemaps will be stored where external lightmaps are usually stored: "/maps/map_name/dm_XXXX"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.