frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

Open in hackernews

Show HN: Easel – Code multiplayer games like singleplayer

https://easel.games/about
75•BSTRhino•1d ago
For the past 3 years, I've been creating a new 2D game programming language where the multiplayer is completely automatic. The idea is that someone who doesn't even know what a "remote procedure call" is can make a multiplayer game by just setting `maxHumanPlayers=5` and it "just works". The trick is the whole game simulation, including all the concurrent threads, can be executed deterministically and snapshotted for rollback netcode.

Normally when coding multiplayer you have to worry about following "the rules of multiplayer" like avoiding non-determinism, or not modifying entities your client has no authority over, but all that is just way too hard for someone who just wants to get straight into making games. So my idea was that if we put multiplayer into the fabric of the programming language, below all of your code, we can make the entire language multiplayer-safe. In Easel the entire world is hermetically sealed - there is nothing you can do to break multiplayer, which means it suits someone who just wants to make games and not learn all about networking. I've had people make multiplayer games on their first day of coding with Easel because you basically cannot go wrong.

There were so many other interesting things that went into this project. It's written in Rust and compiled to WebAssembly because I think that the zero-download nature of the web is a better way of getting many people together into multiplayer games. The networking is done by relaying peer-to-peer connections through Cloudflare Calls, which means Cloudflare collates the messages and reduces the bandwidth requirements for the clients so games can have more players.

I also took inspiration from my experience React when creating this language, here's how you would make a ship change color from green to red as it loses health:

`with Health { ImageSprite(@ship.svg, color=(Health / MaxHealth).BlendHue(#ff6600, #66ff00)) }`

There is a lot of hidden magic that makes the code snippet above work - it creates a async coroutine that loops each time Health sends a signal, and the ImageSprite has an implicit ID assigned by the compiler so it knows which one to update each time around the loop. All of this lets you work at a higher level of abstraction and, in my opinion, make code that is easier to understand.

Speaking of async coroutines, my belief is that they don't get used enough in other game engines because their lifetimes are not tied to anything - you have this danger where they can outlive their entities and crash your game. In Easel each async task lives and dies with its entity, which is why we call them behaviors. Clear lifetime semantics makes it safe to use async tasks everywhere in Easel, which is why Easel games often consist of thousands of concurrently-executing behaviors. In my opinion, this untangles your code and makes it easier to understand.

That's just the beginning, there is even more to talk about, it has been a long journey these past 3 years, but I will stop there for now! I hope that, even for those people who don't care about the multiplayer capabilities of Easel, they just find it an interesting proposal of how a next-generation game programming language could work.

The Editor runs in your web browser and is free to play around with, so I would love to see more people try out making some games! Click the "Try it out" button to open the Sample Project and see if you can change the code to achieve the suggested tasks listed in the README.

Comments

traverseda•8h ago
If I created a game in this, what gurantee do I have that someone will be able to play this game in 100 years?
actionfromafar•8h ago
I think a chess board is more what you are looking for. :)

But seriously, it wouldn't hurt to have some kind of escrow service for products like this.

traverseda•8h ago
No, like 90% of video games could in theory be played 100 years from now.

If you can't answer that question, why should I trust your for 3 years? Or 10?

Here's a list of lost video games. Hard to prove it's complete of course. https://lostmediawiki.com/Category:Lost_video_games

ChadNauseam•7h ago
FYI, the person you're replying to is not OP. Their answer is here: https://news.ycombinator.com/item?id=44000198
BSTRhino•8h ago
Yes, I think it is super important that Easel games last forever and that has always been the plan. My long term plan is to create a standalone version of Easel that you can run on your server forever, regardless of what happens to Easel itself.

I'm not yet sure of the details of how an escrow service might work, but honestly, I would be willing to look into it, that could be a good answer. I really do plan on Easel as a platform lasting forever. This is my life's work as much as it is yours.

