Posts

GSOC 2020 Final Report

Image
Summary At the end of 12 weeks of development, my GSOC 2020 project Metal Renegades: Refining Gameplay is finally complete. Over the course of this summer, over 40 pull requests have been made against 13 different modules in Terasology. These merged pull requests together contain more than 5000 line changes. The original goal of this project was to improve the gameplay of the Metal Renegades module based on top of the technical backbone work done last year. This goal was achieved over the summer by adding new gameplay features to the module, refining already existing features, and fixing bugs that negatively impact the core experience. Major Project Achievements City Water Wells Last year, thirst was added to the module. If the player doesn't keep their thirst bar above zero, they will slowly lose health and eventually die. This thirst was previously fulfilled by using wells inside the city, which would in

GSOC 2019 Final Report

Image
Summary After more than 12 weeks of development, it is time to close this summer of code 2019 project! Over 30 total pull requests have been made over the course of the project, with 58 commits & approximately 8000 lines of code added to the Metal Renegades repository alone! It has been an incredibly busy few months. This project involved taking a new gameplay module proposal posted on the forum  here , and implement the technical backbone of the world, so that the core gameplay can be built on top of it. This ended up primarily consisting of AI characters, but also included other aspects, such as player needs, and getting rid of some underlying technical issues. This repository has been worked on in collaboration with Wabadump in their GSOC project. We both happened to make proposals in the same area, so we cut out as much overlap as possible & both worked on different sections of the module. In some areas the proposal tasks were slightly altered due to it already

Week 12 - Finishing up!

Image
A Divided World All the characters thus far have been very friendly with each other, the friendliness has been going on for too long! This is Metal Renegades , we need conflict in this world! Enter the new faction system. Now, each settlement is given a faction alignment on creation (from Good, Neutral, and Bad), and only characters of that specific alignment can spawn in those buildings. Citizens inside a building, both in the 'bad' faction Each faction has a specific aggression relation with every other faction. A 'good' citizen will be aggressive with a 'bad' citizen, and neutral citizens are aggressive with nobody. When a citizen finds an enemy nearby, they both charge at each other and attack. Enemy citizens attacking each other! The last part of the faction system was the player's faction alignment. Unfortunately, this could not be finished in time for the programs completion, so it will be finished post GSOC. A Thirst in the T

Week 11 - Engine Changes & City Timesteps

Image
A Change to Serialization & Health This week two major changes have occured in the Terasology codebase. In the engine, a new serialization system was merged into master, which reads and writes all the assets & save files more efficiently. The number of changes in the serialization pull request.... oh my! This update required many changes to multiple modules in my workspace, which took up more time than expected. If you recall from three weeks ago, I had some troubles with pathfinding serialization, where the game would throw errors when a path is saved to a character. With this new system, the errors have reoccured again.... Except this time, the game doesn't only throw errors, it crashes entirely with a NullPointerException. The current cause of this is unknown, and must be fixed as soon as possible. In addition to this change, vital changes have been made to the Terasology/Health module as part of another GSOC project, which changes the way that events are

Week 10 - Citizen Tooltips & Pathfinding Successes

Image
Building around the clock Last week, an issue involving the DynamicCities building generation cycle was discovered. In short, buildings continued to spawn while the game is paused, which is not intended behavior. I looked at the generation system this week, and it turned out that generation ignored the current paused state of the game. This system subscribes to the game update cycle, which provides the delta time (the difference in time since the last update). This time becomes 0 when the game is paused, but unfortunately this delta time was not used by the system. I changed this system to use this delta time, solving the issue. On the right path, sort-of... In the last blog post I talked about the current pathfinding capabilities of the behavior nodes, and how these nodes don't support interruption. As well, I talked about how this could cause problems for integrating this pathfinding into the Metal Renegades characters. In order to fix this, it turned out I needed to m

Week 9 - Proper Template Generation & Interrupting Navigation

Image
Buildings on the Ground About three weeks ago, a very strange issue involving bulding placement was discovered. When a building is defined as a structure template, the building placement fails, and the template is seemingly placed randomly across the world. Buildings generating in the sky After some investigation, this placement turned out not to be random. Rather, it was a problem with the rotation order. The problem is best demonstrated with the diagram below: The top rotation matrix order was the intended order for placing templates. The building is initially at the origin, (0,0,0), rotated/transformed to fix the destitation parcel, then translated to the parcel. The bottom is what actually ended up occuring, where these two steps were flipped. The template was rotated unnecessarily around the origin, ending up in a totally different location than where the parcel was. With this order changed, and a few tweaks made to ensure the template is at the centre of the pa

Week 8 - The Path Less Traveled & Hungry Players

Image
Saving Paths In regards to last week's Path problem, the determined solution was to change how the Path class was structured. This class no longer extends ArrayList, which seems to have done the trick; the crash no longer occurs. Pathfinding now works on basic characters! Now, another issue has risen in regards to Pathfinding. I attempted to integrate the existing nodes into Metal Renegades. After a long runtime however, the performance hit skyrockets, hitting over 500ms delay in the BehaviorSystem. This doesn't seem right.... I'm thinking that a behavior node is running wild by accident; perhaps calling the pathfinding operation over and over again. This is another pathfinding issue that needs to be solved in the coming weeks. Citizens in the Sky With the new need-based behaviors, a few more issues with standard character movement is becoming apparent. This week, I took a bit of time and researched the issues present with character motion and put them inside of