News for hackers. Stuff that matters.
Re:Godot Engine Web Editor by onion2k on Sunday March 21, 2021 @08:05AM (#26529801)
Unfortunately, the web is not a viable platform for games.

Why not?

The usual answer is "performance", but that's a non-answer. Not all games need cutting edge levels of performance, web performance for accelerated graphics is actually pretty good as once a shader is on the GPU there's very little practical difference between web and native, and most importantly nothing pushes performance to improve quite like developers trying to maximize performance. If we don't try to make web games (or any other performant apps) then there's no reason for browser vendors to work on improving the situations where things are slow.

If Godot's devs think web is an interesting and fun thing to target then they absolutely should be making tools like this.

Re:Godot Engine Web Editor by liveoneggs on Sunday March 21, 2021 @08:54AM (#26530035)
the web is not viable for games because browsers are unstable targets that change things constantly, breaking the games. Back when there was a stable deployment target (flash) games were everywhere.
Re:Godot Engine Web Editor by learc83 on Sunday March 21, 2021 @09:46AM (#26530390)
This is very true. I built a game to go along with our wedding invitations. I’ve been maintaining it for the past 6 months, and it has stopped working on one browser or the other multiple times. This is despite the fact that I’m using a popular actively maintained JavaScript engine.

It noticed just a few days ago that is wasn’t working on my iPhone because mobileSafari decided to stop reporting itself as safari and only as “mobile safari”.

Re:Godot Engine Web Editor by onion2k on Tuesday March 23, 2021 @01:29AM (#26551440)
It noticed just a few days ago that is wasn’t working on my iPhone because mobileSafari decided to stop reporting itself as safari and only as “mobile safari”.

That points to your code doing browser agent sniffing. There are much better approaches to feature detection these days, precisely because of the issue you've encountered. I can recommend https://developer.mozilla.org/en-US/docs/Learn/Tools_and_tes... as a good place to start.

Re:Godot Engine Web Editor by learc83 on Wednesday March 24, 2021 @08:33PM (#26575036)
It wasn’t my code, it was engine code, and it was a problem where Safari reports that it doesn’t support a feature that it actually does.
Re:Godot Engine Web Editor by StavrosK on Sunday March 21, 2021 @11:06AM (#26530997)
Why do things break? The underlying primitives are as simple as a canvas element, no? I'd think it would be hard to break an array of literal pixels.
Re:Godot Engine Web Editor by jayd16 on Sunday March 21, 2021 @12:21PM (#26531519)
Well for starters even getting a canvas based UI working that supports all DPIs, all aspect ratios, live resize, clicks, and multi-touches is non-trivial.
Re:Godot Engine Web Editor by pjmlp on Monday March 22, 2021 @04:34AM (#26538161)
And unless we do some strange CSS tricks to force acceleration, there isn't even the guarantee that canvas is doing hardware acceleratd drawings.
Re:Godot Engine Web Editor by sfjailbird on Sunday March 21, 2021 @12:51PM (#26531779)
Not to mention text input.
Re:Godot Engine Web Editor by learc83 on Wednesday March 24, 2021 @08:40PM (#26575107)
Audio is what was breaking. Also WebGL outperforms canvas, and it’s more complex than drawing a bitmap to the screen.
Re:Godot Engine Web Editor by jan_Inkepa on Sunday March 21, 2021 @12:22PM (#26531531)
Sound stuff is still pretty unstable.
Re:Godot Engine Web Editor by marcosdumay on Sunday March 21, 2021 @10:26AM (#26530700)
Web assembly looks quite stable.

It is hard to interoperate with the page, and it will keep changing on that point for a while, but that's not something that games do. For games it's all drawing on some element, what is very well defined already.

Re:Godot Engine Web Editor by pjmlp on Monday March 22, 2021 @04:35AM (#26538167)
Yeah, but then you need cavas and WebGL to draw and there isn't any way to know if they are actually being hardware accelerated, or if the browser vendor decided to blacklist the users hardware.
Re:Godot Engine Web Editor by slezyr on Sunday March 21, 2021 @08:14AM (#26529848)
> The usual answer is "performance", but that's a non-answer.

Try to play https://slither.io

The performance is horrible even in simple games.

Re:Godot Engine Web Editor by onion2k on Sunday March 21, 2021 @01:06PM (#26531910)
That definitely lags when there's more than one or two 'snakes' on the screen. The performance sucks. I'd argue that shows that specific game is poorly coded more than it shows web browsers can't handle performant games. If you look at something like https://beta.unity3d.com/jonas/AngryBots/ you'll see that browsers can, technically, cope with at least PS2 level graphics in a decent game running at a solid 60fps.
Re:Godot Engine Web Editor by andybak on Sunday March 21, 2021 @09:06AM (#26530090)
Surely that's a poor implementation? The parent post's point still stands. Browsers are "good enough" a very broad range of games. There's ample evidence of this if you wanted to look.
Re:Godot Engine Web Editor by isodev on Sunday March 21, 2021 @09:51AM (#26530422)
It doesn't work in Safari or mobile browsers. It's quite far from the expectations of a versatile web platform. WebAssembly has a lot of potential, so one day... perhaps.
Re:Godot Engine Web Editor by crocodiletears on Sunday March 21, 2021 @10:40AM (#26530788)
Working pretty well for me on Chromium and Firefox mobile.

iOS and everything on it using Webkit though, I'm sure there're some issues.

Re:Godot Engine Web Editor by isodev on Sunday March 21, 2021 @12:17PM (#26531492)
It's so frustrating to constantly switch between my favourite browser and whatever the developers had in mind.
Re:Godot Engine Web Editor by andybak on Sunday March 21, 2021 @02:08PM (#26532471)
If your favourite browser is Safari then there's a good reason developers might have targeted another browser - Safari is consistently slow in adopting the kind of features that enable more cutting edge web applications.

That's not neccesarily a bad thing but you can't complain if you're trying to run cutting-edge apps on a conservative browser.

Re:Godot Engine Web Editor by isodev on Sunday March 21, 2021 @03:18PM (#26533060)
I am happy they are experimenting with something fresh and cool. My complaint is that it can't possibly be anywhere near ready without being more inclusive.

This comment goes beyond browsers - it's such a bummer when I try to play a game I like or one that someone recommended and then "oops, we don't support your device/browser...".

Re:Godot Engine Web Editor by andybak on Sunday March 21, 2021 @03:27PM (#26533126)
But doesn't that mean Apple gets to choose the pace of advancement and be the gatekeeper of features?

At least on Desktop - it's not that much of a burden to have a second browser installed for certain apps, is it?

I use Firefox for daily browsing but I've got Chrome and Edge for those times I want to run something that Firefox doesn't support (which is fairly rare). I imagine it's much less rare with Safari.

Re:Godot Engine Web Editor by isodev on Sunday March 21, 2021 @05:06PM (#26534044)
Not Apple... I think it's really the developer's responsibility.

Like you say, you like Firefox but say if you want to video chat in Microsoft Teams, they'd tell you "video is not available in your browser".

Some games are only available on Android, others only on iOS. Or you are on a Mac but you can't play because someone opted for the easy way out saying "Macs are not for games" even though I am certain what I want would run just fine, if it was available.

These as examples of gatekeeping and the fix is definitely in the hands of developers to make their stuff portable and working everywhere.

Re:Godot Engine Web Editor by andybak on Sunday March 21, 2021 @05:35PM (#26534312)
I don't understand you properly.

Apple is famously slow or simply refusing to implement features that Chrome, Edge and Firefox have adopted. Many of these features are critical for certain applications. Gaming being one of them.

How is this a developer's fault?

1. I need feature x - either to implement an aspect of my app at all - or at least to do it in a way that doesn't require a large amount of extra work and cost. 2. Feature x exists in every major browser except Safari 3. I choose to exclude Safari.

My only options as a developer are to spend a ton more time or cash (assuming it's even possible at all) or to build something different.

And this might be a solo project or a project with no realistic hope of paying for my time.

Re:Godot Engine Web Editor by reitzensteinm on Sunday March 21, 2021 @07:15PM (#26535027)
As a game developer that's done a bunch of web games, thank you. Parent is trying to shame game developers for not making choices that would destroy their businesses. It's quite strange to read.

I think it's unfortunate that you can't have rock solid cross browser gaming yet (and Safari is not the only offender, but it's by far the largest). But that's not a reason to just shut it all down for the next decade until that's possible.

Re:Godot Engine Web Editor by slezyr on Sunday March 21, 2021 @09:11AM (#26530116)
So, can you provide "good enough" games with "good implementations" that are somewhat popular?
Re:Godot Engine Web Editor by kroltan on Sunday March 21, 2021 @10:17AM (#26530629)
https://krunker.io/

Runs at a couple hundred FPS if left uncapped, and has very good netcode.

Re:Godot Engine Web Editor by modeless on Sunday March 21, 2021 @04:51PM (#26533876)
https://poki.com has 30 million monthly active users. That's more than e.g. DOTA 2, CS:GO, or any other single Steam game. Yes there is a lot of trash, but there is also some decent stuff on there.
Re:Godot Engine Web Editor by TheSisb2 on Sunday March 21, 2021 @09:52AM (#26530432)
Venge.io
Re:Godot Engine Web Editor by slezyr on Sunday March 21, 2021 @10:01AM (#26530506)
It looks even worse that Quake3 to me and it's gameplay is just dull.
Re:Godot Engine Web Editor by andybak on Sunday March 21, 2021 @02:09PM (#26532478)
Aren't you just moving the goalposts now?
Re:Godot Engine Web Editor by felipellrocha on Sunday March 21, 2021 @05:09PM (#26534085)
Yeah, they did. Goalpost went from "is it even feasible" to "did the devs implement a compelling game" as if it was impossible to create a compelling game over the web.
Re:Godot Engine Web Editor by athrowaway3z on Sunday March 21, 2021 @09:23AM (#26530207)
agar.io
Re:Godot Engine Web Editor by slezyr on Sunday March 21, 2021 @09:59AM (#26530490)
It lags even more that slither
Re:Godot Engine Web Editor by Negitivefrags on Sunday March 21, 2021 @07:03PM (#26534969)
People played browser games before because it was a way to play games without installing them. This is a use case that existed because of locked down computers in schools, universities and workplaces.

Now everyone has phones.

Re:Godot Engine Web Editor by sfjailbird on Sunday March 21, 2021 @09:26AM (#26530233)
Most importantly, nobody wants to pay for anything on the web. Sad but true.
Re:Godot Engine Web Editor by UnpossibleJim on Sunday March 21, 2021 @12:40PM (#26531680)
I hate to admit it (and it truly does pain me), but anything casual will be on a mobile platform. Anything on the web should just be ported to the mobile space.

The rise of web games, way back when, was to blow off some steam at work. With the rise of monitoring software, that niche has been filled with mobile games that can waste time at work, on the bus, on the toilet, at the dinner table and while watching the television.

Flash games are where I started making graphics and learning programming, so this is a wonderful introduction for younger people to programming (Godot doesn't come with a suite of drawing programs like the stolen version of the Adobe Suite that I "liberated" as a script kiddy a thousand years ago). They can readily host them for cheap or free and show them to their friends, but as for business viability, you're very right.

Apologies for the length of this.... it kind of got away from me =)

Re:Godot Engine Web Editor by jan_Inkepa on Sunday March 21, 2021 @12:24PM (#26531539)
Advertisers were willing to pay quite a bit back in the days! While privacy is good, the advertising industry supported a p. large cottage industry of cool online game developers back in the days. A lot of people I know got their first buck that way in a way that's harder to do nowadays.
Re:Godot Engine Web Editor by TazeTSchnitzel on Sunday March 21, 2021 @03:25PM (#26533121)
There are free-to-play web games making a killing off microtransactions.