Live data from Hacker News

MelonJS – a fresh and lightweight JavaScript game engine

github.com

1–10 of 70 posts

Re: MelonJS – a fresh and lightweight JavaScript game engine

#2
Thanks for sharing this. As a web dev, rather than game dev, I like that what I’ve used in web dev more and more is usable in web dev (es6, imports, rollups) etc.

To me, it has previously felt clunky to use older (and more mature, sure!) toolkits when building a one-day game just for fun.

Re: MelonJS – a fresh and lightweight JavaScript game engine

#3
Looks interesting, i also like the README and the provided demos. The development seems to have been done by a single dev for the last three years. Impressive!

The line-of-sight demo appears to be buggy on Firefox, however: A box behind a closer box that blocks the view is marked as red.

There's no mention of networking so i guess multiplayer is not inside its current scope?

Re: MelonJS – a fresh and lightweight JavaScript game engine

#7
Nice! Is this yours?

I've tried building a few real-time games with different implementations of these HTML5/JS game engines, but I always hit a wall when trying to add multiplayer capabilities.

The main issues I've found is there's never a way to get a "universal" X/Y/Z position for an object that can be accurately stored in a server that syncs with the position for players. It always tends to be ever so slightly off in a way that desyncs over time, making a stutter when the server has to force a resync. This is then compounded with collision detection physics, which these engines never do in a "standard"/specified way, requiring me to reimplement their physics server side, which inevitably causes occasional game breaks from the inconsistencies - going through walls, or total desync.

Anybody have any suggestions/solutions/recommendations?

Re: MelonJS – a fresh and lightweight JavaScript game engine

#8
post #7

Nice! Is this yours? I've tried building a few real-time games with different implementations of these HTML5/JS game engines, but I always hit a wall when trying to add multiplayer capabilities. The main issues I've found is there's never a way to get a "universal" X/Y/Z position for an object that can be accurately stored in a server that syncs with the position for players. It always tends to be ever so slightly of…

Is the problem you mentioned not fixed by collision prediction? Check out ourcade on youtube, if you don't already know what this is, he has a video on it.

Re: MelonJS – a fresh and lightweight JavaScript game engine

#9
post #7

Nice! Is this yours? I've tried building a few real-time games with different implementations of these HTML5/JS game engines, but I always hit a wall when trying to add multiplayer capabilities. The main issues I've found is there's never a way to get a "universal" X/Y/Z position for an object that can be accurately stored in a server that syncs with the position for players. It always tends to be ever so slightly of…

Remote multiplayer for real-time games is an entire domain in itself and possibly the hardest part of game dev.

There’s a number of approaches. One approach is that you need to make your local simulation deterministic so that every client can do their own work and simply agree that they’re on the same page. You then send events, not state, in turns.

Saving state in a hashable structure can make it easy to check if all clients agree.

Decoupling the local sim from the multiplayer events can make the game feel smooth, even if at times there’s rubber banding.

This is such a good read: https://www.gamedeveloper.com/programming/1500-archers-on-a-...

Re: MelonJS – a fresh and lightweight JavaScript game engine

#10
post #6

An example of what can be done with it - https://melongaming.com/games/melonjump/ (hold the left mouse button down and move your mouse to play). More here https://www.melongaming.com/en/Games

These demos highlight the pro and cons of the various input devices. This melonjump game is much harder to play with a touchpad than with a mouse. The platformer demo isn't, but that's mostly a keyboard game. The whack-a-mole game is much much easier with a touchscreen than with a mouse or a touchpad.
Post reply on HN