Spelunky Wiki
Register
Advertisement

Derek has stated he'll open source the code at some point. However, the complete source code can be extracted from any Game Maker game using the GM Decompiler, and is so complete that a new .exe can be generated from it. However, distributing such modifications without permission from Derek Yu is unwise since it would be a copyright violation.

Extracting the source code

  1. Run the GM Decompiler to extract the .gmk file.
  2. Use either the trial version of Game Maker, or LateralGM, to view the .gmk.
  3. If you're interested in only a text version of the scripts:
    1. Scripts > Export All to export all non-object code
    2. Edit > Show Object Information > Save Button > File Type = Text to export all object code

Debug mode

The GM Debug Mode Enabler can be used to start any Game Maker in debug mode, which allows you to modify any in-game variables. This can allow unlimited cheating, but it's also useful for exploring unused items.

Unused items

Some items are mentioned within the source code, but aren't yet available in-game:

  • Jordan shoes
See 'global.hasJordans' in the source code. This can be set via debug mode, and has stronger effects than the spring shoes. It's not apparently available in-game.
  • Ninja suit
See 'global.hasNinjaSuit' in the source code. Setting this in debug mode has no effect.

Object names

It has been suggested to name enemy/item/etc articles on the wiki based on the most public declaration by Derek Yu. In-game mentions, changelog mentions, and forum mentions are all preferred. However, sometimes the only name given is in the source code. The source code name should be considered the last resort, because sometimes source code names differ from their official public name (e.g. the Hedjet is known as 'oCrown' in the source code, but clearly says "you got the hedjet!" when you pick it up).

There is an easy way to tell what objects are named in the source code. Start the game in Debug Mode. Do Watch>Add, and paste this in:

object_get_name(instance_position(mouse_x,mouse_y,all).object_index) + string_copy("",window_set_cursor(cr_default),0) 

Now the debug window will display the name of any object that you move your mouse over.

Advertisement