• Register
Post news Report RSS Save Me Some Vomit

With the completion of the new save/load system and implementation of the radioactive vomit attack done, my zombie shooter is getting closer and closer to being ready for a public release.

Posted by on

First up is the save/load system, which is about 95% complete at the moment. I've gone through and ensured that absolutely everything is being included in the save file data and that quarantine zones that have been spawned already are recreated exactly the way they were at the time the game was saved. I also have the type, position, and other important data stored for each and every zombie, the only current exception being corpses - for the alpha release I will likely leave that as is since it is not anything that needs to be in place for the first round of public testing.

Load Game UI

It's pretty straightforward and I've done my best to tie the layout of the save/load UI panels into the graphic novel theme of the game's UI. One thing to note is that the save game data is actually contained within the screenshot that is used for each cell of the panel, so there are no .dat or .json files to speak of. I do this by taking a screenshot at the time the save file is created and then embedding JSON data directly into the screenshot file itself; this JSON data is then extracted from the image file when the game is loaded, then parsed as any other save data would be. If you had a copy of the game now, you could load a saved game directly from the image file below by simply moving it to the appropriate folder and opening the load panel as you would normally; all the data is packed in there and ready to yanked out to recreate the game. Not only is this convenient, but I am quite happy with the panel's layout and the way in which the screenshots combine to construct a graphic novel page.

Save Game File Example

I've also added the biohazard zombie's vomit attack to gameplay, which up until now was only a proven concept tested in an alternate scene. I ran into an issue while putting this in place due to the fact that the particle system was already set to collide with the ground in order to have it collect in pools that the player may accidentally walk over and receive damage from. Simply enabling collisions between mid-air vomit particles and the player would result in the same pooling effect occurring on the player in a very unnatural way, so I had to find a way around this. I ultimately decided to split the vomit particle system into two separate prefabs; the first controls the bulk of the particles, all of which collide with the ground same as before; the second controls only a small fraction of that which cause damage to the player on contact and its particles are destroyed on impact; since both systems look exactly the same to the player, they won't notice any difference during gameplay but the end result is that I get both the pooling effect and player damage with very little work required to pull it off. So now the player will take damage anytime they touch the radioactive vomit, regardless of whether it is in the air or pooled on the ground. The video below shows the radioactive vomit working in a recent playthrough as well as a demonstration of the separate particle systems being used, one system changed to a different color to emphasize the difference.

I was honestly a bit worried that the vomit attack wouldn't pose much of a threat to the player and would therefore feel irrelevant but score one for playtesting because all it takes is a momentary lapse of positioning or awareness for you to pay a heavy price. It is especially lethal when one of these guys sneaks up from behind you or if there is more than one within attack range, and the fact that walking over any green particles on the ground causes even more damage, it makes the mechanic feel very similar to Torbjorn's ultimate in Overwatch. It can not only kill you quickly but is also very effective at cutting off your exits, even after killing the source. This worked out even better than I was hoping and has added a new sense of urgency to gameplay.

Post comment Comments
SPY-maps
SPY-maps - - 2,904 comments

I have never coded before (only mapped), so I never knew how much work did get into making a save/load system. But when you explained it above it was quite logical. And glad you could implement the zombie vomit, and that pools of vomit also do hurt the player. I assume the pools will over time delete, or stop hurting the player. Because what if there are a lot of those vomit zombies together in one place, then it could maybe happen that there is no ground to walk on anymore. Although, now that I think of it I don't think that will happen any time soon.

great update!
Leon

Reply Good karma Bad karma+1 vote
eatsleepindie Author
eatsleepindie - - 42 comments

I usually prepare for the save/load system better and get it implemented early in development to save time in future but this being a personal project that I originally wasn't sure was ever going to become a game, I just kept delaying it. I'm glad it's done though, it's going to come in handy when playtesting for certain.

The radioactive vomit does disappear after a short while. It does a lot of damage and I don't want to permanently cut off exits or anything, I just want the hairs on the back of the player's neck to stand up a bit when they see one or more of these guys coming.

Reply Good karma+1 vote
Post a comment

Your comment will be anonymous unless you join the community. Or sign in with your social account: