4 ms·
Did you port from Go to Nim by hand, or was it automated in any way? I thought that Go would be the last language I'd write by hand. Previously I wrote C++, wh
by shurcooL 12y ago
Did you port from Go to Nim by hand, or was it automated in any way?
I thought that Go would be the last language I'd write by hand. Previously I wrote C++, which was a dead end in that I could never use tools to parse it and translate to a new language. But with Go it should be much easier to do that if/when I ever decide to switch to something else.
The performance of the emulator in browser (compiled via emscrimpten) is very impressive! It felt like solid 60 FPS to me. I wonder how the Go version compiled via GopherJS would compare? Have you tried?
- def- 12y agoI did it by hand, changing the code as I saw fit and learning as much about the NES as I could. I haven't tried GopherJS, but I don't have much Go experience apart from reading it. On a related note, I read that porting the Go version to Android would be difficult and is still far in the future: https://github.com/fogleman/nes/issues/7 https://github.com/fogleman/nes/issues/7
- conradev 12y agoThere is also a NES emulator written entirely in JavaScript called jsnes[1] that would be interesting to compare to. The "solid 60 FPS" doesn't always translate to mobile. For example, jsnes runs fine on an iPhone 5S (64-bit processor), but stutters on an iPhone 5. [1] https://fir.sh/projects/jsnes/ https://fir.sh/projects/jsnes/
- Narishma 12y agoForget about mobile, it runs at like 5 FPS on my Core i3 laptop.