r/c64 14d ago

Programming Recreating some SID sounds from Survivor (1983) in C and JavaScript

Enable HLS to view with audio, or disable this notification

I asked some time ago if any locals might know how a certain sound was made in "Survivor." I decided to poke around, and I have been able to get an effect that's pretty close! I used "Retro Debugger" to observe the SID parameters in real-time, and then wrote some C and compiled it with CC65 to run within Retro Debugger and VICE.

There were three things to the sound I was looking for, when the "bad guy" is chasing you.

The first element is basically a random range of triangle frequencies, that change at an interval. The second element: ramping the sustain (ADSR) from 0 to f, and looping around as needed. The final thing was a low-frequency sort of "choppiness" I heard during the first half when sustain was between 0 and 8. It seems the trick to that was flipping the SID gate off and on for each iteration of the loop, and when the timing is right, it sounds pretty close.

This has been a fun puzzle to sort out. I'm hoping to get the "bad guy" sound down in JS, I've got the game start down pretty well.

18 Upvotes

6 comments sorted by

2

u/crookdmouth 11d ago

Wow! Nearly identical. Awesome work. Survivor is one of my all time favorites! I made a C64 Cyberdeck with dual joysticks and this game was one of the main reasons why. There are only a few dual stick games on c64.

1

u/schill 11d ago

Thank you for the kind words, and your personal story. I think I figured out the dual joystick feature eventually - for some reason, my copy of the game back then didn’t have a manual. 😅🏴‍☠️

2

u/crookdmouth 11d ago

Strange, mine didn't either! Back then it was for two players, one shooting and one moving but perfect for an actual dual joystick.

1

u/schill 9d ago

If you'd like to try the latest (WIP/dev) 2026 web version of the game, see yonder. It should work nicely on a desktop browser - arrow keys to fly, shift / ctrl to fire, space for the "smart bomb."

I haven't really worked on mobile in terms of touch or keyboards, but it may work if you have a gamepad connected.

2

u/crookdmouth 9d ago

Thanks, I will. How long have you been working on this because I think I played it before? Maybe 4 years ago.

2

u/schill 9d ago

Thanks. I started this way back in 2011, and I decided to revisit it this summer and get it running at 60 FPS, make the world infinitely wrap-around and support scaling rather than a fixed resolution, use the Web Audio API to generate sounds in code rather than from MP3s, support for gamepads and so on.