Project Spite Ragnarsmjöd

The second game of year 2 of the game programmer program at The Game Assembly

This game was a ten week long project, with the genre role playing game with diablo as it’s reference and with a viking theme. During this project I had to convert the exporter to produce binary files and read them into the engine. After that I was responsible for adding new features that the level designers could place in unity. Like spawnpoint, checkpoints and triggers. During this project I focused on getting our visual script editor up and running and maintaining it, which involved adding new nodes for the level desgingers to use. We had basic scripts like open/close door, spawn groups of enemies, change level and playsound. Other than this I focused a great deal on our AI boss and one of the players abilities. Spite Ragnarsmjöd Showcase

Main Contributions

Systems

Visual script editor

During this project we developed our own visual script editor to use for our scripted events. I was part of the creation of it then after it was ready for use I took upon myself to develop all the script nodes we needed to use during this project.

Script Nodes

The actual script nodes was created in the programming language squirrel and resulted in a .nut file which is illustrated bellow, with a nut file showcasing our trigger node and it’s visual representation. The function names get’s added as pin’s on the visual node and the arguments for the run function get’s showcased on the left side of the node bellow the run pin.

Collision System

The Class responsible for maintaining our collisions during this project was our collision manager which had two lists of static and dynamic collisions and a collisiongrid to keep track over which should be checked for collision. We used collision flags to determine which objects could collide with each other.

We used a base collision class called shape to be able to handle multiple different types of collisions smoothly. We had support for oriented bounding box collision, sphere collision and a type of triangle collision which used three planes and check if a point was inside all of them.

AI

AI Boss Behaviour

I did most of our boss’s behaviour in this project. It’s behaviour was controlled by our behaviour tree and most of it’s different phases was animation driven, meaning it couldn’t transition to the next state before the animation was completed. Each phase was a different state which contained a behaviour tree to determine it’s actions.

Phase 1

Phase one involved the boss swinging it’s great club a few times before roaring, then back to swinging. It also involved moving towards the player to get into range of it’s club.

Phase 2

The second phase involved the boss showing off a visual hit circle on the ground, building up for a jump attack onto the ground with the circle as it’s hit sphere.

Phase 3

The third phase involved the boss showing of a cone hit area, slowly building up it’s attack before launching it at the player.

Phase 4

The fourth phase involved the boss roaring then spawning a group of enemies around itself to help it in the fight.

Gameplay

Player Second Ability- Whirlwind

I was responsible for the creation of our player’s second ability whirlwind. Which was a spinning attack which pulled all the enemies it hit along and placed them infront of the player for a line up to the heavy attacks.

Pipeline

Unity Export

During this project we went from exporting from unity using json and binary to only using binary files. Previous project we exported objects, like a trigger with all it’s data at once. During this project we walked away from that and chose to export only binary files. We exported all of one component in unity in one binary file and the most important one became the transform component. During the loading of their data we created transform components in our engine with the data from unity and created the entites as well.

Everything in unity uses a transform so it became the best choice. After that all export for each components got it’s id from a component we created called unique id. This gave all the gameobjects in unity a specific id which we could then use to create a map with the new entity id created at the loading state of the transform components. This map allowed us then to connect the right entity to it’s respective components.

Bellow is a showcase of a few of the steps of our unity export. When they get exported we collect the unique id and add it to the binary data for that component to be able to link them once more in our engine.

Scripted Events

Open and Close Doors

I made two script nodes that could open and close a door, which used animations. The door was being controlled by a script that when it got executed sent a message telling a specific door to open or close.

Spawn Enemy Groups

I made a script that could spawn a number of enemies around a spawnpoint. You used unity and a unique id component to get the position for the spawnpoint.

Game Showcase and Trailer