Loading
Dev Blog: Project Moldering

One of the first things I want the player to see when they start up Moldering for the first time is a cut scene. A cut scene after all is a list of scripted commands, so I figured I’d take a modular approach and create my own simple scripting language. This was pretty exciting to do. Now I can define scripted events in external files and load them in on the fly. Here’s an example of what the Moldering Scripting language looks like. Surely it will evolve as it grows to encompass more complicated commands:

#START player
control 0
move_right 30
//comment delineation
jump 70
jump 290
stop 400
#LOAD 400 intro02.ms
#END

Here’s a breakdown of the commands. It should be pretty clear, but leave me a comment if you have any questions:

//comments are delineated with "//"
#START <objectToActOn> (ex: player)
control <timeToWait>
end_control <timeToWait>
move_right <timeToWait>
move_left <timeToWait>
stop <timeToWait>
jump <timeToWait>
#LOAD <timeToWait> <file_name_with_no_spaces>
#END

I’ll be sure to keep the list of commands updated as I go along, so down the line it can be used in conjunction with the level editor by people other than me.

-James


blog comments powered by Disqus Bookmark and Share