Spellflingers

Our final project at The Game Assembly. Spellflingers is a 2-4 player competitive game based on the game “Duck Game”. This game is all about chaotic, fast-paced action.

This time around my responsibilities on the project were to expand our controller support to allow up to 4 players to play simultaneously, implement all stage hazards, program a scripted event, and code in some basic AI.

Controller Manager:

In order to be able to test our game early and often I needed to set up the controller manager before anything else. Making it simple to use was my top priority so that other programmers could use it without having to constantly wonder “how does this work?”. So the end result was fairly simple, all they had to do was send a controller/player index to the manager and they could use a variety of functions to see if a button was down, or to make the controller vibrate, etc.

Stage Hazards:

I created a system to handle all our hazards that would check for collisions and execute logic accordingly to the type of hazard. Collision detection was done with the help of PhysX (Something a classmate had already implemented in previous projects) so that part was pretty simple. The degree of complexity varied a lot between hazards.

The final version of the game has Spikes, Teleporters, Stalactites, and Whirlwind. Simple hazards such as spikes on the ground/walls and stalactites did not take a lot of work. Teleporters were a bit more complicated since they needed to keep track of which players used it and wait until they left the teleporters hitbox before being usable again. The whirlwinds were a bit tricky since we were using PhysX to bounce the player around and this could result in a lot of unwanted behavior such as players clipping through the environment, but with a lot of testing we managed to make them work and even added some functionality for “grenade magic” to bounce on them as well.

Scripted Event & AI:

As part of our grading for this project we needed to have some kind of scripted event that involved all disciplines in our game, as well as some form of AI. In order to try and get two birds with one stone, I suggested we merge the two into a single event. The idea we came up with was to have a storm cloud come into some levels, it would move along the screen while spawning smaller clouds. These smaller clouds would move back and forth through the level while looking for players, when the x position of the cloud and the x position of the player were within a certain range we did a raycast straight down to check if the player was visible to it. If a player was found the mini-cloud would start shooting lightning at it for a set period of time until running out of energy and leaving the stage. This way I managed to create a very simple AI that players would be forced to play hide and seek with lest they be zapped to death.