Loading...
7
Game
Hensen Hopper
1 year 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

Proto art for another new enemy type I'm working on! This one is gonna switch between flying toward you for melee attacks and firing 3 scorpion claws at you in rapid succession.

The new main menu backdrop is, slowly but surely, taking form! I'm pretty happy with the background bushes now, Might add white flowers to them to make them look like white azalea bushes. I think I'm gonna shape one bush a day until they're all done.

Here's a version with just the background bushes visible!

Get yourself some fellas today! πŸ‘¨β€πŸŒΎ

Tiny Terraces is 25% off on Steam. #indiegame #gamedev #videogames

I've figured out that what's been bugging me about the backdrop is that every one I've done has looked way too far below Hensen and the enemies and I want to create a sense of you being tiny. I'm going to try to make significantly bigger plants today.

Working on a variety of things for my game! πŸŒ±πŸ› οΈ #indiegame #gamedev #videogames

Also I have been working on a new enemy type. This one bounces around the scene like a screensaver logo, damaging Hensen if he runs into it.

I've updated the default wasp enemy's behavior! Now it spends a lot longer in it's wait state and fires 1-2 bullets every 1.5 seconds when Hensen is below instead of firing them on a timer. It's a lot more challenging but it's also more fun!!!

We made a strategy game where you play as the monster. - Command an insectoid hive mind and build your nest - Salvage enemies for DNA and relics - Evolve new creatures and carry them across the campaign It’s called The Hive. Would you play this?

You know what, the difference is a lot more obvious if you see a gif of the animation with/without shading.