How engge and Thimblewed Park starts!

1 minute read

The boot process

First thing first, engge use Thimbleweed park ggpack files, theses files are archives and contains all the resources: images, scripts, text files, music, sounds etc.

The first thing to understand is Thimbleweed Park use squirrel scripts. Actually it uses a modified version of squirrel, why ? Because this language lacks some useful functionnalities like:

  • script keyword
  • multilines lambda
  • rawsafeget method
  • optional while condition
  • else after statement
  • implicit boolean to integer conversion

OK let’s go back to how Thimblewed Park starts:

  • it executes the script file called Defines.nut, in this file there a several constants and macros defined
  • then it executes the Boot.nut script, this script does a lot of things, the most important part is the inclusion of all other script files like DefineSounds.nut, DefineRooms.nut and DefineActors.nut

When these scripts are executed, all the game is ready to start. The main function to start the game is called start: function start(do_opening) As you imagine if you call start with true as argument, then you will have the opening sentence played.

For engge, it’s a little bit different, the program checks first if the test.nut is present next to the executable and executes it, if not, it does the same thing as Thimbleweed Park, it will execute Defines.nut and Boot.nut scripts. This solution allows me to test my engines and start the game where I want.

test.nut example

Here is an example a script which allow to skip the opening and start the game with Ray in the main street:

include("Defines.nut")
include("Boot.nut")

inputOn()
inputVerbs(ON)
selectActor(ray)
enterRoomFromDoor(highwayMainStreetDoor)

Tags:

Updated:

Leave a comment