←back to thread

You can make PS2 games in JavaScript

(jslegenddev.substack.com)
230 points tosh | 1 comments | | HN request time: 0.217s | source
Show context
Flux159 ◴[] No.46008839[source]
The interesting part here is about AthenaEnv. It looks like it uses QuickJS for the Javascript interpreter and wraps around the native system libraries that the PS2 provides.

I'm wondering if there's a modern similar project that would allow writing Javascript Canvas games (WebGPU / WebGL) and publishing on Switch/2, PS5, and Xbox.

From my understanding, they explicitly disallow JITs so you can't just wrap your JS game with Electron / Node Webkit and use V8. I'm not sure if anyone has tried publishing a game using a V8-jitless electron fork - the sdks for consoles are under NDA so there's not really much written about it publicly & most games using Unreal or Unity don't deal with these things themselves.

PC, Mac, and even mobile are surprisingly easier here because you can just run the JS via electron or in a webview on mobile.

replies(2): >>46009490 #>>46009775 #
1. _james ◴[] No.46009490[source]
The official Nintendo 3DS and Wii U SDKs both provided an Electron-like framework that allowed games to be written with web technologies. I seem to recall that it was discontinued at some point before the Switch? The Switch does have a WebKit browser applet that games can call to display web-based content, but it's pretty limited since JIT is disabled like you say. I've only ever seen it used for e-manuals.