As the summer comes to an end, as does my progress on the Scenario module for Terasology, at least as part of GSOC. Below is a summarization of all of my work through out the summer.

Final Results

I created a system that allows for creation of Scenarios within Terasology. These scenarios are able to have logic programmed into them, from within the game. Scenarios can be programmed similarly to an old-school game maker with triggers, editing their events, conditions, and the resulting actions. Along with the module I constructed tutorials that will allow for future development of Scenarios and for development of the Scenario system itself. The bulk of the work was based around setting up a system that can very easily be added to and naturally does all of the hardwork of addition of new trigger elements. More information about the Scenarios and the aforementioned tutorials can be seen in the overall readme of the Scenario github repo.

Actual Work

The bulk of the work on this module/repo was completed by me for GSOC. In addition the Scenario module was utilized by a fellow student’s, Nihal Singh, project(Which is described here in order to assist in development of their exploration world for creation of protected regions.

The work that completed included about 10,000 lines of code over 34 commits, and that’s only the work that was completely polished, it doesn’t include all the progress made along the way. The code work done is in a pretty much fully polished state that includes full documentation, with full tests within both single-player and multi-player environments.

alt text

Specific PRs

This is a list of the PRs that I completed, that are usually the “main topics” of each section of work that I completed, along with a short description of what was completed with each PR.

1 - Basic hub tool This PR includes the setup of the initial hubtool and allows for very minimalistic addition/deletion of events/actions(which are purely placeholders)

2 - Basic event system, Expansion This PR implemented a very rudimentary event system, was setup with enums and was not very robust or easy to add to. Expansion of the treeview in the hubtool was able to be saved that only allowed one hubtool and no real management from other locations

3 - Movement of Nodes This was a small PR that allowed for movement of nodes on the treeview system that stopped them from deleting themselves or putting themselves in incorrect positions

4 - Basic Parameter editing With the introduction of this PR it becomes possible to edit constant strings and integer values which are utilized in the actions. With this PR actions were converted into the more proper entity structure that would eventually become the final solution that was very easy to manage and develop for in the future.

5 - Review work This was the first PR that introduces the recursive structure for the parameter editing that will eventually allow for everything to be easily created using prefabs and done in a text file, letting the system do the bulk of the work.

6 - Event/Conditional work Events and Conditionals were reconfigured to use the aforementioned entity structure that allowed them to be edited using the logic and parameter editing windows.

7 - Further Conditional work Conditionals start to have actual conditionals that are able to be used, also includes a fair amount of bug fixing and ease of use for user interaction.

8 - Regions! Region work begins! This PR setup the treeview for regions, including the ability to create new regions. Regions are able to be edited to change visibility, color, and names.

9 - Region Triggering Region events are now usable, setup a system that watches regions and allows for events on players entering/leaving regions and using regions as logic values.

10 - Region Visibility Region visibility has been refactored to a player instead of the hubtool to allow for multiple hubtools to exist and visibility to remain persistent across save/load

11 - Multiplayer! Logic editing/triggering is now possible in a multiplayer setting using a serialization/deserialization design for the logic entities.

12 - Cleanup Majority of work is complete at this point and so this PR goes through and begins cleanup of everything and polishing work with comments, cleanup of temporary changes, etc

13 - Region Errors Fix of a major issue with regions and using them in multiplayer, they are now fully functional in multiplayer

14 - Javadocs Finishing up the last bits of bugfixing and going through and completing javadoc work for the entirety of the codebase for the Scenario module.

15 - New actions Just implementing a few new actions for use in the tutorial documentation.

16 - Tutorials Setup some tutorial work for developing scenarios and developing for the Scenario module. Updated the Readme of the Scenario module to link to text tutorials for development work and a video tutorial about utilizing the Scenario module to create scenarios.


This summer was a huge summer of learning for me. I learned a lot about the open-source community through my experiences with MovingBlocks and hope to remain engrained within Terasology in the future with more work to be done! I also learned an immense about programming from my mentor, who actually changed my entire thought of programming and how I go about approaching topics. If you had asked me to implement this system prior to the summer it would have been very hacky and would have had a majority of the system hard-coded. With the help of my mentor I was able to think of the system as a whole and instead create a very powerful structure that allows for extremely easy addition and editing of new trigger elements with very very little code to be done, 99% of the work is complete as soon as the prefab file that describes the element is written. My knowledge of the Terasology system and programming practices has expanded immensely.