Git Product home page Git Product logo

mmo-poc's Introduction

mmo-poc

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

QuickStart

  1. Execute ./gradlew runAll
  2. Open http://127.0.0.1:8080 with your favourite browser supporting WebGL

Note: if it fails, try again since kotlinx.serialization is experimental.

Some commands

  • 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

Technical details

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.

Objectives

  • 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

mmo-poc's People

Contributors

soywiz avatar tamygm21 avatar

Watchers

James Cloos avatar Avra Neel avatar

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.