C# EMULATION CONTROL (For those who want all the frustration and joys of Twitch Plays Pokemon without Twitch.....and possibly Pokemon.)
For those who missed my other topic about the subject, an anonymous programmer created a way for Twitch users to interact using the Twitch chat and they've been trying to collectively play the first Pokemon game (to some funny results). You can click on the link to learn more about that.
After seeing that I said "I bet I can do that in C#!" and set out on a frustrating journey to get it to work. However, I'm happy to report that thanks to a guy on the Tech Life Forum for providing a quick IRC GUI client demo and to the Input Manager Library, I've managed to get it to work.
I'm providing a few different things here in this topic. First, I'm providing the IRC version of the project. It still isn't perfect but it does work 99% of the time now. Second, I'm providing a console bot version that randomly selects keys and attempts to play games on its own (no AI behind it, it's all random baby). Third, the source codes of both programs are included. I honestly don't mind if someone downloads these and improves them/gets them to work better (I would like at least some credit for starting this project though if you choose to do that). Fourth, I've included a few emulators that both programs are designed to run with. These are just the emulators themselves, no ROMS are included (and won't be included).
With all that in mind..
Let me tell you how to get it working.
SETTING UP THE EMULATORS
It's important to make sure the emulators are set up correctly. No matter whether you're doing NES, SNES, GBA or PSX, the keys are set to default like this:
ALL EMULATORS:
UP: up arrow
DOWN: down arrow
LEFT/RIGHT: left and right arrows
A: HOME
B: END
START: PAGE UP
SELECT: PAGE DOWN
GBA:
L: INSERT
R: DELETE
SNES:
X: P
Y: O
L: INSERT
R: DELETE
SEGA:
C: I
PSX:
L1: INSERT
R1: DELETE
R2: T
L2: E
TRIANGLE: D
SQUARE: S
CIRCLE: X
X: P
GameboyAdvance, BoycottAdvance, fceux, and ZSNES allowed me to include config files that should be set correctly. The NES emulator nester did not, so you will need to do that one yourself.
The IRC Emulation Control program now has the ability to change the key bindings to however you would like. You can read more about that later on in this thread. The Console Bot does NOT allow you to customize the key bindings (yet) so make sure they match the above.
IRC VERSION (currently version 1.6)
CONSOLE BOT VERSION (version 1.2)
FINAL NOTES
I remind everyone that this is really a rough release. I'm not trying to steal the Twitch pokemon guy's thunder or run a stream of my own (as I can't leave my computer on 24/7 anyway). If you can, great, feel free to edit the source code and get it to connect to your Twitch stream and try your luck. I just thought it'd be fun to try and replicate the idea and see if I could do it.
I'll also add that there's probably better ways to do certain things in the code. I'll be trying to improve it as I go along, should I continue this project. It's been a long time since I've messed with C# and I'm a little rusty. But it works regardless.
GITHUB
In case you want to look at the source code before you download the 7z files, which are next in the list, you can head on over here:
C# Emulation Control - Console Bot
C# Emulation Control - IRC Client
DOWNLOAD (contains both, Release 009 current)
Emulation Control – release 009 (contains version 1.6 of the IRC client and 1.2 of the Console Bot)
OLD RELEASES
VERSION UPDATES