2018-08-03 00:26:30 Posted by RetroZelda

Revenge Project - A New Game Jam

As I pound away on my keyboard at work as December creeps closer and closer, I had a lovely mental distraction as I was invited to partake in a 48 hour game jam with 3 other lovely and gifted people from work. The jam was with Playcrafting and with Alley powered by Verizon. Those of you who know me know that I live for game jams; game jams are THE BEST! So, of course I had a good time! It was also super great to be able to work with people at work who I normally don't work with directly. Overall, the experience was amazing. And yes, I broke the chain of a new project each month, but I think I'm doing well for myself regardless! The game we made is a 1 vs 100 bullet hell called Revenge Project. You take control of a robot, and you must defeat 100 other robots. You. Will. DIE! But, upon your death, you will rewind and fight against the ghosts of your previous lives in order to defeat all the enemies. The focus of the jam was to create something that can only be run on a high end PC, and with our mass amount of updating enemies, bullets, and ghosts, we have done just that. Because I did the programming, and the core feature is the gameplay recording and playback, I will briefly talk about the high level method that I came up with. I don't want to get too technical because it was a game jam ad so I only had so many hours to come up with a light and efficient method to achieve this. In order to get a consistent recording of each life for playback, I needed to do 3 main things: record data as accurately as possible; keep each recording's data as small as possible for each recording tick; and ensure that fetching the data is both fast and accurate. Limited by the data structures that C# provides(We used unity), I opted to store recorded data in hashtables and arrays. Each hash was a calculation of the time that the recording step occurred, so contiguous recording blocks would stay contiguous when stored into the array for each hash entry. I would then cache the previously found recording data location so subsequent fetches would start around the same block of time. This gave me a direct hit into the proper time bucket so I can utilize prefetch caching to find 2 recordings that would "e;sandwich"e; the time of the playback. This provided me a, worst case, 30 index loop for time lookup. This worked beautifully for a recording where there's 1 block of data each frame. I could then calculate a lamda of the desired time and handle calculating the playback position for any time passed in. The other main issue was memory for each recording block. In this game, I needed to record 3 main things: position, orientation, and shoot events. I packed the data into 32 bytes(3 floats for position, 4 floats for orientation, and 1 byte for trigger pressure, and the rest for hash lookup help to not waste padding). Nothing fancy, and pretty small. Over time, memory will grow and so having the quick lookups with the small recording blocks was really nice. With recording out of the way, the last thing I will mention is the number of updating objects. There are 100 enemies(or more depending on if you utilize the console command listed in the readme) that are all running basic AI logic, with unity,s basic navigation system running the pathfinding. Since you can have enemies attacking ghosts all over, we needed all enemies to be running the ai. It is very basic, and utilizes the collision system to trigger changes in behavior. Then, because we wanted a bullet hell feel) each enemy will be shooting bullets FAST. Each ghost that is playing back will be shooting FAST! You, as the player, WILL BE SHOOTING FAST!! So many bullets!!! SO MANY OBJECTS! Its a blast! Overall the game is fun to play, its hard, and it runs as expected for the tech and the time we had to put into it. I am quite proud of it, and I hope you enjoy it. Oh, and here is a link to the game. You will need a controller to have the best experience of play. Enjoy :) https://drive.google.com/open?id=1QGYtNoXSDz470CXFL5EEoRopLAFeEClv Ciao fur niao