Post subject: TASing through a web browser with asm.js
Joined: 1/26/2009
Posts: 558
Location: Canada - Québec
Few month ago, I watched a talk about the birth and death of javascript, that introduced me for the first time to asm.js and I thought we could still wait a while before anything awesome happen. Then, recently I saw the Humble Bundle can play games natively from the web, here. I guess they use a minimal OS with a light version of their game, so it can get a decent FPS. Also, there's a project called jor1k, that can run linux and ScummVM with a demo of Secret of Monkey Island, The(without sound). At this rate, I think asm.js might become a huge deal in the future. So what do you guys think? If this isn't impressive, then I have at least some question: Does fceux or any emulator be compiled and then run under asm.js? Could asm.js be a better alternative to run DOS games instead of jpcrr? Do you think a there's a way to record an input file directly on the asm.js canvas? I remember we alway had some sort of issue when trying to TAS through a virtual machine. What are these issues and do you think they may still apply on asm.js? In any case, there is certainly some performance issue at the moment when trying anything big, but this is certainly something I'll keep looking foward too.
Site Admin, Skilled player (1255)
Joined: 4/17/2010
Posts: 11495
Location: Lake Char­gogg­a­gogg­man­chaugg­a­gogg­chau­bun­a­gung­a­maugg
I request that this topic is moved to Labs.
Warning: When making decisions, I try to collect as much data as possible before actually deciding. I try to abstract away and see the principles behind real world events and people's opinions. I try to generalize them and turn into something clear and reusable. I hate depending on unpredictable and having to make lottery guesses. Any problem can be solved by systems thinking and acting.
Post subject: Re: TASing through a web browser with asm.js
Joined: 7/2/2007
Posts: 3960
BadPotato wrote:
Then, recently I saw the Humble Bundle can play games natively from the web, here. I guess they use a minimal OS with a light version of their game, so it can get a decent FPS.
I admit I haven't actually looked into this, but my guess is that these games were all built using a game engine, like Unity or UE4, that has the ability to build to an HTML5 build target (much like many engines can build to Windows, Mac, PSP, etc. targets). No idea how much Javascript is involved.
Pyrel - an open-source rewrite of the Angband roguelike game in Python.
Post subject: Re: TASing through a web browser with asm.js
Player (146)
Joined: 7/16/2009
Posts: 686
Derakon wrote:
I admit I haven't actually looked into this, but my guess is that these games were all built using a game engine, like Unity or UE4, that has the ability to build to an HTML5 build target (much like many engines can build to Windows, Mac, PSP, etc. targets). No idea how much Javascript is involved.
Super Hexagon is C++ with SDL. I think they're doing something pretty nice here.
endrift
Any
Emulator Coder
Joined: 12/14/2014
Posts: 161
These projects usually use emscripten, which will basically compile C/C++ and SDL down to JavaScript/ASM.js. However, there are several native JS emulators too, including ggalitz's GameBoy Online and IodineGBA, someone made N64js, and I made GBA.js (although GBA.js is very inaccurate and I would need to backport a lot of fixes before I'd recommend anyone using it for anything serious). But if you want the existing tools...it might be possible. Things that use multiple windows I'd imagine aren't friendly with the system, though, so the UI might need to be reworked entirely.
MESHUGGAH
Other
Skilled player (1919)
Joined: 11/14/2009
Posts: 1353
Location: 𝔐𝔞𝔤𝑦𝔞𝔯
I've semi dived in to this topic and checked a few things. I don't see any benefits of tasing through a web browser. Answering OP's questions: 1. Yes, you can compile them and run it in asm.js but not with a single click, some things requires modification (or usage of emscripten plugins). 2. Totally depends on user's perspective. A program won't work faster/better/easier just because you can open it in your browser. 3. There are many ways to save data but AFAIK the most convenient one is using an online (cloud) storage. The program won't have access to the file system, so you either need to use HTML5 local storage, chrome indexeddb or the classical "save to notepad". Also note that for android devices the performance is... bad. So far. edit: "I remember we alway had some sort of issue when trying to TAS through a virtual machine." - those problems are about emulating specific virtual machines (kvm for j2me). asm.js/emscripten has no impact on this.
PhD in TASing 🎓 speedrun enthusiast ❤🚷🔥 white hat hacker ▓ black box tester ░ censorships and rules...