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
The thing I noticed with most JS game libraries is their inability to display text without being slightly blurry. Is there a fix to the issue? I noticed this in the game you linked as well.
MelonJS – a fresh and lightweight JavaScript game engine
41–50 of 70 posts
Re: MelonJS – a fresh and lightweight JavaScript game engine
#42Nice! 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…
Re: MelonJS – a fresh and lightweight JavaScript game engine
#43For someone going from web dev to game dev, would it be better to learn MelonJS or another JS Engine or something like Unity?
If you're going from web dev to game devs as a hobby or just fun side thing, then a JS engine like Melon is a good way to dive in and start creating something people can enjoy without serious investment.
Re: MelonJS – a fresh and lightweight JavaScript game engine
#44Earlier quoted context omitted.
The thing I noticed with most JS game libraries is their inability to display text without being slightly blurry. Is there a fix to the issue? I noticed this in the game you linked as well.
Tbh when making a web game you'd be better served using standard web UI in tandem with your game even if canvas text wasn't blurry. Web libraries (react, etc) are very advanced and it'd be incredibly hard for a js game engine to match them for UI
Re: MelonJS – a fresh and lightweight JavaScript game engine
#45An 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
The thing I noticed with most JS game libraries is their inability to display text without being slightly blurry. Is there a fix to the issue? I noticed this in the game you linked as well.
This isn't inherit to JS game engines, but I will say text quality is not usually something that game devs focus on unless text is important to their particular game.
Here's an example of a workaround to render more crisp text https://github.com/danman113/gfx-utils/blob/main/src/canvas/...
Re: MelonJS – a fresh and lightweight JavaScript game engine
#46Nice! 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…
I use phaser on client side, then matter.js for physics + nengi.js for networking ( https://github.com/timetocode/nengi ). I only have experience with 2d (so it might not be useful to you, but perhaps will others), where typically it's a worse experience for the player to have CSP (client side prediction) at-least in a fast paced game, as for example a player behind a wall can more clearly see something missed them,…
Re: MelonJS – a fresh and lightweight JavaScript game engine
#47Nice! 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…
Re: MelonJS – a fresh and lightweight JavaScript game engine
#48For someone going from web dev to game dev, would it be better to learn MelonJS or another JS Engine or something like Unity?
Re: MelonJS – a fresh and lightweight JavaScript game engine
#49Earlier quoted context omitted.
I'm assuming you're talking about lockstep/rollback network model, since it should not be an issue for client-server with proper client prediction/interpolation. The biggest source of these inconsistencies is Math.sqrt(). You need to implement deterministic version of sqrt() and that should fix 99% of your issues. Hit me up if you need some additional pointers.
This sounds extremely relevant to my issues, as floating point issues between different clients and the server was something I noticed. I would really appreciate any links you might have to share.
I'm using this sqrt implementation (found it long time ago on some old action script blog, this link is not the original source). It's plenty fast, accurate and fully deterministic. I successfully implemented it in my multiplayer gta2 clone in javascript.
Re: MelonJS – a fresh and lightweight JavaScript game engine
#50Earlier quoted context omitted.
I use phaser on client side, then matter.js for physics + nengi.js for networking ( https://github.com/timetocode/nengi ). I only have experience with 2d (so it might not be useful to you, but perhaps will others), where typically it's a worse experience for the player to have CSP (client side prediction) at-least in a fast paced game, as for example a player behind a wall can more clearly see something missed them,…
Do you have a demo/link to one of your games? I am interested in learning more about multiplayer experience for web games and would love to see an example with these tools mentioned.
It's using phaser on the server in this instance (which I recently ripped out, and moved to just using matter)
It's pretty ugly code, but the foundations are there, maybe it's a starting point or of some use!