Introducing: Spelunky SD!

If you've been following me on the social networks, you may already know, that for the past three months I was working on a Spelunky Classic modification called Spelunky SD. It is a pretty broad project, implementing a number of fixes and improvements to the original game, and, most importantly, adding a 2-player cooperative online game mode.
Today, I am proud to announce the first public release of this project.
And this is a blog post about my experiences.

Long story short

If you don't feel like reading through this somewhat lengthy post about my experiences, here's a brief summary:
I've made this mod. Making it was hard. But in fact it's pretty cool. It also adds a bunch of things that weren't there. You can get it now for free (and it doesn't take a lot to get running).


As silly as it sounds, this project has started somewhat... spontaneously. Since the late 2013 I am experimenting with small online multi-player games. This involves several solo and collaborative projects, one of which is `Color Ninjas`, that I'm making with Max (@insweater).

In one of discussions, we recalled about several of our attempts to play local multi-player games (including Spelunky HD) over TeamViewer. Not to say a lot, but that doesn't work if participants are located in different countries. Precisely, even average (200ms) round-trip times result in having almost half of second input latency, which, basically, means that you are not going to play any real-time games efficiently.

Later it was noted that original Spelunky Classic is open-source, and how some of my approaches to online multi-player could work for it too. With it being late Friday night, I've said that I'll look if I could plug in some basic support over the weekend.
Least did I know what that "over the weekend" will turn into.

The art of underestimation

Perhaps a surprise, but online multi-player was smallest amount of work to do, taking about 5 days (along with the most basic tweaks to have the game running in GameMaker: Studio).
What I did not consider, was that socket and packet wizardry is not the only obstacle for a game transitioning from strictly single-player to online multi-player.

To take a pause here, this isn't the first time that someone tries to add multi-player support into Spelunky Classic. Over the years of game's existence there were multiple attempts. Mostly devastatingly unsuccessful. The best I've found did somewhat work when testing locally (hinting that it could work on local networks), but would completely glitch out when attempting to test over internet. And, of course, it did include a small but most important flaw that became a stumbling stone in my own work.

As I have already mentioned, the original game is single-player. There's only one instance of player, and game does it's best at working with it. So, what happens when you add another player? Nothing considers it. Enemies will not chase the second player, traps will not trigger, and overall it will seem that second player is merely a ghost or a product of imagination.

Another thing that I did not consider was migration bugs. Migrating source over two major versions of the program is already no easy task, and, while I wouldn't say that game is poorly written (neither it is possible to foresee all possible changes to the development tool), after being migrated over to GameMaker: Studio, in some cases the code would behave slightly unexpectedly at best.

Dealing with these two things included changing thousands of lines of code, and spanned several weeks. Somewhere in the process I've also posted this tweet, which, to my surprise, actually gained a fair of attention, certainly helping morale as well:

Another thing to morale was constant testing, which, due to newly gained online multi-player nature of game, was actually also pretty entertaining. Game sessions would last for hours, with bugs being written down and fixed every day.


Somewhere by mid-April, the game did work considerably well. It would no longer randomly crash under odd circumstances, population of bugs took a huge hit, and was generally quite alright.
What was my mistake then, that I have tried to reach out to several people that I would like to see playing my modification, and that could probably suggest things that could be changed to make it better.

So I've sent messages and waited. I wouldn't say that any of people contacted were ultra-large figures, and I did have responses to all of my messages, but process of waiting was dreading.
What is it to check mail, timelines, and activity feeds every morning only to find that seemingly nothing happened about your work?
That hurts the morale, and sparkles some thoughts about whether you did something wrong, or overlooked some crucial flaw.
Perhaps a response most reflective of situation was

I'll get to it, eventually.

"eventually" is a wonderful word. As it is said, aeons and aeons afar, the last stars will burn out, and the universe will submerge into it's last, endless night. That might happen. Eventually.
The context here is though, that people are busy.
Even ones primarily doing gameplay videos or streams have schedules, and in some cases might not even play any games "outside" the recording times.

In the end I'm not even sure if any of people that I've asked did eventually get around to playing the mod, but with all this waiting there were two weeks where I've made close to no progress.
On the bright side, project received sufficient testing from people I know and few that did contact me about it. Some are more known, some aren't, but it was all great help.

Doing it right

Getting the mod done is a good thing, but a separate question is - what makes it better?

Well, what does not make it better, is bugs. So I've fixed "some" those. Bugs from the original game, bugs left from migrating the game from single-player to multi-player, undefined or unforeseen behaviours...
overall there are now fewer situations where something would go weirdly.

Then there were also the gameplay tweaks. Some of these are more apparent (like sounds fading off-screen or enemies "blinking" when about to get up), while others remain transparent (such as game being slightly more forgiving on input precision), but these sure add some missing bits to game.

Then there's cooperation. As for a mostly-cooperative game, being able to interact with the other player matters. You can carry the other player around, throw them over (or into) the obstacles, share items... of course, cooperation is not required, and players can just selfishly run around on their own, but there are some options.

And for when you're done with the game, there are mini-games (all of which work both with one and two players), game modes, and endless chat commands for changing the way levels are played or just messing around.

Overall, things should play and feel quite better now.

Looking forward

And so, that's it.

Of course, there are still more things that I would like to add to this.
It would be nice to allow the game to support more than two players.
It would be nice to have a PVP mode (akin to Spelunky HD).
It would be pretty great to get level editor and level sharing back in, as well as some other forms of extensibility (to let the fun last even longer).
Although right now a semi-distant dream, it would be great to have this work on Mac and Linux too (and maybe something else as well).
And lots of other smaller things that matter.

Perhaps these will get done. The time is always hard to find, but I might get to it.

Get the game GameJolt page

Related posts:

52 thoughts on “Introducing: Spelunky SD!

  1. I cant seem to play the online for some reason
    I’ve searched far and wide but i cant find tutorials on how to play online
    I put in my friends Ip address and i put in the port which was 7777 and the password so why didnt it work and trust my i double checked the IP address so please help

    • Your friend likely has issues with their firewall or port forwarding – you can find a plenty of websites that can help you check if a port is open

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.