Speedrunning has always been a common interest within our group. The high skill and precision exhibited by the runners has always been a joy to watch. Despite being interesting to watch, we felt that speed running would benefit from a more competitive feel, similar to Mario Kart. Seeing your enemy adds to the exhilaration and tension of the run. Thus, we have created a modified emulator which allows you to see your opponent in real time, and race against them in the same world.
What it does
Speedfun examines specific memory addresses within the emulator to deduce information like player position, state, and map. This information is sent across a WebRTC connection to your partner, where it is used to render the competing player. You can create or join another person's lobby, and compete against them in real time. The system will take care of declaring a winner and loser automatically.
How we built it
Challenges we ran into
It was challenging to find specific memory locations for player position, as many ROMs are poorly documented. We had to manually check numerous addresses in a debugger to find the right ones. Additionally, we found the WebRTC api to be initially somewhat confusing, however the service Peer.js made it quite easy.
Accomplishments that we're proud of
As always, we're thrilled to even finish the project in time, especially since there were so many moving parts. It was our first time using Emscripten, so that was cool.
What we learned
What's next for Speedfun
We'd like to introduce a recording feature, a leaderboard, and add support for more games.