What I've Learned (So Far) Building Online Mini Games with Elixir and Swift
20 points
2 days ago
| 5 comments
| calvinflegal.com
| HN
zuzululu
2 hours ago
[-]
was expecting a bit more substance but always interesting to read different approaches.

but I do wonder if BEAM is a bit of an overkill, even fly.io (known among developer threads to be very unreliable uptime) wouldn't be my first pick.

Cloudflare Durable Objects really is generous, not often can you get replicated database and realtime sync for such low barrier in cost and implementation.

I do wonder tho what Cloudflare's ultimate game is, as I'd imagine once they corner the market and practically everything is running off it, wouldn't be hard to say raise the $5/month to something higher.

reply
apt-apt-apt-apt
1 hour ago
[-]
Really interested in hearing more about the architecture. Especially (1) why you chose Elixir, Phoenix over TS (2) how you dealt with real-time multiplayer.

Aside: The links to the web game in the post don't lead to being able to play.

reply
frail_figure
3 minutes ago
[-]
Not OP, but TS (as in TypeScript, right?) is not even in the same universe as Elixir with Phoenix when it comes to building backend services.

It's a very productive and readable programming language with excellent documentation and conventions, and the most ergonomic way of handling concurrent operations (thanks BEAM) I've encountered.

The VM it runs on was originally designed for telephone switches, which, it turns out, cleanly translates to the internet/http era.

It makes it trivial to do soft-realtime because it's just actors (GenServers) passing messages.

I invite you (and others) to try it out and do a small weekend project. It'll make you reconsider reaching for TS on the backend :)

reply
colechristensen
52 minutes ago
[-]
Phoenix is delightfully fast and not having to deal with two entirely different application stacks where your application is split down the middle (or the javascript ecosystem) is a breath of fresh air.
reply
karado
3 hours ago
[-]
In my own projects I've found the feedback loop to be much slower in native mobile apps compared to web. For web apps my workflow has involved lots of human verification just through using the app myself and testing out the latest features/fixes. Sometimes I get the agent itself to do this before I do using Codex's chrome extension. This same process on mobile is a lot slower. How have you approached this aspect? Have you figured out a way to get the agent to control an emulator?
reply
zuzululu
2 hours ago
[-]
Maestro but honestly you should always be testing on real devices
reply
calflegal
2 days ago
[-]
I should've said more about the tech. I will later. The server is in NJ. If you're in the EU the game might really lag. Sorry!
reply
oezi
2 hours ago
[-]
You mention it is possible to play via Web, but all links just lead to pages which point to Apple's app store. Game over for Android and the web?
reply
calflegal
2 days ago
[-]
My post about my recent project, Migo Games
reply
ipnon
2 hours ago
[-]
I’ve never thought about how the room model matches the LiveView socket model before. Which socket library are you using?
reply