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.
Phantasmal World is written in Kotlin and uses the Gradle build tool. Much of the code is multiplatform and reusable as a library.
See features for a list of features, planned features and bugs.
- 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
The code base is divided up into the following gradle subprojects.
Core contains the basic utilities that all other subprojects directly or indirectly depend on.
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.
A full-fledged multiplatform implementation of the observer pattern.
Test utilities used by the other subprojects.
The actual Phantasmal World web application.
Web GUI toolkit used by Phantasmal World.
Work-in-progress PSO server and fully functional PSO proxy server.
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
.
The Kotlin coding conventions are used.
Create an optimized production build with ./gradlew :web:browserDistribution
.
Create a native production build with ./gradlew :psoserv:nativeBuild
. Cross-compilation is not
possible, this command has to be run on each platform.