MMO Kotlin fullstack development. Server is done using Ktor and client is done using Korge,
and both communicate by serializing using kotlinx.serialization,
use kotlin scripting for some NPCs, and optionally Redis for storage if available or REDIST_HOST
env var set.
Blogs: Artist blog, Programmer Blog
- Execute
./gradlew runAll
- Open http://127.0.0.1:8080 with your favourite browser supporting WebGL
Note: if it fails, try again since kotlinx.serialization is experimental.
- Genreate fatjar + Compile JS and run the backend serving the client:
./gradlew copyFatJarAndRunAll
- Run the backend only (JVM):
./gradlew :mmo-jvm:runServer
- Run the frontend only (JVM):
./gradlew :mmo-jvm:runClient
- Run the frontend only (JS):
./gradlew :mmo-js:buildAndCopy
NPCs and server scripts are defined using Kotlin coroutines. Check an example of NPC here: Princess.kt
Frontend is done using Korge and can run in JS or JVM.
Connection happens using websockets, and messages/packets are converted to JSON and back using kotlinx.serialization.
- Use Ktor in a production environment
- Play with Kotlin multiplatform projects before it is released
- Experiment with kotlinx.serialization
- Evolve and use in production Korge game engine
- Experimenting with PWA for games that work everywhere
- A graphic playground for experimentation