SurgeScript Scripting Language

Created on 2022-02-11T15:41:47-06:00

Return to the Index

This card pertains to a resource available on the internet.

This card can also be read via Gemini.

C# syntax but run by an interpreter

No object inheritance

Objects have one parent and zero or more children (implicit heirarchy)

Inheritance

No inheritance.

Behavior is composed by instantiating objects as children.

Tagging

Objects have tags associated when class is defined.

Can search for objects/children by tag.

Implicit state, ticking

Objects have an implicit "think" function which dispatches based on state.

Defined like this:

state "foo" {
   ... code to run each frame ...
}

Nim pseudocode for dispatch:

proc think*(self: Object):
   case self.state:
   of "some string":
      ... run code for some string ...
   of "another string":
      ... run code for another string ...