
Security News
Astral Launches pyx: A Python-Native Package Registry
Astral unveils pyx, a Python-native package registry in beta, designed to speed installs, enhance security, and integrate deeply with uv.
The Mooncell is a Domain-Driven Design online game server framework inspired by Hanami.rb.
An online game usually includes one or more servers but it is hard to share the codebase and support multiple protocols.
Mooncell split game logic to libs
and allow shared with other projects, and allow the developer to implement behaviors inside apps
between servers.
Currently, Mooncell still under design. Below is the core concept to implement servers with it.
This is a Map server implements a move command.
├── Gemfile
├── Gemfile.lock
├── apps
│ └── map
│ ├── application.rb
│ ├── commands
│ │ └── move.rb
│ ├── config
│ │ └── routes.rb
│ └── responds
│ └── move.rb
└── config
└── environment.rb
It defines the shared environment and servers to loaded.
# frozen_string_literal: true
require 'mooncell/protocol/websocket'
require_relative '../apps/map/application'
Mooncell.configure do
protocol :websocket
app Map::Application
end
It defines the command available on the server.
# frozen_string_literal: true
command 'move', 'Map::Commands::Move'
Process the command received from the client.
# frozen_string_literal: true
module Map
module Commands
class Move
include Mooncell::Command
# Fake Model
Player = Struct.new(:id, :x, :y)
# Expose to respond
expose :player
def call(params)
@player = Player.new(params['id'], params['x'], params['y'])
end
end
end
end
Return the process result to client.
# frozen_string_literal: true
module Map
module Responds
class Move
include Mooncell::Respond
# Broadcast to all clients
broadcast true
def call(*)
{ id: player.id, x: player.x, y: player.y }
end
end
end
end
TODO
TODO
TODO
The first target is to design the architecture to support TCP/WebSocket protocol and allow use JSON or customize serializer.
TBD
Bug reports and pull requests are welcome on GitHub at https://github.com/elct9620/mooncell. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.
Everyone interacting in the Mooncell project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.
FAQs
Unknown package
We found that mooncell demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Astral unveils pyx, a Python-native package registry in beta, designed to speed installs, enhance security, and integrate deeply with uv.
Security News
The Latio podcast explores how static and runtime reachability help teams prioritize exploitable vulnerabilities and streamline AppSec workflows.
Security News
The latest Opengrep releases add Apex scanning, precision rule tuning, and performance gains for open source static code analysis.