News for hackers. Stuff that matters.
Re:Tools we used to create a hit HTML5 game on Steam by IggleSniggle on Tuesday November 19, 2019 @01:49PM (#21576675)
Most folks complaint with Electron isn't that it isn't performative, but rather that it is bloated (you ship an entire browser when all you needed was eg the canvas and v8 engine).
Re:Tools we used to create a hit HTML5 game on Steam by seangrogg on Tuesday November 19, 2019 @03:07PM (#21577679)
In all fairness, are you aware of a tool for web developers that only ships the canvas and v8 engine? Legitimately curious, because I've tried looking in the past for similar reasons (game dev on an engine I already know) and came up empty-handed.
Re:Tools we used to create a hit HTML5 game on Steam by cztomsik on Wednesday November 20, 2019 @07:25AM (#21583278)
WebGL is planned for graffiti

It's not finished yet but you can get close to 20M mem usage + overhead of your libs & assets. Executable size is node.js + 2M (30M total IIRC and it compresses nicely to ~10M *.dmg because node contains a lot of strings)

Please file an issue if you want it to happen so that it can be tracked how many people want it too (I had no idea that this is a thing in gaming community). It's now at the bottom of my priorities (I'm working on raspi support so that it can run as smartmirror) but it's not that hard to add so it could actually happen.

https://github.com/cztomsik/graffiti

Re:Tools we used to create a hit HTML5 game on Steam by seangrogg on Wednesday November 20, 2019 @12:29PM (#21586074)
I added a watch to it and starred; I think it'd be a good idea to be more clear with what's being built in the README.md because I wouldn't have thought that this was a stripped-down browser based on the headline. As well, it's difficult to see exactly what you are getting from graffiti (is it just canvas, does it include DOM stuff) at a glance which may turn away those browsing repos.
Re:Tools we used to create a hit HTML5 game on Steam by cztomsik on Friday November 22, 2019 @09:16AM (#21605697)
Agreed that README is very unclear - it's not a browser at all, actually. It's just a GUI library for rust & node.js which happens to have little DOM-like layer.

This pseudo-DOM is really just enough to make web frameworks work. I want to do GUI apps with the same tools & libs which I use for web development but I don't want to include the whole browser and moreover I want it to be enough resource-savvy so that it can run on my raspi attached to the TV.

It's hard to describe what it is good for because there are many use-cases. It's really rather a platform just like Electron or Qt is, but of course it's very limited now. But really, if you or anybode else have better headline, I'd love to hear it.

And thanks for the interest :-)

Re:Tools we used to create a hit HTML5 game on Steam by devit on Tuesday November 19, 2019 @05:11PM (#21578855)
Just setup a localhost server and open the default browser on it.

Or just have a website, if you don't need privileged access to the user's machine.

Re:Tools we used to create a hit HTML5 game on Steam by IggleSniggle on Tuesday November 19, 2019 @06:28PM (#21579503)
Just in case you are not being facetious: totally agreed; but in the case of delivering a game on platforms that include Steam, and also for perception reasons, not really an option.
Re:Tools we used to create a hit HTML5 game on Steam by luismedel on Wednesday November 20, 2019 @04:29AM (#21582389)
I've always dreamed for an Ejecta[0] like solution for desktop systems.

[0] https://github.com/phoboslab/Ejecta

Re:Tools we used to create a hit HTML5 game on Steam by seangrogg on Wednesday November 20, 2019 @12:31PM (#21586107)
This would be great, if only... Realistically, I just want a canvas with some audio/input stuff in most cases (though being able to put some divs in places may be nice for rendering things like menus).
Re:Tools we used to create a hit HTML5 game on Steam by Kiro on Wednesday November 20, 2019 @07:28AM (#21583291)
I second this. Ejecta is beautiful and I really hoped the concept would catch on.
Re:Tools we used to create a hit HTML5 game on Steam by 1ark on Wednesday November 20, 2019 @09:30PM (#21590930)
I looked a bit a few months ago. There are some interesting things out there. But you will probably be a bit on your own (but not uncommon when it comes to game dev though!)

https://github.com/mrautio/duktape-webgl

https://medium.com/@bnolan/translating-sites-into-3d-with-du...

Re:Tools we used to create a hit HTML5 game on Steam by shantly on Tuesday November 19, 2019 @03:25PM (#21577875)
They tend to use ~10x the memory that seems reasonable—generous, even—for what they're doing, and periodically misbehave and decide to eat tons of cycles continuously for no obvious reason, in a way native apps don't, or at least not so frequently and nigh-universally.

Sure, partial counterexample in VSCode, but then there's all the others.

Re:Tools we used to create a hit HTML5 game on Steam by IggleSniggle on Tuesday November 19, 2019 @06:36PM (#21579577)
I agree with what you are saying with regards to the tendency of the platform. But, aside from the weight of unnecessary/unused browser features, I think that has more to do with the needs of the developers attracted to the platform more than the platform itself.

"The needs" being a requirement to ship a MVP ASAP using developers that can agree on a lowest common denominator language of js.

Re:Tools we used to create a hit HTML5 game on Steam by stjohnswarts on Tuesday November 19, 2019 @07:18PM (#21579891)
I wonder if the VsCode coders don't share their SOP somewhere for us mere mortals to learn some techniques they use to keep electron under control.