Live data from Hacker News

MelonJS – a fresh and lightweight JavaScript game engine

github.com

61–70 of 70 posts

Re: MelonJS – a fresh and lightweight JavaScript game engine

#61
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…

I am not an expert but GunJS may be of interest for fast p2p sync.

Re: MelonJS – a fresh and lightweight JavaScript game engine

#62

There's a Nintendo DS emulator named melonDS. If the title didn't have a description, I would have assumed it were a JavaScript port of the emulator. That would have been cool. This is cool too, though.

Looks like MelonJS is at least 5 years older. The GitHub repo history goes back to 2011.

Cool callout. Frankly I'm impressed that a JS game engine is still relevant after more than a decade.

Re: MelonJS – a fresh and lightweight JavaScript game engine

#63
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…

[deleted]

Re: MelonJS – a fresh and lightweight JavaScript game engine

#64

Earlier 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.

Are you playing on a phone or using a high DPI monitor? By default HTMLcanvas (which most game engines use to handle text) does not take into account high DPI scaling (I would guess due to performance). 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 c…

You can add high DPI support to 2d canvas by using scale

Re: MelonJS – a fresh and lightweight JavaScript game engine

#65
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

Another good one is Super Kaiju Dunk City. [1]

[1] http://radmars.com/superkaijudunkcity/submission/

Re: MelonJS – a fresh and lightweight JavaScript game engine

#66
post #55

Earlier quoted context omitted.

As a web dev I made two browser games with no framework (for one I used the Matter.js physics engine) and it was a good experience. The browser has great built in apis like the Canvas element so it isn't completely "from scratch", but you'll still get a great sense for the basics of making a game loop etc from the ground up and you can use your previous experience. I've also played around with Unity a bit but haven't…

I'm a web dev that tried to find a job in browser game dev. Until I realised that there aren't many positions to go around. Only making slot games for online gambling companies really. The rest of the opportunities were not in browser land, but Unity or Unreal Engine. And good luck getting past the millions of techbros who want these positions.

Yes, the browser game market is dead except for gambling and education - that’s because browser games run instantly with 0 installation.

Almost no jobs. However, if you can find them they pay much better than Unity/Unreal jobs because html game dev is such a rare skill. The decision tree you need to follow to end up as a html game specialist is so fraught with distractions almost no one ends up there.

But, for those who do I recommend Phaser.

Re: MelonJS – a fresh and lightweight JavaScript game engine

#67
post #51

Earlier quoted context omitted.

As long as you don't read your writes and use transform for animations it won't cost you more than 0.5ms to 1ms per frame (could it be better? Sure. But developer productivity is important.) I use react in my game platform bloxd.io - which I work full time on - and I couldn't be happier

Just took at look a bloxd. Pretty cool! I want to make my own io game. I think the browser game market is under served as far as quality games are concerned, and doesn’t seem saturated compared to all the other platforms. Would you be able to give any advice on netcode/multiplayer solutions? I like working with low level rendering libraries (canvas, Kha/Haxe) but I am wondering if it is better to use an engine versus…

no need to roll your own solution. If you want to ship a game, go high level :D

For web native rendering pixijs is good for 2d (and phaser is good also a good entry level). For 3d theres threejs/babylonjs.

There's also unity, which some browser games use but it has downsides on web (large build sizes for one)

None of the networking solutions will give you unreal engine netcode developer productivity (and that includes ones for unity). I use colyseus, it doesnt solve everything but will save you some work

Re saturation, it definitely depends on the genre, web is its own market. What type of game are you thinking of making?

Re: MelonJS – a fresh and lightweight JavaScript game engine

#68
post #56
post #31

Earlier quoted context omitted.

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

"Web libraries (react, etc)" are just using HTML and CSS / the standard DOM for rendering instead of Canvas. You don't need to use any "library" to render in that way, it's built into the browser. My most recent web game uses both standard DOM and Canvas for rendering different parts of the UI and text, and both look equally good to me. You do have to have set up the Canvas rendering correctly, especially for sharper…

Yup, but developer productivity with web library (e.g. react) > no library vanilla dom manipulation > canvas

Re: MelonJS – a fresh and lightweight JavaScript game engine

#69
post #67

Earlier quoted context omitted.

Just took at look a bloxd. Pretty cool! I want to make my own io game. I think the browser game market is under served as far as quality games are concerned, and doesn’t seem saturated compared to all the other platforms. Would you be able to give any advice on netcode/multiplayer solutions? I like working with low level rendering libraries (canvas, Kha/Haxe) but I am wondering if it is better to use an engine versus…

no need to roll your own solution. If you want to ship a game, go high level :D For web native rendering pixijs is good for 2d (and phaser is good also a good entry level). For 3d theres threejs/babylonjs. There's also unity, which some browser games use but it has downsides on web (large build sizes for one) None of the networking solutions will give you unreal engine netcode developer productivity (and that include…

Thanks for the advice!

I’ve heard of Colyseus and it’s good to know that it is a viable solution. I am keen to try out the Haxe library.

I’ve got some loose ideas for some 2D semi-realtime games. No solid ideas yet but I want to experiment.

Re: MelonJS – a fresh and lightweight JavaScript game engine

#70
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

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.

Look into msdf rendering for text in WebGL. https://github.com/Chlumsky/msdfgen
Post reply on HN