Git Product home page Git Product logo

jake2's Introduction

Jake2 README

jake2 screenshot

Screenshots

Jake2 is a port of the GPL'd Quake2 engine from id Software to Java. Jake2 is distributed under the terms of the GPL (see LICENSE).

The port is implemented in Java, but some native libraries (LWJGL) are used for the visual rendering, input processing and audio playback (OpenAL) functionality.

Jake2 is still under development. Feel free to send bug report if you find one.

Currently, Jake2 supports every Java supported platform.

Requirements:

  • jdk version 11 to build and run Jake2

Please note that there is an issue with more recent java versions (17) on linux with lwjgl natives.

Documentation & Info

What is Cake? Important note about client side code

Jake2 client in its vanilla form is archived in jake2-legacy branch and will not be maintained. Even though one of the core ideas of this project was to reuse and improve (rather than reimplement from scratch) - the client side code was particularly hard to maintain and develop. Firstly, because it is written on top of the unmaintained and obsolete second LWJGL version, which is incompatible with the current LWJGL version. Secondly, jake2 rendering is implemented in OpenGL immediate mode and had to be rewritten on a modern shader pipeline anyway. And lastly, there is a libGDX framework that can provide a lot of useful functionality, and ditch a lot of code (yes, Menu.java, I am looking at you)

The client and fullgame modules are excluded from the build. The new cake module is introduced for the client side part (WIP).

TODO: update readme

Installation and running

from binary distribution:

  • unzip the distribution(jake2-some_version.zip)
  • go to bin folder
  • run ./fullgame (or fullgame.bat on windows)

build from source:

  • run gradle run to build from source and run jake2
  • run gradle distZip to build the distribution

If you don't have a gradle distribution you can use gradle wrapper, like ./gradlew run.

If you run jake from an IDE:

  1. add dependency to gradle installDist task before launch
  2. add -Djava.library.path VM option to point to the location of native libs (they are copied to the fullgame/build/install/fullgame after the task mentioned above)

Installation of Quake2 data:

Jake can autodetect steam installation. If it doesn't (when you have a non-steam version or when you install it to a custom location) pass basedir parameter to the game

+set basedir "/home/demoth/.local/share/Steam/steamapps/common/Quake 2"

If you want to have the latest experimental features you can grab the latest Jake2 sources from GIT.

Compatibility

Jake2 is not compatible with the mods that have custom logic (game.dll).

Jake2 is network compatible with other clients, like Yamagi, Q2pro etc.

Jake2 is compatible with all map/models/sounds/textures as id Quake 2.

Goals of the project

While Jake2 is a hobby project it is important to keep at least high level goals in mind:

  1. Maintain project runnable on modern machines and operating systems
  2. Bring the codebase up to contemporary expectations.
  3. Expand features of jake2 to bring more fun playing/modding it

At the moment of writing the goal N1 is achieved and goad N2 is in progress.

Roadmap

With accordance to the goals we can put a list of more concrete steps:

  • gather game state in classes. at the moment state of the process is scattered across many static fields.
  • code cleanup - move to modern libraries (filesystem, network, logging)
  • file formats - support modern file formats (zip, image, audio, video, models?)
  • support "brother projets" content: q2 mission packs, q1? q3? hl?
  • replace q2 ui code (not 3d) with a library (i.e. nifty-gui)

Crazy ideas area (proceed with caution):

  • add script support: graalvm support many scripting jvm languages, with little overhead. implement monster, items behavior with scripts
  • change 3d rendering code to something more recent (like yq2 gl3, q2xp?...)
  • implement mmo-like replayable campaign for q2: npc, quests, character progression, item & monster randomization, trading
  • jake2 game engine suit (unreal like): full set of tools to support game development and creation of new games. 3d editor, entitity editor, scripting, and so on
  • procedural map generation
  • utilize kotlin multiplatform support and create jake2 clients for various platforms (desktop, web, android, ios)

3rd party components

Jake2 uses: lwjgl Light Weight Java Game Library http://www.lwjgl.org openal Audio library http://www.openal.org

Use github issue tracker for bug reports and feedback.

have fun!

Authors

Daniil Bubnov [email protected] - current maintainer (2019+)

bytonic Software

Developed the project in 2003 - 2015

Contributors

  • David Sanders - lwjgl support
  • Kenneth Russell (Sun Microsystems) - jogl improvements
  • Scott Franzyshen - 3rd Person Camera, CD Player emulation (MP3), Console Patch

