Skip to content

samanthaci/stormstack

Repository files navigation

Stormstack (formerly Lightning Engine)

Status Java License

What is this?

StormStack is a Java-based authoritative multiplayer game server platform. It enables hot-deployment of untrusted game logic at runtime, using JVM ClassLoader isolation and JWT-scoped ECS access to safely run multiple matches on shared infrastructure.

I built StormStack to explore modular and secure backend architecture within a game dev context.

How It Works

  1. Write game modules - Implement interfaces and build JAR files containing your backend game logic (ECS components, systems, commands)
  2. Install module in cluster - Upload modules to the control plane and distribute to engine nodes

First upload

$ lightning module upload MyGameModule 1.0.0 ./target/my-module.jar
✓ Module MyModule@1.0.0 uploaded successfully

Then distribute

$ lightning module distribute MyModule 1.0.0
✓ Module MyGameModule@1.0.0 distributed to 3 nodes
  1. Deploy matches
$ lightning deploy --modules EntityModule,RigidBodyModule,RenderingModule

# Output:
✓ Match deployed successfully!
    Match ID:     node-1-42-1
    Node:         node-1
    Container:    42
    Status:       RUNNING
 
  Endpoints:
    HTTP:         http://backend:8080/api/containers/42
    WebSocket:    ws://backend:8080/ws/containers/42/matches/1/snapshots
    Commands:     ws://backend:8080/ws/containers/42/matches/1/commands
  1. Stream game state - Clients receive real-time ECS snapshots via WebSocket.
[CMD] lightning snapshot get -o json
[INFO] {
  "matchId": 1,
  "tick": 129,
  "modules": [
    {
      "name": "EntityModule",
      "version": "1.0",
      "components": [
        {
          "name": "ENTITY_ID",
          "values": [
            1,
            2,
            3,... ]
        }
      ]
    }
  ]
}

Want to learn more?

License

MIT — Use this however you want (just not for evil tho)

About

StormStack is a Java-based authoritative multiplayer game server platform. It enables hot-deployment of untrusted game logic at runtime, using JVM ClassLoader isolation and JWT-scoped ECS access to safely run multiple matches on shared infrastructure.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors