Christmas Rush - Jame Gam 2022 - Day 2


This is the second days progress for the Winter Jame Gam. If you are only arriving here now, you may want to read day 1 first which desribes the game etc. Thanks for reading!

The Day

The Morning:

I started the morning off with implementing a dash ability to help the player deliver resources faster. Lastly for the morning, I spent some time helping my artist get set up with Git, Unity and the 2D sprite bone animation system.

After Lunch:

I spent the early part of the afternoon getting the new player elf sprite into the game and verifying all of the existing player scripts still work....they did, phew. After getting the new sprite in, I added some animation code to trigger the animations and flip the sprite based on the direction you are moving. 


I ran into a nasty problem with flipping the sprite where the sprite became a mess of pieces not lining up. This was mostly caused by pivot points in each piece of the sprite due to it being constructed in the Sprite Skinning Editor. After fighting with this for a bit, I thought maybe the old flipping the X scale trick will work better than messing with individual pieces. To my great appreciation, this did the trick. I just flip the X scale of the parent GameObject anytime the direction changes and boom, the whole thing flips and not individual pieces.

I found a game breaking bug where sometimes dropping off resources were accepted but the conveyor belt never started back up. I eventually determined this was caused by multiple elves firing the out of resources event when they both ran out at the same time. This was rectified by handling the out of resources event broadcast in the ResourceManager which knows when the resources running out. The code really belonged there in the first place.

I rounded out the afternoon throwing together a quick and dirty in game menu so the player can restart or quit the game easily.

The End:

For the last part of the day, I did three things, 1) Visual representation of the resources available, 2) Implemented Rogues 3) Started with particle effects.

 The visual representation of an elf's available resources was fairly straight forward to create, so I banged this out fairly quickly. 

Getting the rogues to spawn was straightforward and getting them to move should've been. I couldn't figure out for the life of me why they moved properly to any transform I targeted except for the supply crates. After an hour or so of banging my head on my desk, I realized that the sprite's position was not at 0,0,0 in the prefabs children. I kept checking the prefabs location but not the children. Doh! 

Lastly I did some work with Unity's particle system trying to setup a effect that would look cool while the elves worked on the presents at the different stages. I have a good start but figured I should finish it tomorrow, it's been a long day.

Wrap Up:

The day didn't feel very productive at all...it was one of those where your time logs show you've been working on the game for the past 13 hours but you don't have much to show for it. Looking through the Git log, it is clear quite a bit was done though, so it is only a perception issue.

Lastly, I am over the moon about working with an artist on this game, my artistic skills are lacking at best and it is always a demotivating factor for me when writing games. Not having to really worry about that is AMAZING!

Time to wind down before hitting the hay.  Good luck (and good night) to everyone and my fellow jammers.

Get Christmas Rush

Download NowName your own price

Leave a comment

Log in with itch.io to leave a comment.