Josh1billion
CAGiversary!
- Feedback
- 7 (100%)
Over the past week, I accomplished something I've been wanting (maybe needing) to do for a while: setting up a complete scripting system to use in my games. Not for scripting the logic of each entity in a real-time game, but for things like cutscenes, NPC actions in RPGs (what they do when the map is loaded, what they do when you walk up and talk to them, etc.).
It consists of two scripting languages: a C-like language for writing the scripts, and an Assembly-like language that it compiles into. The former is for me to write, and the latter is for the game engine to read. I wrote a compiler, based on a project I had to do in college, which compiles between the two, and an interpreter that the game uses to execute the Assembly-like code. Writing an interpreter for a C-like language would have been much tougher, but interpreting a language that just amounts to a set of sequential instructions is easy, hence the compilation process.
It also supports continuations, which are pretty crucial and a big reason why I didn't go with something like Lua.
Beyond that, my whole month has pretty much consisted of composing music for my current project and learning a ton of [basic] music theory in the process. Seven songs down, and somewhere around five left... might still have to go back and change some of them later, though. Suffering music burnout right now. :X
It consists of two scripting languages: a C-like language for writing the scripts, and an Assembly-like language that it compiles into. The former is for me to write, and the latter is for the game engine to read. I wrote a compiler, based on a project I had to do in college, which compiles between the two, and an interpreter that the game uses to execute the Assembly-like code. Writing an interpreter for a C-like language would have been much tougher, but interpreting a language that just amounts to a set of sequential instructions is easy, hence the compilation process.
Beyond that, my whole month has pretty much consisted of composing music for my current project and learning a ton of [basic] music theory in the process. Seven songs down, and somewhere around five left... might still have to go back and change some of them later, though. Suffering music burnout right now. :X
Last edited by a moderator: