objects/oGame/create.gml
From spelunky.gmk, Spelunky Classic 1.1's source, © 2008, 2009 Derek Yu and Mossmouth, LLC, shown whole under the Spelunky User License v1.1b. Extracted by spelunky.ai's tools, an unofficial fan project, one file per script or event; the // ==== lines are the extractor's, naming each action of the event. Some scripts are others' work that Derek Yu credits in the source's readme.txt: Martin Piecyk's platform engine, ChevyRay's view scaling scripts and tsg1zzn's Super Sound System.
oGame's create event, 27 lines of GML.
// ==== action 0: lib 1 id 605: comment: Create Game ====// ==== action 1: lib 1 id 603: code ====drawStatus = 0;moneyCount = 0;globalvar debug;debug = false;global.ghostExists = false;damsel = false;idol = false;altar = false;// Black MarketgenClothingShop = false;genBombShop = false;genSupplyShop = false;genRareShop = false;genWeaponShop = false;if (instance_number(oGame) > 1) instance_destroy();moveableSolidGrav = 1; // how fast moveable solids should accelerate downwardstime = 1;// sound_loop(sndMusicTest);if (global.gameStart) scrInitLevel();