EmuLua Netplay Core (Test 1)

Channel:
Subscribers:
1,570
Published on ● Video Link: https://www.youtube.com/watch?v=1tSKno0lyTM



Duration: 3:25
1,201 views
7


Not finished at all, but here's a test video for you to oogle at.

This is basically a netplay engine written in Lua for use by emulua-supporting emulators. Plans include having a "repeater" (input on one is sent to another, for lagless "watch me play this crap" sessions), actual netplay, and possibly savestate support, depending on how those are handled by the emulator. (If I can get a raw bytestream, it's possible.)

The nice thing is that this is pretty portable, as shown from the prototype FCEUX-to-VBA video earlier. The idea is to hide all of the real code in the "core", leaving some basic implementations to the actual frontend.


The mechanics behind this video are simple; I wrote a simple server that simply listens to 7845, and simply repeats any data it gets. The protocol this uses just waits for a response packet (FF000000) and starts barfing frame input at each other.

The frame delay here was 6 frames (100ms) ... The reason it's kind of stuck here is a nasty bug in FCEUX's joypad.get(), where I can't read the player's input if I force it to something else. Since you have to delay the local player's keystrokes, too (so that the remote player can get them at the same time), I had to disable local delays to get this to play, which is why they players aren't synced up.

And yes, it really says "Let's do this" all of the time. That was some debug output I forgot to remove. Again.







Tags:
fceux
fceu
emulator
emulation
rom
nes
lua
jackal
netplay
xkeeper