Post subject: JavaScript for advanced memory watch
MarbleousDave
He/Him
Player (12)
Joined: 9/12/2009
Posts: 1555
What if we were to use JavaScript for memory watch? In games like The Legend of Zelda, displaying Icons for whatever items you have in your inventory through a display table instead of an 8-bit integer. Super Mario Bros. 3 would be the same thing, but less complicated. One big thing would be Pokemon. Having the Pokemon's picture displayed, Experience shown as a 24-bit unsigned integer, name of Pokemon, stats, EV's. IV's as a 16-bit hexadecimal, PP using the modulo method, etc. Also, there are games with not all things displayed. This would be helpful on games like Metroid such as whatever items picked up at wherever. Super Mario Bros. displays the lives on the "get ready" screen. Adventures in the Magic Kingdom has the timer in the pause screen. Buzz & Waldog / Koko Adventure has the status displayed when paused. Using text tables and icons for memory watch instead of just values will make the experience greater. Should we implement JavaScript into the emulators we use, or stick with the old Lua scripting?
Editor, Skilled player (1404)
Joined: 3/31/2010
Posts: 2086
What exactly does JavaScript do that Lua doesn't?
Site Admin, Skilled player (1236)
Joined: 4/17/2010
Posts: 11271
Location: RU
Hey guys! I just took 3 kilograms of JavaScript and I was able to watch 70 times more memory than with LUA! LUA sucks guys, we must start drinking JavaScript if we want accurate emulation once and for all, otherwise the RTA community will obsolete the SMB run am I right?!
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.
Player (42)
Joined: 12/27/2008
Posts: 873
Location: Germany
This would be like using a cannon to kill a fly. The main problem is that, in comparison to Lua, JavaScript engines are usually very optimized and thus are huge chunks of code that take hours to compile. In the end you'd have a huge JavaScript engine that needs to be recompiled every time you need to change some functions, and that takes longer to compile than the rest of the emulator. Besides, everything you suggested to implement can already be done in Lua. Unless there's some great library for TASing that's available only in JS, there's zero reason to change it. Choices of language are done for a reason. In the case of Lua, it's because it's lightweight and easy to embed in small applications. To have people take your suggestion seriously, you need to at least point out a JS engine that's small enough to put into the emulators without lots of trouble...
Amaraticando
It/Its
Editor, Player (158)
Joined: 1/10/2012
Posts: 673
Location: Brazil
Also, implement the whole document object model and put it on the emulator. Together with V8, it would look like a web page. The game screen would be a simple canvas in a much bigger environment. The script UI would be much better, like you can easily create a dialog with the user, capture mouse clicks only when it is onto en element, etc...