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 Support me

41 thoughts on “Introducing: Spelunky SD!

  1. Pingback: Classic version of Spelunky has received a mod that lets you play online co-op multiplayer and it’s also free. via /r/Games | Why are we here?

  2. Pingback: Spelunky SD Mod Adds Co-Op To Free Original Version | Rock, Paper, Shotgun

  3. Pingback: Original Spelunky gets online co-op mod

  4. Shops seem to be significantly broken. There’s no way of learning how much something costs, you can’t pick something up without automatically buying it, and if you don’t have enough money you can’t pick it up at all.

    • When you pick up an item in shop (by picking it up from ground, not pressing `buy` key), price will be shown. This is how it always worked in Spelunky Classic.

      • Apologies; the key mapping throws me off and I’m guessing I had one of the picking up keys double-mapped to buying.

  5. Pingback: Revisit Spelunky Classic with Two-Player Co-Op Mod |

    • Were you able to test this in multiplayer and was it working correctly, if so? I’ve heard from someone that use of Wine (presumably on Linux) resulted in poor performance in multiplayer.

      • I was using this on linux with wine, and it works very well. I also tried to play online with a friend, and it works again! Stable FPS, all works as needed.

    • Haven’t heard of GGPO until recently. I was considering use of Kaillera (which, apparently, is also at heart of GGPO), but the library is closed source, and the forums seemed inactive (while as of writing this they are filled with spam), so I have decided not to risk working with something that it could be hard to get support for if I get stuck.

  6. Pingback: SpelUNky diventa SpelDUEky! (... brrrr ...) · Gioca Giuè

  7. Hello, Great game soo far playing it my friend all day :D. But the controls are not, they are terrible for me. Like is there a way to play it with a normal controller? It would make it a lot easier for me

    • There currently isn’t built-in gamepad support (since I need to migrate related code to use current versions of functions), but you should be able to use a program like Joy2Key for gamepad controls until then.

    • I might release source at some point. There’s still a lot to do both in terms of functionality and clean-up.
      If you are asking for purposes of integrating some other mods into it, I do have a plan on how to permit that without requiring people to figure out how my changes to the game, but I’m not sure when I’ll have time to do that.

  8. Pingback: Superlicious | Superlevel

  9. Pingback: Yet Another Spelunky Mod Update 1.8.1 | I SPOTTED THE CAVE'S ENTRANCE

  10. Hi do i have to install the mod into the original game files or something, because when i start it on its own it doesn’t start up and i get an error report. The same thing happened when i put the files into the original games folder. Is there something i have missed?

    • No, mod just has to be unzipped into a directory of it’s own. What is the error that you are getting?

  11. Is there any way to remove the ghost from the game? I mean its all great and fun to explore with a friend, but the ghost appearing after just 2:30 makes it very annoying :/

    • Yes, if you enable cheats (/cheats), you can just do
      /remove ghost
      Or you can set up a command queue to do this automatically:
      /qadd noghost
      /qpush noghost delay 4500 remove ghost
      /qauto noghost

      (that’ll also take enabling cheats)

  12. Congrats on the game! Works really well. Been playing with a friend for weeks.

    Works perfectly fine under Wine, no tweak required! Really cool!

  13. I can’t really understand some of the key changes. Using space instead of up arrow to enter doors seems a bit strange, and I seem to fail entering doors for a while everytime I encounter them. I would just bind it with uparrow, but it’s coupled with buying for some reason.

    Much more infuriating is not having a running button but instead having running and attack coupled together. The only way to run while carrying something now is to pick things up and keep the button pressed indefinitely. Since running is something you need to do repeatedly and throwing is something you don’t want to do mostly, it seems broken to couple these.

    • “buy” key is used for entering doors since using “up” meant that it was impossible to climb a rope in front of door without entering it. Spelunky HD also does the same. It is generally better to remap it to some other key (personally I prefer [V]), as multiple keyboards do not allow to press two arrow keys and spacebar at once. You can also technically hold the buy key to exit as soon as you touch the door.

      As for running, there’s still a running button (Shift by default). It’s button #8 for /remap command. The “attack to run” thing is from original game, I’m not really sure if anyone uses that.

    • Ok then, then you need to update your readme, since it said nothing about running! Thanks for the info though. Played some rounds with a friend and introduced her to the game this way, she enjoyed it.

      Tunnel man skin didn’t seem to work, when I tried that (/style tunnel) it just made me the regular spelunker.

      • Style for tunnelman should be “/style tunnelman”. ReadMe is improved a fair bit in the upcoming update (snippet) – should be out sometime soon (once I’ll have enough time to finalize changes/additions).

  14. Pingback: Starting All Over Again with The Binding of Isaac: Rebirth | Everybody's Talking at Once

  15. What do you use for online? I am working on an online game in GM:S and I use a third party server right now.

    • Current version uses FaucetNetworking for multiplayer. I’m planning to migrate it over to built-in network_ functions, but porting is a fair of work.

  16. I tried for an hour with a friend to play online . But I can’t, I do not understand the procedure to follow. Which IP must be enterred when you are in join ? The IP of the hoster or the other ? Please. Every time it said failed to connect.

    • IP of hoster, this is a pretty standard procedure for such games. They may have to open/forward a port on their router for you to be able to join. If they can’t, you can use some program like Hamachi or Evolve to simulate a local network connections (thus eliminating the need to open ports; you’ll need to use “local” IP provided by the program).

  17. Pingback: Cooperativa a due giocatori per Spelunky Classic grazie a una nuova mod |

    • Not at the time, there’s still a lot to fix in source for readability and editability. I have a separate idea that would allow small tweaks (e.g. level generation or custom minigames) to be implemented without touching source at all, but I haven’t got to that just yet (still need to migrate multiplayer to new API for gamepad support and Mac/Linux builds).

  18. Pingback: Spelunky Classic Gets A Two-Player Co-Op Mode | Time to game

Leave a Reply

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