Skip to content

Instantly share code, notes, and snippets.

@0shine0 0shine0/
Last active Aug 28, 2017

What would you like to do?
Combat System(GSoC 2017 wrap up)


For GSoC 2017 my project was to add the functionality of combat in Terasology. Terasology uses the module structure to enable the modders to extend the main gameplay with their own added functionality. Similarly, I also worked with my own module CombatSystem, to create basic weapons, attacks and traps for the game. My project aims at improving the combat gameplay of Terasology by introducing various weapons including but not limited to bows, arrows, spear, sword, fireball, defence towers, mines, sniper and trap rooms. Moreover, the content was created in such a way that it would enable modders to create their own unique weapons by picking up properties of various weapons and grouping them together. For example, a modder could easily create a sniper that shoots arrows or fireballs instead of bullets or a spear that bounces or explodes off surfaces instead of piercing. The modder could do all mentioned above and much more with no more than 10-20 lines of text (could mention it as code but modder can achieve the above things by simply creating a prefab for weapons in JSON format).


During my work period, I mainly worked with the following three repositories:


This is where the main source code of Terasology game resides. I made a few changes in the engine to enable me to add new functionalities to the CombatSystem module without much hassle.

Here's a list of commits by me in the Terasology repository:

  1. changed CollideEvent to be consumable
  2. changes in physics to enable trigger collisions with the world and to include the latest TeraBullet module in the engine
  3. made the TriggerComponent to be compatible on a network
  4. changed the block getting method in trigger part
  5. rollback the changes that were done to enable world collisions
  6. prevents characters from colliding with sensors


This repository was created by me as a module for Terasology game. Its main purpose is to sense entities in various ways provided within the module. It is also used by CombatSystem module for some weapons that required to sense nearby entities. This module allows sensing of entities if they are within a certain range whether airborne, underground or grounded. It also allows sensing of entities only if there is no obstacle residing between the sensor and the target. This module also allows sensing of entities in the field of view of the sensor i.e. sensor acts like an eye and only senses entities that are in its field of view.

Visit this link for a list of commits by me in the Sensors repository.


This repository was also created by me as a module for Terasology game. Its main purpose is to introduce various properties that relate to a weapon like piercing, bouncing, exploding, shooting, range, scope, quiver, recoil etc. It also introduces various basic weapons that make use of the provided properties. Besides weapons, this module also introduces various traps like mines that explode if the enemy comes near them or fireball launchers and arrow defence towers that shoot respective ammo if the enemy entity comes within a certain range of them. This module also introduces various trap rooms and functionality to create your own trap/puzzle rooms.

Visit this link for a list of commits by me in the CombatSystem repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.