lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


I've found this today, while browsing http://news.ycombinator.com

It's a GameBoy Color emulator in JS (haven't tried it yet)

http://www.grantgalitz.org/gamecenter/index.html
http://news.ycombinator.com/item?id=3446871

http://www.hnsearch.com/search#request/all&q=Gameboy+emulator&start=0



On 1/7/2012 10:54 PM, HyperHacker wrote:
I'm interested in writing some emulators in Lua. Specifically I want
to write a Game Boy emulator and maybe later some other game consoles
as well. However I've heard the topic discussed before, and people
mentioned that Lua isn't really ideal for emulation (impressively fast
as it is) due to being bytecode and weak-typed, and LuaJIT even isn't
very good at optimizing emulator cores since it can't tell what
they're going to do next. Would I be insane to write an entire
emulator using Lua? Any tips to make it nice and snappy?

PS, I realize Game Boy only runs at 4-8mhz and just about anything
will probably be "good enough" on modern hardware. I want it to be as
fast as possible because A) I might try to emulate more powerful
systems later, and B) I'd like to be able to run the games at insane
speeds. The main reason for that being movie playback: by recording
the initial state and all inputs, and playing them back again, you can
create a "movie" file for a game. Of course the only way to jump to a
specific spot in such a recording is to play through it up to that
point...