wasmboy icon indicating copy to clipboard operation
wasmboy copied to clipboard

Multiple instances

Open JSH32 opened this issue 3 years ago • 2 comments

According to the lib documentation, WasmBoy is a singleton. Is there a way to create multiple instances of a Gameboy emulator?

JSH32 avatar May 14 '22 20:05 JSH32

@JSH32 Hello! My apologies for the late reply, I recently started a tech break, so I took a week or so away from Github 😄

But yes! WasmBoy is a single ton, your best bet to create multiple instances, is to use WasmBoyLib directly, to create your own WasmBoy object: https://github.com/torch2424/wasmboy/blob/master/lib/index.js

I was actually thinking of making it not a singleton, so hopefully whenever I get the time to pick this project back up, I'll go ahead and do that 😄

torch2424 avatar May 22 '22 21:05 torch2424

Seems that its just binding everything to WasmBoyLib and that its also a singleton... Ah I see the factory is the actual class

JSH32 avatar Aug 23 '22 00:08 JSH32