Live data from Hacker News

Show HN: I built an indie, browser-based MMORPG

alpha.reconquer.online

1–10 of 165 posts

Show HN: I built an indie, browser-based MMORPG

#1
I've been working on an MMORPG that is now in alpha as a solo developer.

Here are the major open source technologies that I use:

Blender - 3D modeling software for creating the overall environment and every game object. I've gotten a lot of CC and Public Domain assets from https://poly.pizza

GLTF - I export assets from blender to the GLTF asset format

JSON - I write a JSON config for every game object that describes things like its name, its interactions, its collisions, etc.

Node.js exporter - I iterate over the environment and every asset to create a scene hierarchy. I use gltf-transform for processing all GLTF files, compressing them, removing redundancies, etc.

Node.js server - Uses express and socket.io to process game state updates. It keeps track of every client's game state and issues delta's at each game tick (currently 600ms). The client can send interactions with different objects. The server validates those and updates the game state accordingly.

HTML/CSS/JavaScript/Three.js client - I use regular web technologies for the UI elements and three.js for the 3D rending on the browser. The client is responsible for rending the world state and providing the client with different interactions. All code is written in JavaScript which means less context switching. Performance seems to be good enough, and I figure I can always optimize the server code in C++ if necessary.

I am currently running two cheap shared instances but based on my testing, they can likely support about 200 users each. This is a low-poly browser based game so it should be compatible across many devices. The data a user needs to download to play, including all 3d assets, is approximately 2 MB, even though there are hundreds of assets.

Overall, it's been a fun project. Web development and open source software have progressed to the point that this is no longer an incredibly difficult feat. I feel like development is going pretty well and in a year or so there will be plenty of good content to play.

Show HN: I built an indie, browser-based MMORPG
alpha.reconquer.online

Re: Show HN: I built an indie, browser-based MMORPG

#6
600 ms tick rate and can only support 200 users per instance? Can you elaborate on all that? I was working on a browser game that i’d like to have be realtime and responsive but it seems maybe a tall order from what I’ve been told but I don’t really understand why. Like would 30 fps and maybe something like 50 ms tick rate for 4 players in the same game instance be feasible in browser? Thanks ahead of time!

Re: Show HN: I built an indie, browser-based MMORPG

#10

600 ms tick rate and can only support 200 users per instance? Can you elaborate on all that? I was working on a browser game that i’d like to have be realtime and responsive but it seems maybe a tall order from what I’ve been told but I don’t really understand why. Like would 30 fps and maybe something like 50 ms tick rate for 4 players in the same game instance be feasible in browser? Thanks ahead of time!

The 200 users are on a $5 per month server. I'm guessing a better server could support more, but there are scaling challenges if everyone wants to be in the exact same location. In that case, you're sending 200 updates to 200 people each tick which gets slow since it scales O(n^2).

I used 600ms because that's a reasonable rate for walking one square and it's also what is used in the largest similar game Old School Runescape. Even at 600ms ticks, I had to do some tricks to make it feel smoother. For example, I calculate the average latency variation in the client and delay updates so that they fall more closely to exactly 600ms apart. I think 50ms could work if the players are geolocated, otherwise I think that's pushing it. You would need to figure out a very intelligient way to deal with lag at the start.

Post reply on HN