Games that won't load because of using new JS constructs
Posted: 28 May 2021, 05:53
Until fairly recently, BGA's individual games would work for pretty much any user. Some games don't work perfectly for users with older browsers, but it's usually just display related and may not be significant. (I've only come across two games whose visual positioning issues on older browsers are so bad that they are unplayable.)
However, there have been some recent javascript language additions that totally break old JS interpreters with syntax errors. In particular, there are devs using the ES2020 optional chaining operator (?.) as part of the setup code which defines "bgagame". We are now seeing a cycle of games doing that and getting through alpha (and sometimes even beta!) and then a pile of users of iPads, phones, etc, reporting that the game won't load. (The most recent being Lost Ruins of Arnak.)
Is there any intended base level of JS to be used on BGA?
If not, maybe a standard should be set, such as not using ES2020 constructs? Alternatively, has has there been any thought of using Babel, which should make all these issues go away?
However, there have been some recent javascript language additions that totally break old JS interpreters with syntax errors. In particular, there are devs using the ES2020 optional chaining operator (?.) as part of the setup code which defines "bgagame". We are now seeing a cycle of games doing that and getting through alpha (and sometimes even beta!) and then a pile of users of iPads, phones, etc, reporting that the game won't load. (The most recent being Lost Ruins of Arnak.)
Is there any intended base level of JS to be used on BGA?
If not, maybe a standard should be set, such as not using ES2020 constructs? Alternatively, has has there been any thought of using Babel, which should make all these issues go away?