The Friday Tiding #8: In The Pocket


This is a copy of a blog post I made on the Zinnia Games Blog: https://zinniagames.com/the-friday-tiding-8-in-the-pocket/

The Friday Tiding #8: In The Pocket

22 Nov, 2024

zinniablog_fts8_1

You ever get the first turn in billiards and just revel in the ability to send balls everywhere? Story of my life, but much like that first turn in billiards I got a lot done this week in a lot of places for Project Petunia. So strap in, this is gonna be a long one.

Entomology

To start with the most boring thing, bug hunting. I've kept an informal list of bugs that have cropped up during my constant testing of Demo 2, and I was letting it simmer for a while. But on Monday the 18th I just decided to obliterate all of the bugs that were still on that list. Most of them were simple fixes, just a missed flag not being triggered, or too many animations queued on a HUD element.

The one thing that wasn't simple however was the Bomb Powerup. Rising up from the depths of hell like some eternal demon with nothing better to do than haunting me forever, this powerup has proven to be by far the jankiest element in the entire game.

This week's pain point was the Bomb's explosion not always being angled correctly when hitting a surface. This is problematic for two reasons. One, the explosion graphic will be angled incorrectly which looks very wrong. Two, and the more serious issue is that this also causes the direction the Blast Jump is meant to go to be entirely incorrect. The Blast Jump's velocity transferred onto the player should always be based on the angle of the surface that the projectile collides with.

zinniablog_fts8_5 This is how the explosion should always look when on a slope

Considering how powerful the Blast Jump is, there is no room for error with this powerup. It either works all the time, or not at all, I will not accept most of the time. The fixes I implemented seem to have covered all edge cases relating to angling the explosion from the bomb correctly. The main change was relating to the Raycast 1 that I use to determine the angle of the surface the bomb projectile has collided with. Previously this Raycast was angled based on the direction that the player threw out the bomb projectile. This worked roughly 75% of the time, but in some cases such as throwing a bomb onto a slope that is going downwards away from the player, the Raycast failed to touch the ground before the projectile collided with the floor, causing the bomb to explode with its default angle, which is straight upwards.

My first fix for this issue was to change the Raycast that I angled in the direction of the throw to instead angle itself based on the velocity of the bomb projectile. This means that as the bomb projectile begins to fall downwards, the Raycast will begin to be adjusted downwards as well. This helps cover most situations relating to slopes, giving us the angle we want. However, there are some cases where the slope is so steep that the Raycast still fails to touch the ground. In this case I made it so a fallback Raycast, which is always pointing straight down activates and gets the angle of the surface it collided with. Thanks to these two changes, all testing that I did with the bomb ended up with the explosion always being angled correctly.

So for now the demon has been exorcised. I'm sure that some new horrible issue that sucks away another couple hours of my life to deal with will pop up from this powerup, but for now it works.

Mediums

Now that I've complained about the Bomb powerup again, I can move on to better things. I've made quite a bit of progress on the next two levels in Demo 2. The first of these was one that I referred to last week, What's Popping. This level is heavy on platforming and airtime, and both the bubbles and balloons serve to make the player deal with unstable footing.

I'd say this level is about 60% done at this point. If I go all in this next week I'll likely have the whole layout finished.

zinniablog_fts8_2 zinniablog_fts8_3

Firewalker on the other hand didn't get as much love, but I did go ahead and program in one of the level's gimmicks. This little volcano will shoot out a volley of rocks every few seconds. This level will have most of its difficulty come from its gimmicks, so I expect that it'll be the easier of the two Medium levels. Which is actually what I want, since the world I am wanting this level to be in is meant to come fairly early in the game's progression.

zinniablog_fts8_4

Map Of The World

The World Map is an extremely important screen in Project Petunia. This is the screen in which you can enter levels, so without it the player can't really do much more than hang around in one place. Despite this I've left the world map nearly untouched for a while now.

That changes this week. I've gone through and added or adjusted quite a bit on this screen. Firstly, the player sprite is finally animated here. Previously you just kinda slid around the screen but now the player will properly walk. There are even different sprites for each of the cardinal directions. There is also a sprite for when the player selects a level, which should help explain why the player suddenly can't move around after pressing the Jump button on a level.

I also decided to confirm the role of coins within the game. I had gone over my thoughts and considerations about the low value collectibles in Project Petunia in an earlier Tiding, and now I've made my decision. There is a coin counter in levels now, but you'll also notice one on the world map screen. This is the player's Bank. When you complete a level, all the coins you collected will be added to the Bank.

An immediate thought that comes to mind is allowing the player to purchase powerups from a store on the world map. While you can enter a level and grab a powerup for free, this could act as a way for the player to save time and not have to try and find a level with the powerup they want in it. Another thought I've had is levels that are locked before the player pays a toll to unlock them. I want to be careful with this idea though, because I want to avoid making the player grind coins to enter a level.

Finally I decided to go ahead and add the rest of the info I wanted to display on the world map screen. Mainly the name of the world the player is in, and the total amount of Fragments that they have collected for that world. While this stuff looks innocuous programming the Fragment counter to be able to dynamically change caused me to write a really stupid function that uses way too many lines of code to count up the collected and total Fragments in the world.

ppds_14

Outfitting

That's right, there is still more to talk about. Moving on from the game itself I have continued to try and figure out Slader's design. I have not been having much luck in finding an outfit that suits him, and I find myself bouncing between a few design ideas. Turns out the evil emperor surfer dude thing isn't easy to dress well. That's not even considering the fact that I have to end up with a design that isn't hell to animate, because he will be appearing in the game obviously.

ca_slader_6_wip1

Closing Out

I wasn't kidding when I said this was a long one. This is easily the longest Friday Tiding yet, but I'm just as happy to report that I got quite a bit of work done on Demo 2 thanks to the productivity shown here. I doubt I'll keep this pace up, but even if I slow down Demo 2 is looking to reach digital shelves before 2025 comes in. Let's not speak of the future until we get there however. As always, see you next week.

  1. Raycasts are a tool in game development. You can use them to draw a line from one point to another and check for any potential collisions that cross that line. In this case, I use a Raycast starting from the Bomb projectile to check for collision with the terrain of a level.

Get Project Petunia

Leave a comment

Log in with itch.io to leave a comment.