Loading...
7
Game
Hensen Hopper
26 days ago

Okay, so I've gotten the functionality for the beetle shell render over the player working! (using the first 3 frames from the beetle shell collect animation as placeholder sprites, these ARE NOT the final sprites)


So I decided to scrap the methodology I had been going with and ranted about in my previous post. Instead of trying to have a script read an arbitrary integer and set the sprite of a SpriteRenderer component according to it's value, I have put together a relatively simple script that still sets the sprite of a SpriteRenderer according to an integer key value, however, it doesn't itself know what that key should be, another script has to tell it.

image.png

From here I simply attached this script to the beetle's sheild sprite renderer and the beetle shell overlay sprite renderer on the Player and set the sprite pairings via the inspector window.

image.png

This way, for the beetle shell graphical render, I can simply call SetSprite from the PlayerEffectsHandler's update method and pass the player's damage absorptions count in as Key.

image.png

For the beetle's sheild, I wrote a BeetleEffectsHandler script that extends the EntityEffectsHandler I was using before to handle the beetle's shield effects. Before this, I had written an EntityHealthEvent struct in the EntityEffectsHandler that invoked UnityEvents when the entity's health hit a certain value solely to handle the shield's damage states and the effects for when it breaks which felt gratuitous to me since 3 of the four events did ultimately the exact same thing with slight variations and this property was not used by any other entity.

image.png

A common piece of advise that's given to programmers who are just starting out is any time you find yourself writing structurally identical code repeatedly only with differences in the values being used, try to turn it into a function/method instead. I believe the same applies in this case only with UnityEvents (which, when all is said and done, are effectively method calls themselves). That being said I also have this personal philosophy that it's best to avoid using UnityEvents if you can because they can make narrowing down the source of bugs quite difficult sometimes so I usually seek solutions that do not incorporate them so you can take this paragrap with a grain of salt.



0 comments

Loading...

Next up

I've been working on the sprite for the beetle shell power-up drop! I'm thinking when you collect this one, it will kind of poof away similarly to the enemies when they're defeated and play an "equip" sound.

OKAY, here's it ACTUALLY finished! Quite happy with how this turned out, actually! I've drawn this sprite in 3 layers, the wings, the elytra, and the body, which will make animating this thing a lot easier when I get onto doing that.

The beetle shell is now fully VISUALLY implemented! Next thing on my list is a unique sound for Hensen equipping it.

After 7 long years, the wait is finally over. Chapters 1-4 of DELTARUNE are out now!

Celebrate the parallel story to Undertale by completing these quests.

I DID end up making the body and elytra both 1 cycle/s and the wings 6 cycles/s. I'm working on a video of the animation itself playing in the Unity editor so you guys can see it properly. I think it turned out well!

Let Them Come: Onslaught by @Tuataragames has come to Game Jolt!

Celebrate by completing our quests!

Play the FREE demo of Let Them Come: Onslaught on Steam: https://bit.ly/LTCOdemo

I added the leaf shield to the beetle since the last time I posted to Game Jolt! I've also added a detail where it deteriorates over time as you strike it with bullets which I think is a nice touch! Yes, it's a separate sprite from the beetle himself lol.

Here's a short demonstration of the beetle shell power-up in-action! It's not very obvious what it does at the moment because I still need to work on a lot of the effects for it, but the functionality is there if you pay attention to the health bar!

The Button Effect – @Frycandle 's minimalist first-person puzzler inspired by The Witness, The Talos Principle and The Beginner's Guide, is coming to Steam! 

Play the demo and wishlist the game now: https://bit.ly/thebuttoneffect

Okay so fast forward ~2 and a half hours of work and I've gotten an effect to play when the shield breaks! There is a sound effect too but for some reason it sometimes doesn't play... Need to figure THAT out now... v0.2.1 is on the way today!