Skip to content

mikomikotaishi/openJuice

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

openJuice

Overview:

🍊 Open-source re-engineering of the game 100% Orange Juice!, written as a love letter to the original game. This does not aim to be a one-to-one recreation of the game but rather a port of the game as a TUI program.

This project is written independently for fun and as a learning project, and not written for the purposes of piracy. The author(s) encourage the user to support the original developers. No code has been obtained through decompiling, disassembling, or reverse-engineering the original program. Everything in this project, except for external dependencies and original assets from the game (such as text and audio) were developed independently.

Tested for Linux. Windows and MacOS support untested.

WARNING: This program uses a heavily modified version of the standard library, with several symbols renamed or put in different namespaces.

GPLv3

Build:

Requires C++23, and a build system such as CMake (minimum version 3.30) or XMake. The program has its own bindings for the standard library.

Note: please compile with Clang for now (as it looks like GCC still has problems compiling modules).

CMake

Info: Requires CMake β‰₯3.30 and the Ninja build system. Makefiles generated by CMake currently do not support modules.

Any way of calling CMake is fine.

The simplest way to build the project is:

# Sets source directory to current directory, build directory to ./build/, and generates Ninja build system files
cmake -S . -B build -G Ninja

# Begins building the project using the build files found in ./build/
cmake --build build

# Execute the program!
./openJuice 

We have also written a Python script to simplify using CMake, which can be run with ./quick_cmake_build.py. (Simply execute the script quick_cmake_build.py to compile the program with CMake.) If JBang is installed, QuickCMakeBuild.java can also be executed as a script. A file QuickCMakeBuild.d also exists but is experimental and untested.

quick_cmake_build.py help:

usage: quick_cmake_build.py [-h] [-r] [-c | -ca | -n | -pd | -rc] [-g] [-s SANITISER [SANITISER ...]] [-v]

Build script for openJuice project.

options:
  -h, --help            show this help message and exit
  -r, --release         Build in release mode (optimised, no sanitisers, NDEBUG defined)
  -c, --clean           Clean only project source files (no building)
  -ca, --clean-all      Clean entire project, including dependencies (no building)
  -n, --new             Cleans the build directory and rebuilds everything, including dependencies (mandatory for first build)
  -pd, --preserve-deps  Cleans the build directory and rebuilds everything (excluding dependencies)
  -rc, --reconfigure    Reconfigure CMake build system (for when new files are added)
  -g, --graph           Generate dependency graph
  -s, --sanitiser, --sanitizer SANITISER [SANITISER ...]
                        Enable sanitisers (address, undefined, thread, memory, leak, all)
  -v, --verbose         Enable verbose output (lacks progress bar or other graphical features)

QuickCMakeBuild.java help:

Usage: QuickCMakeBuild [-ghrvV] [-s=<sanitisers>]... [-c | -ca | -n | -pd | -rc]
Build script for openJuice project
  -c, --clean                Clean only project source files (no building)
      -ca, --clean-all       Clean entire project, including dependencies (no
                               building)
  -g, --graph                Generate dependency graph
  -h, --help                 Show this help message and exit.
  -n, --new                  Cleans the build directory and rebuilds
                               everything, including dependencies (mandatory
                               for first build)
      -pd, --preserve-deps   Cleans the build directory and rebuilds everything
                               (excluding dependencies)
  -r, --release              Build in release mode (optimised, no sanitisers,
                               NDEBUG defined)
      -rc, --reconfigure     Reconfigure CMake build system (for when new files
                               are added)
  -s, --sanitiser, --sanitizer=<sanitisers>
                             Enable sanitisers (address, undefined, thread,
                               memory, leak)
  -v, --verbose              Enable verbose output (lacks progress bar or other
                               graphical features)
  -V, --version              Print version information and exit.

XMake

Warning: Building the project with XMake is currently not working. Please use CMake instead. Currently XMake is not downloading and compiling the dependencies correctly.

To build the project using XMake, do the following:

# Generate the compile_commands.json file
xmake project -k compile_commands

# Build the project
xmake

# Execute the program!
xmake run

Usage:

To be written.

TODO:

  • Migrate to standard library modules (once released for GCC 15)
    • Currently using homemade standard library modules, no plans to revert to official standard library modules.
    • Once official standard library modules release, plans are to use them for homemade standard library modules to increase compilation speed.
  • Resolve all #warning markers, if possible
  • Complete design document
  • Continue documentation (Doxygen)
  • Implement online multiplayer functionality
  • Implement a game AI

Dependencies

This project uses the following external libraries:

To generate the graph, the program module-graph-tool is used.

About

🍊 Open-source terminal recreation of 100% Orange Juice

Topics

Resources

License

GPL-3.0, Unknown licenses found

Licenses found

GPL-3.0
LICENSE
Unknown
LICENCE.md

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published