traverseda•8h ago
Consider just releasing it under a BSL license forbidding commercial hosting? If that works with your business model.
TechDebtDevin•4h ago
I believe Github has tools built for leaving a successor in the event of the developers death thats relatively straight forwars.
BSTRhino•3h ago
It seems that Github's successor feature only allows your successor to re-assign ownership for your public repositories. I'm currently using a private repository so this sadly does not work for me. Otherwise I would grab this feature with both hands!
actionfromafar•8h ago
This is all very impressive and combines ideas I tinkered with in C on and off for years, into a cohesive product. Very impressive.
BSTRhino•8h ago
Oh thank you!
cmdrk•8h ago
How does this compare to something like BYOND? I realize it’s dated now but conceptually there are some similarities.
BSTRhino•8h ago
I hadn't heard of BYOND until just then. Sadly its website seems to be down, I would like to learn more about it.
traverseda•8h ago
Space station 13 was the big game for it.
asielen•1h ago
As a formally very active BYOND community member (joined 2003), BYOND's heyday was probably 15 years ago. Space Station 13 is its last vestige of relevance unfortunately. I've always wished for a new/updated equivalent version of it to crop up but nothing has really filled the same niche. It used to be a pretty vibrant community of (very) amateur game developers.

It seems it is going through a DDOS attack right now. https://www.reddit.com/r/BYOND/comments/1kl4bjs/byond_hub_do...

Some history of BYOND here: https://tig.fandom.com/wiki/BYOND

Basically it is a fully contained multi-user game development environment created by two friends, Dan and Tom around 2000. It has its own language, DM (DreamMaker), roughly based on C and Python. It has a map editor and server software. You would write a game and then host it and then anyone else who had the BYOND client software could connect to the server and run it. The server acted as the source of truth and the clients were effectively dumb clients just rendering. It had limitations (frankly a lot of limitations), but for the time it ran pretty damn well for reasonably sized 2d top down games. While you could publish your game to the BYOND site, you could also run it will no connection to the centralized BYOND hub.

The secret sauce was the combined game dev environment and how simple it made networking. You basically didn't have to think about any of it because the total game state was run by a server the you or someone else would host. The client just had to download the interface.

The development environment was bare bones but the language was so simple that it didn't really matter. Over simplifying but basically movable objects were of type "mob" and background tiles were of type "turf". Both inherited from "atom". You could also write like 5 lines of code defining 1 mob and 1 turf and walk around in your new world with others online. You could then add "verbs" basically functions that the mob could take and "procs" which are just all other functions you'd want to write.

You can read the language reference here on internet archive while the main site is down: https://web.archive.org/web/20200229044355/http://www.byond....

Some other links:

  - Forum entry from 2000 by one of the creators https://web.archive.org/web/20250325092124/http://www.byond.com/forum/post/194515
  - Getting started writing games post (formatting is all broken on this archived version but the text is there): https://web.archive.org/web/20190402034657/http://www.byond.com/forum/post/46230
  - Interesting crash course on everything from 2023: https://www.youtube.com/watch?v=TzAzMtWa0u0
  - Probably the biggest game that made it out of just cult following was NEStalgia: http://www.silkgames.com/nestalgia/
_--__--__•8h ago
I'm curious how your engine decides to trigger rollbacks without explicit knowledge of which parts of the game state each input can actually affect. Naively rolling back on every missed input can and will be abused - in early versions of Street Fighter V players found out that while being comboed you could churn out inputs as fast as possible to cause rollbacks for your opponent, even though none of those inputs could actually do anything (this was made worse by other issues with that game's inability to keep opponent game clocks synced and constant one-sided rollbacks).
BSTRhino•8h ago
Yes, it's true Easel does rollback on every input. I may be able to improve this. One great thing about controlling the programming language is there are a lot more places I can hook into for things like this. For example, Easel does detect at compile time which types inputs are used somewhere in the codebase and only sends those across the network.

