Readit News logoReadit News
Posted by u/brunovcosta 2 months ago
Show HN: Server-rendered multiplayer games with Lua (no client code)cleoselene.com/...
Hey folks — here’s a small experiment I hacked together over the weekend:

https://cleoselene.com/

In short, it’s a way to build multiplayer games with no client-side game logic. Everything is rendered on the server, and the game itself is written as simple Lua scripts.

I built this to explore a few gamedev ideas I’ve been thinking about while working on Abstra: - Writing multiplayer games as if they were single-player (no client/server complexity) - Streaming game primitives instead of pixels, which should be much lighter - Server-side rendering makes cheating basically impossible - Game secrets never leave the server

This isn’t meant to be a commercial project — it’s just for fun and experimentation for now.

If you want to try it out, grab a few friends and play here: https://cleoselene.com/astro-maze/

kibbi · 2 months ago
Interesting approach! I've thought about a similar method after reading about the PLATO platform.

When playing astro‑maze, the delay is noticeable, and in a 2D action game such delays are especially apparent. Games that don’t rely on tight real‑time input might perform better. (I'm connecting from Europe, though.)

If you add support for drawing from images (such as spritesheets or tilesheets) in the future, and the client stores those images and sounds locally, the entire screen could be drawn from these assets, so no pixel data would need to be transferred, only commands like "draw tile 56 at position (x, y)."

(By the way, opening abstra.io in a German-language browser leads to https://www.abstra.io/deundefined which shows a 404 error.)

brunovcosta · 2 months ago
Yeah.. As people are playing and I'm watching their feedbacks it is becoming clear to me that the main source of input delay comes from the distance to the server.. the whole game is running in a single machine in SFO, so it makes total sense this bad exp in europe

I think this is inevitable unless I add some optimism/interpolation in the client

Also, thanks for the feedback! I will fix the Abstra landing page

try https://www.abstra.io/en instead

ModernMech · 2 months ago
You're running this at the airport?
fionic · 2 months ago
Cool! Besides the productizing or making a framework, I’m trying to understand if this is different than the elementary idea (which probably every game dev who worked on game networking has tinkered with) of sending inputs to the server and then sending player positions back to all the clients…? I think even smaller footprint would be position: two or three floats x,y(,z) instead of shapes too? Anyway this is always fine for very low latency environments where client side prediction, lag comp etc would not be required. Thanks for sharing, I might give it a try! sorry if I’m missing something.
brunovcosta · 2 months ago
You're correct

My approach lives in some place between video streaming and data streaming in terms of performance

It's not intended to be faster than a proper client that brings a lot of logic and information that diminish the amount of information required to be transfered

My proof of concept is more about: Can my dev exp be much better without relying on the video streaming approach? (which is havier)

ghxst · 2 months ago
IMO eliminating as much client side authority as possible is a very good foundation for MMOs where the latency is acceptable or factored into all aspects of the game (looking at old school runescape as an example). Very cool project!
brunovcosta · 2 months ago
Thank you!
Matheus28 · 2 months ago
Client-server multiplayer games are already kind of a very specialized type of video playback if you squint a bit (you're transmitting entities rather than pixels).

This method of multiplayer you propose is inferior in basically every way: you can't do client-side prediction to make inputs feel smoother, and non-trivial scenes will surely take up more bandwidth than just transmitting entity deltas.

Thaxll · 2 months ago
"Impossible to Cheat"

Let me tell you that there is cheating in cloud rendering solution ( Stadia, AWS Luna ect ... )

So 100% there is cheating in your solution.

It's trivial to read the screen.

brunovcosta · 2 months ago
You're right

Especially with today's computer vision

The cheating I'm more protected (just as stadia, etc..) is regarded to client/code exploitation

which we don't have to worry about in this approach

allthatineed · 2 months ago
BYOND/Space Station 13 is built upon this model.

Sprite sheets are png with ztxt blocks with meta/frame info and a list of drawing operations to be done to construct vsprites based on any runtime server side operations done on the sprites.

There is limited client coding via popup Web view windows and a few js apis back to the client but nothing you can build too much off of.

(SS14 brings this model to an open source c# framework called The Robust Engine but has some limitations related to maintainer power tripping over who should be allowed to use their open source project.)

brunovcosta · 2 months ago
Amazing! Never heard of this byond/ss13/14

Thank you for the reference!

aetherspawn · 2 months ago
The latency is a little intense from Australia … but surprisingly not as bad as I thought it would be.

It was playable.

I wonder if you can use speculative execution to play the game a few frames ahead and then the client picks what to display based on user input, or something like that.

Each frame is 16ms, so you’d have to work ahead 6 frames to conquer the nominal latency of around 100ms, which may actually be 200ms round trip.

(In that case, something like Haskell would be a good candidate to build a DSL to build the decision tree to send to the JS client…)

lurkshark · 2 months ago
What you’re describing is called “rollback netcode”. It’s a pretty cool chunk of theory, usually used for fighting games which are extremely sensitive to latency. This explainer has some nice graphic demos

https://bymuno.com/post/rollback

dustbunny · 2 months ago
It's a common misconception that this is only used in fighting games. This technique was developed first in Duke Nukem, and then exploited heavily by Carmack in Quake, and subsequently refined and built upon in other AAA FPS games, specifically for the local player movement and shooting.
aetherspawn · 2 months ago
This is awesome and exactly what it needs, but good luck creating a language that’s “signal driven” enough to encode it and then send all the possible states to the client.

If you were able to make it, it would be kind of a Hail Mary moment for making easy server games without the latency.

Neywiny · 2 months ago
It could help visually but you'll still have 200ms between you and your next door neighbor's actions
modinfo · 2 months ago
Im just vibe-coded a multiplayer game with deterministic terrain world generation with Cleoselene in 5min.

https://github.com/skorotkiewicz/proximity-explorer

brunovcosta · 2 months ago
That's AMAZING!

I will definitively follow that!

efilife · 2 months ago
Was it really 5 min or more like 30?