
I'm currently developing a game with a Node.js engine, and I'd love to add support to the Wii U GameCube Adapter. At first I thought of using the HTML5 Gamepad API, but the support on Chromium is bugged and it won't detect the analog stick and the C-sticks (axes are null for some reason). I made a bug report about this issue on Chromium's issue tracker, but it seems like it's going to slip through the cracks...
So I decided to make a Node.js addon with C++ using Dolphin's source as a code base to start. But I've come by a bunch of problems.
This article and this one from the Node.js docs should be more than enough to explain the process and the quirks of writting Node.js native addons with C++.
I'd really appreciate some guidance on understanding the code for the adapter's implementation.
So I decided to make a Node.js addon with C++ using Dolphin's source as a code base to start. But I've come by a bunch of problems.
- Firstly, let me clarify that my knowledge of C++ is quite low and a bit rusty, but I know at least most of the basics (classes and inheritance, basic usage of pointers, structs and a bit of method hiding/overloading)
- Because of that, I'm having trouble understanding some of the code (particularly threads), and how Dolphin actually reads the input and outputs it, once the adapter has been added.
- I'm not sure how exactly will I make the connection between the C++ code and the creation of the Node.js addon, since in order for it to cause an effect in Node.js, it must output object types that the V8 JavaScript engine understands (say, v8::Number for double values), apart from other quirks. Also, Node.js uses libuv for threading, which makes me wonder if I should use Dolphin's implementation of threads or libuv's.
This article and this one from the Node.js docs should be more than enough to explain the process and the quirks of writting Node.js native addons with C++.
I'd really appreciate some guidance on understanding the code for the adapter's implementation.