top of page

// Vitalus Week 10 Update

Backstory

   I'm Greg Mendez-Weeks, the lead programmer for Vitalus, a space adventure game that I've grown fairly passionate about over the last year. This concept for this game has gone through countless iterations since it's inception. I was beyond certain that I wanted to make a retro sci-fi inspired space adventure game. Complete with cheesy ray guns and references to Flash Gordon. I had just finished reading the entire Hitchhiker's Guide to the Galaxy series, and I was eager to throw some ridiculous Douglas Adams humor in the mix. Despite my grand vision for the cheesy aesthetics and a hazy outline for a story, I wasn't able to come up with any solid game mechanics. As a game programmer, I had failed myself as well as Andre, so I resigned to drop out and live the rest of my life as a mime in Brazil.

   Thankfully Quinton Goins was there to save me from a life of mimery and helped me conceptualize the mechanic that would define the gameplay of Vitalus. I was drawing up designs for Fallout 4 style weapon mods on a whiteboard in the lab I work in. I was drawing out standard elemental space rocks and goo that you might see in any other game. Quinton drew an elephant. He explained to me that you could throw a tiny elephant on top of your gun and use its trunk as a scope. Everything about the current mod system fell into place after that brilliant whiteboard elephant. Why not make everything a mod? Visit strange alien planets, pick up whatever creature, glowing rock, or assorted space goop you can find, and use it as a weapon. We brought on Haley Sullivan and Matt Nicolay to help us with our demo of these newly discovered mechanics in Unity. After a couple of months of development in our spare time, we had a demo that we were willing to show to Will Meyers to request a legitimate independent study at DePaul. We were also fortunate enough to enlist the help of three extremely talented artists for the study, Kendrick Suenaga, Natalie Wyatt-Aldana, and Cole Funck. I never would have expected to see the dumb ideas I had for this game get fleshed out, polished off, and brought to life by our amazing team of artists, and I consider myself extremely lucky to have such talented people working on this project. 

Mod System

    The gun mod system started off as a barely functional mess in Unity, but it got the point across. The player was able to pick up a mod that tweaked the variables that controlled their weapon's rate of fire, damage, particle effects, and more. This was achieved by generating a mod with randomized variables and prefabs, and simply applying that to the weapon.

In the final Unreal implementation, I was able to play with some more complex design patterns, and develop a system that swapped in firing behaviors rather than variables. I expect to be polishing and rewriting this system significantly before the release of the game, but I think I am much closer to the mechanics I want to see from this system.

Planet Generation

    I knew from the beginning that I wanted a spherical map to explore. This is a very interesting design challenge which proved to be the source of many of the road blocks for me personally this quarter. The above image is a sphere with procedurally generated topology that I built in Unity several months ago. This proved to be extremely taxing on load times, so I almost immediately decided to scrap procedural generation for the independent study.  The first major hurtle for the independent study itself was creating a third-person character controller that would work flawlessly on a sphere, as well as setting up gravity in Unreal. That took a good portion of the first two weeks, but I'm confident in the Pawn movement system that I created.

   The second approach I attempted was randomizing the topology on a platonic solid of known geometry. This took me down a 3-4 week rabbit hole and consumed the majority of my development time as there were many different directions I could have taken with this particular implementation. The basic concept involves analyzing the geometry of a particular platonic solid. I chose these shapes rather than a simple sphere because of the unique way that their faces could be truncated into smaller shapes. This could potentially allow me to generate very interesting and distinct areas on a spherical map by generating a "Schlegel Diagram" for each of the planet's faces. 

   I developed an algorithm that created a Schlegel Diagram when given a regular polygon as an input. This allows me to break each face of the planet down into manageable chunks on which we can place environment assets and evenly distribute, or randomize, the terrain without actually procedurally generating each and every face of the planet at runtime. The algorithm is not yet complete, and proved to be very difficult to work out using python in Blender. It was a very educational detour, however as I got to experiment with some methods of randomized terrain that I haven't seen before, and I managed to extrapolate a usable diagram to use for hexagonal tilesets. I certainly plan on developing this algorithm further to get more interesting shapes to work with.

   The third part of my planet generation journey started when I saw this demonstration from Oskar Stalberg. Oskar places distinct hexagonal areas on top of the existing planet geometry for this demo. Each hexagon is broken up into triangular tiles, which are swapped out contextually to create a unique terrain. I attempted to replicate this behavior and I'm fairly satisfied with the results. 

   Rather than using triangular tiles, I extrapolated some shapes from a very basic schlegel diagram that I generated in Blender. The intention is to model these shapes by hand and create tilesets out of them, so I have to be careful not to use a diagram with a large amount of different faces, because this increases the amount of iterations that we have to account for with each tileset exponentially. Just by adding the secondary polygon in the center of this hexagon shown in the image below, we already have six times the amount of iterations for a single hexagon chunk compared to the basic triangluar model that Oskar used. So in the future, I may use the schlegel diagram to create polygons of varying shapes within each chunk, rather than creating more polygons within each chunk. 

   After I had a plan for the tilesets, I worked on distorting the tiles using the barycentric coordinates of each triangle on the planet's mesh. This allows me to evenly place each tile on any platonic solid I want, so long as that solid can be triangulated (which gives me hundreds of options to vary the shape of each planet). This method needs some fine-tuning, but I believe that this will allow us to create much more interesting randomized environments than procedurally generating the terrain. 

Procedural Animation

    The last major component of my work this quarter was inspired by this GDC talk, where the programmer for the game Overgrowth explains how he created a plethora of pretty sick animations using only a handful of keyframes. I've only managed to create a single animation using his method thus far, but I can use the same system to maximize the amount of animations we can crank out for Vitalus in the future. I cubically interpolate between only two keyframes using a custom timeline curve in Unreal. I also do a subtle physics simulation on the model's physics bodies on top of this interpolation to give it a more natural feel. This will allow me to precisely control the animations contextually, as well as produce a higher volume of animations as we can now get by on just two keyframes per animation. Obviously this system needs some tweaking as well, but that goes for all the items on this list until we are ready for release. 

Conclusion

   I went down a ton of rabbit holes with this project, and I had a bit of trouble managing my time. That being said, I think I've started some very useful systems that we can utilize to make this game something truly unique. Continuing with this project, I think it is absolutely vital to set clearer short-term goals and to remain accountable for achieving those goals. I'm very happy that this game is making it's way out of the ether of concepts and finally materializing into something we can play, and I'm very excited for the future of Vitalus. 

 

 -Greg Mendez-Weeks

bottom of page