Easel constantly synchronises the clocks (there's an interesting algorithm for this which I will write up at some point). It also adaptively assigns two different kinds of delay to every client - command delay and display delay. Command delay is related to how much lag you are introducing into the game. Basically people take on their own lag. It can be different amounts for different people in the game. The display delay is where the rollback netcode kicks in. It keeps track of how much rollback your computer can handle imperceptibly. If your computer can't handle it, then you won't get as much rollback (and will just experience more input latency). But in either case, whatever number it picks, it should be smooth.

oakwhiz•8h ago
I wonder if SAT solvers could prove the maximum "reach" of inputs into the state...
dustbunny•5h ago
Theres some missing information here. A "rollback that doesn't do anything" shouldn't be noticeable to the user. It would only be noticeable if the game simulation can't keep up with the # of frames it's being asked to simulate. And in street fighter, the simulation is ridiculously simple. There should be no reason why street fighter wouldn't be able to "rollback and resimulate" dozens if not hundreds of times per frame. There's no way that game is CPU bound... Am I missing something?
_--__--__•4h ago
I think you are underestimating the per frame computation cost or massively overestimating the base model PS4. Remember that all fighting games have to lock 60fps, 16ms is not a ton of time for the handoff from input interpreter (SF has to parse backwards over the past several frames to see if a forward input is completing a quarter circle, double quarter circle, dash, etc) > game state update tick > graphical and sfx update pipeline. The issue with clock syncing meant that the worse your machine was, the more your opponent would roll back and the bigger the rollback windows would be because every single frame of your inputs would come late.

Here's an example of the constant one sided rollback: https://www.youtube.com/watch?v=aSB_JlJK_Ks

and an example of how players were aware that mashing caused frequent rollbacks: https://youtu.be/_jpg-ZiE70c?t=105

Eventually PC players learned that they could "fix" this by alt-tabbing out of the game, taking away dedicated GPU processing so they could be the peer that was falling behind.

BSTRhino•3h ago
I can't really speak for Street Fighter V, but I can say that Easel would assign command delay to the person who is introducing it. So if a person is somehow forcing their inputs to arrive later than they should, they would be assigned more input latency so that the other players would be unaffected. Easel also has a lag spike protection system where the server will just forcibly reschedule inputs if they arrive really late for some reason.
_--__--__•3h ago
Yeah, most of these are relatively solved problems, but they are nontrivial enough that one of the industry giants couldn't get it right on its first few tries.
oakwhiz•8h ago
How do you handle hidden information, or "need to know"/"potentially visible set" style revelations to player clients?
BSTRhino•7h ago
Unfortunately, this is not compatible with the rollback netcode model. However, all the world state is stored in WASM linear memory and so it is not the most straightforward to decode.

The rollback netcode model is necessary to make the multiplayer invisible to the developer. The other client-server/state-synchronization approach which is used in other multiplayer games, while great in many ways, requires you to assign authorities to every entity and to send a remote procedure call when attempting to affect entities you do not control. Rollback netcode was the only way for me to achieve the primary mission.

I may look into supporting the client-server/state-synchronization multiplayer model in the future though, which would enable "need to know" style revelations. Given we already have a deterministic programming language it is not at all infeasible as a future project.

From my experience running a multiplayer game, I only had 1 in every 50000 players attempt to perform some kind of hack and it was faster and more reliable for me to shadow IP ban the players. That feature is built into Easel. There is also a replays system built-in which makes it easy for people to submit evidence of people hacking. This is the current pragmatic solution that I suggest.

dustbunny•5h ago
> requires you to assign authorities to every entity and to send a remote procedure call when attempting to affect entities you do not control.

You can consider every object to be server authoritative and then only send inputs from the client to the server. Other clients don't need to know about other client inputs. They only need to see state changes from the server. Clients functionally only have authority over their own input. This is a simple model of state synchronization that doesn't have the extra complexity of having authority over random objects. In this model, you only do a rollback if the server state differs from your predicted representation of the state. Besides, your game tick should be fast enough that you can rollback and resimulate every frame multiple times anyways.

rishflab•8h ago
Speaking of async coroutines, my belief is that they don't get used enough in other game engines because their lifetimes are not tied to anything - you have this danger where they can outlive their entities and crash your game.

Async coroutines in the way you are describing have terrible/unpredictable cache/memory access behaviour which leads to bad performance. Every time you switch coroutines you need load memory from (most likely) an unrelated region causing slowdowns.

BSTRhino•6h ago
Yes, I do get this. I made choices to prioritise an abstraction that, in my opinion, makes you more productive. It's not going to work for certain kinds of people or games.

One of my original motivations for creating Easel came from my experience playing (and making) webgames, which in general are coded in JavaScript (or TypeScript). I love webgames as a method of delivering multiplayer because the biggest problem is getting players, and I think the low-friction zero-download really helps with that. So this is the world I am trying to target. When I remade my old webgame in Easel, I found it to be many times more performant and am now able to target much lower spec devices. Not to mention, determinism is a non-issue now.

I get that some people are going to love Easel and some are going to hate it, and that's okay.

pfg_•7h ago
WASM-4 has a simiar multiplayer model. There's some things you still have to be careful with, like delaying screen transitions so you don't have a "you win" screen flash for a few frames when the other player didn't lose but their input hasn't gotten t o you yet.
reitzensteinm•6h ago
Yes. I've made a dozen games using rollback and it really is magical. I built a strategy game in three weeks and didn't test it in multiplayer until the weekend of release. It Just Worked.

But it's not a total silver bullet from a UX perspective when rollbacks happen.

Showing a player dying and then come back to life and actually you're dead will absolutely happen. It's very weird if they were ragdolling.

If players don't have high inertia, like a platformer, they'll teleport around the place as you get the information that actually they aren't falling they jumped 100ms ago.

This is all fixable, but requires first class confirmation (i.e has the player you shot been dead longer than the max rollback window), and hand tuned interpolation on critical entities.

Luckily, I'm sure it's possible to add them to this engine.

I'm curious as to why a custom programming language was designed if the system uses WASM anyway - which you can make deterministic.

I wrote my system in C# and it worked great if you Followed The Rules (eg you must use immutable data structures). But WASM would have been a big step up.

BSTRhino•6h ago
Great to meet another rollback fan! It sounds like you have had a lot of experience with it. I'm sure I can add those things which you have mentioned - that's why we're in the beta testing phase to figure out things like this!

Why did I make a custom programming language? Well, making multiplayer automatic was only half of my mission when creating Easel.

It's a bit of a long story but the modding tools for my previous game were surprisingly successful. It became the first experience of any form of coding for a lot of people. The tool used JSON, which might sound primitive, but actually if you look past the JSON what it was really doing was defining a hierarchical declarative language for behaviour. There's something magic about that shape which allowed first-time coders to tinker without much help or documentation. (I have many theories as to why, one of them is that the hierarchy eliminates a lot of indirection that you might see in normal game programming, which means you can just kind of look at it and figure it out without jumping around. Everything is direct and in-place.)

The thing that irked me for years was, the limitations of that modding language limited not just what could be made, but what people could learn. I kept wondering what would happen if people were presented with a programming language in the same shape, but with unlimited power. Could it lay down a path for non-coders to follow all the way until they became expert coders, almost accidentally? Easel is my attempt to marry that magical hierarchical-declarative style with imperative programming in order to make a powerful language that still is extremely accessible.

I hope that, the accessibility and power of the programming language, combined with its ability to make multiplayer games automatically, will make it a super engaging choice for a first programming language for many people. I would love to see it used in schools to teach programming.

reitzensteinm•6h ago
That makes sense to me!

Experienced developers are probably better off targeting WASM with Rust, but an easy on ramp to programming is definitely something that can justify a new language.

BSTRhino•6h ago
WASM-4 is great, I remember hearing about it when it was released. It is a similar model where it makes the multiplayer basically invisible to the programmer, which is cool :)
DigiEggz•6h ago
I exclusively make games that include online multiplayer, so this really caught my eye. Really looking forward to digging in.
BSTRhino•6h ago
Woohoo! I'm excited for you to dig in!
georgeecollins•6h ago
This is cool, but its hard to make a game engine full featured enough to be worth developing for. Have you thought about making this an addon for another engine like Godot or Bevy? Godot in particular is a nice engine to develop on, but the multiplayer support could be improved.
BSTRhino•5h ago
You are right. I am insane. I've had many existential crises about this exact issue over the past 3 years.

