Posts

Showing posts from 2019

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

Week 7 - Simplying Needs & Saving a Path

Simpler Needs Last week, the need-based behaviors pull request was created. This quickly grew into the largest pull request of the project, with almost 1500 additional lines. This became very hard to manage & review (sorry mentors), so I had to shorten it down/generally make the code look better. This was accomplished in two different ways: For all needs, there was a different target action & fulfillment action for each. I changed the code to merge these common sections together into common target selection & need fulfillment actions; greatly reducing the complexity and size of the pull request. The need based pull request was technically in two parts; the addition of new characters, and the addition of the need-based behaviors. I made a second pull request and separated these two pieces to be reviewed in two different spots. This cut about 500 lines from the pull request alone. With these two changes, the need-based behaviors pull request is finally ready for rev

Week 6 - Needy Citizens & Wells in the Sky

Image
Citizens With a Goal Last week, the three final characters were added to the game. These characters only had the 'stray' behavior applied with a basic food need. That is no longer the case this week. The majority of this week was dedicated to the development of all needs involved in need-based behaviors. The needs that a citizen must satisfy can be seen below: Hunger After a time of about 6-7 minutes, a citizen will become hungry. The citizen satisfies their hunger by visiting the marketplace nearest to them. This was developed last week.   A marketplace that citizens can visit if they are hungry Thirst After a time of about 3 minutes, a citizen will become thirsty. The citizen satisfies their hunger by visiting the nearest well; a new building added this week. A well that citizens can visit to quench their thirst Rest After a time of about 15 minutes, the citizen will become tired, and will travel towards the nearest house (not necessarily their ow

Week 5 - Time Tracking Simplifications & Final Characters

Image
Time Tracking Changes Last week was a major development week for time-based behaviors. A new character was added, and character's behaviors were adapted to change the city dynamic when night fell. The pull request that adds all this is now at a mergable state, after making a major suggested from a mentor review: The time-tracking system used to operate on a component/system architecture, where each character is given a component which stores the time given out by a cycle inside of the larger system. This cycle operated on a world time event, which cycles very quickly. This has been swapped out for an action/system architecture, where each character runs an action to check the current daytime status. In the system, the time-checking cycle has been replaced with dawn/dusk events. This is much more performance-safe than the old system. The Final Cast of Characters With most of the project so far being dedicated to the development of citizen characters, the last step of this de

Week 4 - Sleepy Gooeys & Performance Enhancements

Image
Nighttime in the City One of the largest developments this week was the implementation of time-based behaviors. Last week the TimeSensitiveComponent was added, allowing for behaviors to be based upon the current world time. This week, this component has been put to use. When night falls on the city, all of the gooey citizens will return home to their spawn building, where they sleep soundly until daylight returns. A gooey sleeping soundly in the marketplace However, while all the other citizens are sleeping, a new character will appear in the darkness! Say hello to the nocturnal gooey, who only strays about when everyone else is sleeping: The nocturnal gooey, ready for an adventure. Now with a day-night cycle for all the characters, the city looks more and more alive. Peculiar Performance With all of the new developments in the Metal Renegades module, from city generation to character behaviors, it seems that performance in the module is starting to suffer. The f

Week 3 - Giving Shelter & Characters Led Astray

Image
A Home For All Last week, there was a start on natural character spawning inside city buildings. This spawning was on a time-based cycle, where after a defined period of time a character was spawned inside each building with a PotentialHomeComponent . However, this seemed very unorganized, since characters would have no attachment to the buildings that they came from. This week, that approach was switched out in favour of a 'shelter' based approach. Each building's home component is defined with the number of characters that can spawn inside of it, ranging from 1-5. When characters are spawned inside of buildings, this component also contains references to the characters that it contains. On each spawn check, characters will not spawn if the building already contains the maximum number of characters. This results in each building having a defined set of residents: Gooey roommates With every character now having a hard reference to their spawn building/home, thi

Week 2 - Multiple Personalities & Populating Cities

Image
Meet the Gooeys Any good city must have a little bit of variety. There was only a simple green gooey available before, but over the week I have added four different gooeys, all with different appearances and character traits. Friendly Gooey This gooey just wants to become your friend. Whenever you walk by, friendly gooey follows you like any good sidekick would. Friendly gooey looks just like the traditional gooey, with a green appearance and cool sunglasses. A friendly gooey out in the desert Scared Gooey This gooey, just like the friendly gooey, has a good heart. But unlike friendly gooey, scared gooey does not want you to get too close! If you do, scared gooey will dash away until they can't see you anymore! This gooey is marked by a distictive blue hue. A scared gooey, only observable at a distance Angry Gooey Angry gooey does not want to be your friend. In fact, angry gooey is your enemy. If you get too close to angry gooey, they may start to chase a

Week 1 - Character Behaviors & Changing Plans

Image
A change of plans In my original project proposal, my first month was going to be fully dedicated to the world generator and the generation of static cities throughout the map. Due to this project being a combined effort with another student, much of this work was shared in their proposal. They got a headstart on this part of the project, completing many of my first month tasks on my github board in the process (for which I am very grateful!). However, this put me in a very strange position, where much of the first month of my project was completed before I could even get work completed! As a result, I instead got a headstart on the AI portion of my project, starting with a simple Behaviors implementation. Creating a Living Gooey The final version of this game contains characters with robot models, similar to the one pictured below: An angry robot with heavy weaponry These models are not complete yet, so for my purposes I will be using a model of Gooey, the

Hello World!

Image
What is this blog? This blog currently acts as a log for the "Metal Renegades - World" GSOC project with The Terasology Foundation. Here you can find weekly updates on the status of the project, with more detail than can be provided in a simple forum post. Who am I? I am a senior year high school student from Newfoundland, Canada. Next fall, I am entering a computer science undergraduate program. In the last Google Code-In, I finished as a finalist with Terasology, and I hope to bring that success with me to this new challenge! Thank you for visiting my blog!