- BlackFire Script Langauge
- BlackFire Script Language
- Command Tree
- BlackFire Graphics System
Welcome to the first in a series of posts about the new BlackFire Script Langauge. BSL will be a form of configuration files that will used in BlackFire. Based on XML BSL will allow me to quickly change the entire game engine without modifying any of the code. Over the next couple of days I will explain how the system will work starting today with an basic introduction to the how I thought of the system.
BSL started out as nothing my first iteration of my program relied on no configuration besides items, quests, and other data heavy objects. As a software engineer I always strive to make a system highly reusable meaning anything I wrote that could be used in multiple places should be. Single item class highly reusable among many items. Need an item to be equipable add an equip wrapper around the item so that it has the extra methods and data without having the recreate the item properties. This is how I thought and as I went through the system evaluating what I had done I came to a realization.
My system was limited if I had wanted to change a part of the ui or a part of the backend I had to manually code a change even if it was a simple thing. I began to wonder what if I wanted to add a new ability like jumping or some kinda of odd ability that just wasn’t there to begin with. What if I wanted to quickly change how exp was calculated or even armor. Would I have to go into the code and change these variables? Would I have to code in new classes to handle different tasks?
It was all very limiting but at the time how else would I be able to correctly handle different events. This brought me up to about the version right before the current one of BlackFire. My idea changed when I decided to use a command pattern in my engine. Thus my communication system greatly changed which is what you saw with the most recent version.
To those that don’t know command pattern is basically a chain of objects. An event happens and is sent to the first in the chain. The event flows down the chain until it reaches one of the objects in the chain that can handle it and execute its request. This is nice because you can simply add requests to the end of the chain and thats all you don’t have to handle updating anything else. The event associated by that task will float through the chain hit the new object you added and be executed. This is great because it offers high modifiability. This system was easy to implement in a matter of seconds I have save, equip, load, and many other commands in the tree and events were flowing to them and executing properly.
That was the last update for awhile and after that I lost my computer and was also deeply working on my book. Fast forward a few months and BSL is thought up, the idea orignally started as moving the command pattern system to everything. I was gonna use it for animations so that I could add new animations to enemies etc… Then I moved the idea to the ui so that I could dynamically create new parts of the UI. This continued until I got to the parser upon thinking of the design on parsing item files I inheritly saw an idea. As it stood Command pattern relies on all the objects knowing about each other but that in itself required more hardcoding. If I could create a configuration file that told it what configuration files and where then it would be much better.
Thus BSL began at first only configuration files it soon florished into a full fledge Script Langauge in which I could modify and create new commands directly from xml without the need to code different different commands. This carried over to everything. Want to link an animation to a command no problem just link them in the script langauge. Now whenever a command is executed the animation appears. Continue it further link items to commands to animations the possibilities were endless but that is it for now more on this in future parts of this series!
Thats it for now and thanks for reading.