I just had a very very particular idea of what I wanted to do and nothing else would do. Making automatic multiplayer was only half my mission. The other half was creating the perfect first programming language. (I talked about this in another comment: https://news.ycombinator.com/item?id=44001047 )

I would love for Easel to inspire other game engines about how multiplayer could or should be done. But I just can't personally do this any other way. It's like, sometimes I don't know if I chose this project or it chose me.

vinibrito•4h ago
How do you abstract away the multi tenancy for your developer/user? As in different rooms or instances. Or similar. I'm asking because I'm building a visual development tool for web apps, and all such abstractions, as in computer powers to non developers, are interesting for me to see how they are done.
BSTRhino•3h ago
Yes, all the Easel games are sharing infrastructure, which is much more cost-effective for all of us. In general it's not really something that really affects players or developers.

When a game developer chooses to publish their game, they choose either a subdomain (e.g. https://pewpew.easel.games) or a subpath (https://easel.games/@alzarath/snake). It just takes one click and then they have a URL to share with other people.

When players request to join a multiplayer game, they are matched to other players who are playing the same game, who are close to them geographically, and who are wanting to play the same game mode with the same parameters. A single game may have many lobbies running at once.

To the server, all inputs have the same format, regardless of game, so it's really efficient and just churning through relaying the inputs from one player to another. Because determinism is guaranteed for Easel, the server does not actually do any simulation at all, it just relays inputs, so I don't currently have to manage issues with one "noisy" tenant overwhelming the server and degrading the experience for others.

Not really sure if any of this answers your question!

asadm•3h ago
Pretty cool work, kudos!

This was exactly the premise behind the multiplayer SDK I made[1] but I moved to a middle ground (after feedback from devs) so to support existing languages and game engines single player game devs are familiar with but still easier than many other options out there.

We have now scaled it to many millions of players and it has proved worthy!

1. https://joinplayroom.com

BSTRhino•3h ago
Wow, playroom looks awesome! It is great that it lets people integrate with all the existing libraries like ThreeJS for example. Glad to hear it has found its audience!
chrisdirkis•2h ago
A few quick q's, since I'm working on a game with a hand-rolled rollback impl (we have state copying, so we can do some nice tricks):

- Is there anywhere we can follow you about the clock-sync trick? I'd definitely love to be notified - On the adaptive delay, are there gameplay or rollback engine implications to variable delays? Seems somewhat "unfair" for a player to be penalised for poor network conditions, but maybe it's better than them teleporting around everywhere.

Good luck with the project! I'll hopefully have a fiddle around with it soon :)

Show HN: Online Compass

https://onlinecompass.in/
2•artiomyak•25m ago•0 comments

Show HN: Min.js style compression of tech docs for LLM context

https://github.com/marv1nnnnn/llm-min.txt
168•marv1nnnnn•18h ago•49 comments

Show HN: Real-Time Gaussian Splatting

https://github.com/axbycc/LiveSplat
131•markisus•18h ago•46 comments

Show HN: Undetectag, track stolen items with AirTag

https://undetectag.com/
96•pompidoo•16h ago•85 comments

Show HN: Easel – Code multiplayer games like singleplayer

https://easel.games/about
75•BSTRhino•1d ago•40 comments

Show HN: Muscle-Mem, a behavior cache for AI agents

https://github.com/pig-dot-dev/muscle-mem
210•edunteman•1d ago•51 comments

Show HN: I made a platform to debug Puppeteer (JS) crashes visually

https://buglesstack.com/
15•ivanalemunioz•2d ago•1 comments

Show HN: Hyprsqrl – open-source revolut you can self-host (live iban/sepa/ACH)

https://github.com/different-ai/hyprsqrl
7•ben_talent•8h ago•3 comments

Show HN: I’ve built an IoT device to let my family know when I’m in a meeting

https://nullonerror.org/2025/05/11/i-have-built-an-iot-device-to-let-my-family-know-when-i-am-in-a-meeting/
111•delduca•4d ago•76 comments

Show HN: Convert JSON Schema to SQL DDL

https://github.com/VasilVelikov00/json-schema-to-sql
5•vjv•10h ago•0 comments

Show HN: Heygem AI – An Open Source, Free Alternative to Heygen AI

https://github.com/duixcom/Duix.Heygem/blob/main/README.md
22•heygem-ai-new•18h ago•2 comments

Show HN: A free AI risk assessment tool for LLM applications

https://www.gettavo.com/app
3•percyding99•18h ago•0 comments

Show HN: HelixDB – Open-source vector-graph database for AI applications (Rust)

https://github.com/HelixDB/helix-db/
228•GeorgeCurtis•2d ago•106 comments

Show HN: Lumier – Run macOS VMs in a Docker

https://github.com/trycua/cua/tree/main/libs/lumier
153•GreenGames•1d ago•47 comments

Show HN: Semantic Calculator (king-man+woman=?)

https://calc.datova.ai
170•nxa•1d ago•172 comments

Show HN: Kudos.wiki – Discover the best movies on Wikipedia

https://kudos.wiki
17•kilgarenone•22h ago•5 comments

Show HN: CSV GB+ by Data.olllo – Open and Process CSVs Locally

https://apps.microsoft.com/detail/9pfcrwp46v22?hl=en-US&gl=US
50•olllo•1d ago•22 comments

Show HN: Airweave – Let agents search any app

https://github.com/airweave-ai/airweave
170•lennertjansen•3d ago•38 comments

Show HN: AsianMOM – WebGPU Vision-LLM app that roasts you like ur mom in-browser

https://asianmom.kuber.studio/
2•kuberwastaken•12h ago•0 comments

Show HN: A5

https://github.com/felixpalmer/a5
94•pheelicks•2d ago•29 comments

Show HN: YapCards (iOS) – Voice-driven flashcards with AI feedback

20•DonEsquire•1d ago•6 comments

Show HN: Basecoat – shadcn/UI components, no React required

139•hunvreus•2d ago•77 comments

Show HN: Turn OpenAPI documents to LLM friendly Markdown

https://github.com/scalar/scalar/tree/main/packages/openapi-to-markdown
5•marclave•14h ago•0 comments

Show HN: NewWord – AI powered personal vocabulary collector

https://www.newword.app/
2•Akring•14h ago•0 comments

Show HN: Cogitator – A Python Toolkit for Chain-of-Thought Prompting

https://github.com/habedi/cogitator
3•habedi0•15h ago•0 comments

Show HN: Wordleish Spinoff for Economics

https://www.economyguesser.com/
3•hayekstan•16h ago•0 comments

Show HN: Doxxer – CLI tool for dynamic SemVer versioning using tags

https://github.com/karlis-vagalis/doxxer
11•nautical_dog•1d ago•4 comments

Show HN: Lumoar – Free SOC 2 tool for SaaS startups

https://www.lumoar.com
90•asdxrfx•3d ago•32 comments

Show HN: Playmaker – Vibe marketing, powered by deep-research

https://www.tryplaymaker.io/
6•anianroid•17h ago•1 comments

Show HN: acmsg (automated commit message generator)

https://github.com/quinneden/acmsg
15•qeden•1d ago•19 comments