4 ms·
I feel like the Erlang/OTP would be perfect for the MMO use case. It’s what I’d try first if building from scratch.
by nvarsj 3y ago
I feel like the Erlang/OTP would be perfect for the MMO use case. It’s what I’d try first if building from scratch.
- bullen 3y agoNo erlang cannot share memory between cores, it has to copy it.
- klibertp 3y agoI think binaries are refcounted and shared in Erlang? I'm not sure if this happens between schedulers/cores, though. They're also obviously immutable, so might not be what you mean by "sharing memory atomically". Other than Erlang, Pony[1] might be an interesting choice. It allows sharing memory, even mutable memory, but it tracks the sharing in the type system. It's been a long time since I looked at it, and it definitely had a bunch of rough edges, but I really liked where the things were going. I hope it got even better since. [1] https://www.ponylang.io/ https://www.ponylang.io/
- bullen 3y agoFor me C (1970) and Java (1990) are the only options for eternity. I use some C++ features and dabble in js when I make HTML but really since Applet and Flash has been removed the browser is just a bloated waste of time. Make your apps fast by allowing them to share memory without latency! I have also coded Perl, VisualBasic, php and C# and I'm pretty sure this is it. What we need now are VMs that can take any bytecode/instructionset and translate it to all others. For true crossplatform development. But that requires us to dump dynamic allocation. Arrays of 64 byte structures FTW!
- ReactiveJelly 3y ago> VMs that can take any bytecode/instructionset and translate it to all others You're gonna love this: https://en.wikipedia.org/wiki/WebAssembly https://en.wikipedia.org/wiki/WebAssembly
- bullen 3y agoI would if anything worked. Still waiting for a Windows release of this: https://github.com/bytecodealliance/wasm-micro-runtime https://github.com/bytecodealliance/wasm-micro-runtime Don't hold you breath. Also needs Risc-V and ARM 32/64.
- Thaxll 3y agoErlang performance would be a big problem. It's subpar compared to C++ by an order of magnitude.
- cmdrk 3y agodepends on the kind of game you are making. People made MMOs in the year 2000 when CPUs themselves were an order of magnitude slower.
- nvarsj 3y agoWould an MMO backend be CPU bound though? I feel the use case of having a large numbers of active connections with the very distributed nature of passing events around between them all would be perfect for Erlang/OTP. Anything CPU intensive (like dungeon generation or similar) could be offloaded to another service if needed.
- bullen 3y agoYou want low latency action, and for that you need one CPU with all cores talking to all the memory without locking. Erlang can't do that, and neither can any other language; except C (Arrays of 64 byte Structures) and Java (Concurrency complete rewrite of the JVM in 1.5 that was adopted and failed for C++11 because you need a VM + GC for that model to be meaningful).
- nvarsj 3y agoDoes it really need to be low latency? It's not an FPS - so I don't think high tick rate is important. I'd rather have a wider synchronized global state and acceptable server side latency (<500ms) than instant server updates. The client can interpolate everything.
- bullen 3y agoThen you are making a slideshow, not a game. The whole point of games is real-time action. It does not need to be violent, but it needs physics that give you the feeling of being there. Multiplayer > VR
- hmmokidk 3y agoI have an MMO demo in Elixir! I haven’t updated it in some time because busy from work but take a look: http://rotb.io http://rotb.io
- deleted 3y ago[deleted]
- bcrosby95 3y agoErlang/OTP seems perfect for a diablo-esque game where you have lots of instances with a handful of players each. But a giant shared world with thousands of players doesn't seem to play into its wheelhouse as much.