Christmas Rush - Jame Gam 2022 - Day 4


This is part 4 of the Christmas 2022 Jame Gam post mortem, if you haven't already read the first 3 days, I recommend you do before reading on.

The Day

Bugs bugs bugs. This is madness!


The Morning:

The day started off dealing with the bugs mentioned in day 3. Basically upon further debugging and testing,  the whole conveyor belt system was broken and given it's the core loop of the game, this was very, very bad. I started with a fix for a timing bug where the conveyor could stop in between work stations. This fix was later removed as it too was broken. 

Next I implemented a fix to the resource refill system. The problem was it was broadcasting the refill event and each elf would try to figure out if it was for them or not. This didn't work. After 10 minutes, I changed the event to broadcast the type of refill which then the elves check and now we know for certain who was restocked.

I rounded out the morning fixing another nasty bug where once you delivered resources to a workstation, only that work station would fire and work on the gift in front of them. The other 2 stations were ignored.

After Lunch:

After lunch, back to bug slaying, the conveyor system was better but still riddled with issues. The next issue I worked on was that elves would sometimes work on the same present twice when you refill their resources. A quick and dirty fix was to put a small delay in the elves attempting to work. In reality, this issue is caused by a double invocation of an event but I didn't have time to track it down as the core loop of the game was still very broken.

I took a minor break from bug slaying, and finished swapping out the remaining art assets that Pedro delivered in the morning. The whole process from a bear with a ear missing, to boxing, to wrapping was now visually complete. After this, I animated the working elves, and the machine.

Nice, simple time was over. Back to bug slaying (I felt like this bear with a torn off ear):


Alright I've had enough. I spent the majority of the morning and afternoon pissing around with this conveyor system when in reality it needed a rewrite that I was trying to avoid. It was time to bite that bullet. The system was based on speed and an end target.....this was dumb it could easily (and is) be time based. The conveyor runs for N seconds then stops, rinse and repeat. After this rewrite I thought the conveyor system was boss now....

I was mostly right.

Remember those rogue elves we mentioned that steal resources? Well those little buggers, if they steal the last resource, it completely breaks the conveyor. It just runs repeatedly until resources are resupplied at which time the conveyor starts to work properly again. Huh? This bug was very annoying but I didn't think it was quite a game breaker, in hindsight it was a game breaker.

I moved on to some simpler bugs related to audio, and also added a dash sound effect.

Time to finish the afternoon. Although I knew about that nasty bug, I needed a break from it and was confident I'll fix it either tonight or tomorrow. I decided to add some randomization and deviation to the existing systems to make it more natural. Presents now generate different sizes, resources randomly place and rotate at the workstations when placed etc.

The End:

In the evening I didn't have a lot of time due to other RL obligations. That being said I did squeeze in a few hours and finally found the root cause and fixed the last conveyor belt issue. Dumbly, I had code for the conveyor belt, animation, and items on the belt all replicating the same code-ish, and event handling. After a little thinking, I asked myself WTF am I doing? I ripped all the event handling out, all the if (moving) code and replaced it all with a check against the conveyor belts if moving. The conveyors now worked exactly as intended, items can stop anywhere, and they'll pick up where they left off once resources are restocked.

I finished off by putting some random assets around the workstations so they look like they've been used.

Wrap Up:

What a mess. Today was a panic fueled day of bug fixing and animating.  There isn't much to say, it was a rollercoaster of emotions between the core loop being very broken and finally fixing it all. I was hoping to upload a sample build so people can test it but it isn't ready without a first cut at the balancing.

Tomorrow will be busy again, we need to get the tutorial in, and most importantly, balance the game. There are a bunch of other tasks but I doubt I'll get to them.

Thanks for reading, see you tomorrow.

Get Christmas Rush

Download NowName your own price

Leave a comment

Log in with itch.io to leave a comment.