phantasmal-world
phantasmal-world copied to clipboard
A suite of tools for Phantasy Star Online.
Phantasmal World
Phantasmal World is a collection of software for Phantasy Star Online. The web application has a model viewer, quest editor and hunt optimizer. There is also a work-in-progress PSO server.
Developers
Phantasmal World is written in Kotlin and uses the Gradle build tool. Much of the code is multiplatform and reusable as a library.
Features and Bugs
See features for a list of features, planned features and bugs.
Getting Started
- Install Java 11+ (GraalVM is recommended, and necessary if you want to produce native builds of the PSO server)
- Ensure the JAVA_HOME environment variable is set to JDK's location
Then, for the web application:
-
cd
to the project directory - Launch webpack server on http://localhost:1623/
with
./gradlew :web:run --continuous
- web/src/main/kotlin/world/phantasmal/web/Main.kt is the application's entry point
For the PSO server:
-
cd
to the project directory - Start the server with
./gradlew :psoserv:run
- psoserv/src/main/kotlin/world/phantasmal/psoserv/Main.kt is the server's entry point
IntelliJ IDEA is recommended for development. IntelliJ setup:
- Use Ctrl-Alt-Shift-S to open the Project Structure window and select a JDK (you can let IntelliJ download a JDK if you don't have a compatible one installed)
- Configure the Gradle run task for the web application:
- In the Gradle window, right click web -> Tasks -> other -> run
- Click "Modify Run Configuration..."
- Add
--continuous
to the arguments field - Click OK
- You can now start the webpack server from the main toolbar
Exploring the Code Base
The code base is divided up into the following gradle subprojects.
core
Core contains the basic utilities that all other subprojects directly or indirectly depend on.
psolib
Psolib contains PSO file format parsers, compression/decompression code, a PSO script assembler/disassembler and a work-in-progress script engine/VM. It also has a model of the PSO scripting bytecode and data flow analysis for it. This subproject can be used as a library in other projects.
cell
A full-fledged multiplatform implementation of the observer pattern.
test-utils
Test utilities used by the other subprojects.
web
The actual Phantasmal World web application.
webgui
Web GUI toolkit used by Phantasmal World.
psoserv
Work-in-progress PSO server and fully functional PSO proxy server.
Unit Tests
Run the unit tests with ./gradlew check
. JS tests are run with Karma and Mocha, JVM tests with
Junit 5. Tests can also be run per project with e.g. ./gradlew :psolib:check
.
Code Style and Formatting
The Kotlin coding conventions are used.
Production Builds
Web Application
Create an optimized production build with ./gradlew :web:browserDistribution
.
PSO Server
Create a native production build with ./gradlew :psoserv:nativeBuild
. Cross-compilation is not
possible, this command has to be run on each platform.