jake2's People

Contributors

cwei avatar demoth avatar denolia avatar hoz avatar kenrussell avatar samoylovfp avatar zackidalli avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

jake2's Issues

MacOS, openJDK 13, couldn't exec default.cfg, did not execute cmd bind MWHEELUP weapnext

My setup:

^Cbash-3.2$ gradle -v

------------------------------------------------------------
Gradle 6.4
------------------------------------------------------------

Build time:   2020-05-05 19:18:55 UTC
Revision:     42f7c3d0c3066b7b38bd0726760d4881e86fd19f

JVM:          13.0.2 (Oracle Corporation 13.0.2+8)
OS:           Mac OS X 10.15.3 x86_64

The output:

couldn't exec default.cfg
did not execute cmd bind MWHEELUP weapnextdid not execute cmd bind MWHEELDOWN weapprevdid not execute cmd bind w +forwarddid not execute cmd bind s +backdid not execute cmd bind a +moveleftdid not execute cmd bind d +moverightcouldn't exec config.cfg
couldn't exec default.cfg
did not execute cmd bind MWHEELUP weapnextdid not execute cmd bind MWHEELDOWN weapprevdid not execute cmd bind w +forwarddid not execute cmd bind s +backdid not execute cmd bind a +moveleftdid not execute cmd bind d +moverightcouldn't exec config.cfg
did not execute cmd dedicated_start====== Quake2 Initialized ======

Supertank does not explode after death

For some reason super tank does not call M_Supertank.BossExplode think function at the end of death frame mmove.
here jake2.game.M#M_MoveFrame if monster has a flag Defines.SVF_DEADMONSTER (which it does by the time end frame is reached) neither ai nor think functions are not called

Split mod (game) logic into pluggable minimods

Quake 2 mods are developed and distributed as one big chunk of logic, combining monster/weapon/item/coop/deathmatch rules, etc..

There are however many parts of the mod that don't interact with each other (like monster logic and weapon logic) and therefore could be isolated. Both code and resources.

This is just and idea and need more refinement

Rework monster animation code

Move the enormous descriptions of the animation from the source code (for example in M_Soldier.java) into a resource file. For example json?

Upd. 2024: After reviewing of what is done and what is still achievable, it makes sense now to settle on what is already implemented in the scope of the animation rework and if necessary improve later.

The biggest understanding now is that the decision making solution (which was previously tied to the animation and monster logic) can be done outside of the initial scope of this task (moved to Rework monster decision code #109).

New approach:
Animation is controlled with the state machine. Each state is an animation sequence which can either loop or transition to another state. The transition rules govern which transitions are allowed. The character can interact with the game world (or with itself) via events, which are emitted in certain frames (for example sounds and firing projectiles).
An excerpt from the new animation definition:

        AnimationSequence(
            name = "fidget",
            type = StateType.IDLE,
            frames = (1..49).toList(),
            events = mapOf(0 to "sound-fidget"),
            loop = false,
            nextState = "stand"
        ),
        AnimationSequence(
            name="pain",
            type = StateType.PAIN,
            frames = (100..109).toList(),
            events = mapOf(1 to "sound-pain"),
            loop = false,
            nextState = "stand"
        ),

Support mods

Mods (without game.dll) should be supported via +game command

Split edict into compoments

The edict_t class is a junkyard of different fields used for different scenarios. Split into different components (not a full ECS)

Profile jake2

Run the game though a profiler and see what functionality is taking most cpu time, memory ets.
Do both for server and client

Create thin client

create a application wrapper around client module (without game or server modules) that can connect to other servers

Add documentation to each module

What to highlight:

  • each module - add readme with high level description of functionality
  • quake file formats
  • network communication
  • game/server interface

Type safe cvars

Implement type safe cvars (enum, bool, string, int, float) to avoid unnecessary casting and potential bugs

  • description

Try GraalVM

Run jake2 on graalvm to check performance improvement.
Try AOT compilation

Move to nifty-gui

Replace existing ui code (the biggest class in project) with nifty-gui library

Get rid of linked lists

Linked lists are all over the place (look for next member of the same type)
For objects that have a unique id move to hashmap, and arraylists for everything else

Create classes for network commands [Server] [Part1]

now network commands are constructed and parsed piece by piece on both sides
jake2.qcommon.network.NetworkCommands
create classes that can be serialized/deserialized easily from bytestream

without svc_spawnbaseline and svc_packetentities

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.