Dev Blog 2: UI and Inventory System


Hello, fellow game enthusiasts! It's your friendly neighborhood coder, back again to entertain you with the latest adventures in our game's development. Today, I'll be sharing the epic journey of creating the UI, inventory system, and our AI enemy. Buckle up, and let's get started!

Enemy Health and Damage: A Tragic Demise

As someone who's not an expert in UI coding, this task was quite a challenge. However, fueled by determination (and a healthy dose of caffeine), I bravely ventured into the abyss.

Our first task was to create a EnemyHealth script that handles our enemies' health and inevitable demise. Piece of cake, right? To spice things up, we also added a BulletDamage script that applies damage to enemies upon collision. Finally, our enemies can meet their tragic (and well-deserved) end!

Loot System: It's Raining Items!

Next on the agenda: the loot system. After implementing a basic loot system where enemies drop items upon death, we added a LootTableItem scriptable object and a loot table to the EnemyHealth script. The DropLoot() method in the EnemyHealth script handles item drop chances and instantiation. It was a bit of a rollercoaster, but the satisfaction of seeing those precious items drop was worth it!

Particle Effects for Enemy Death and Item Spawn: A Beautiful Explosion

We thought, why not make our enemies' deaths even more extravagant? So, we added particle effects for enemy death and item spawn. Alas, our efforts were thwarted as the enemy GameObject vanished too quickly to savor the visual feast. But fear not, for we shall revisit and perfect these particle effects once we find a solution to make our enemies linger just a bit longer.

Flashing Effect on Damage: You Can't Touch This!

In an effort to add some pizzazz, we implemented a flashing effect for both the enemy and the player when they take damage. The FlashEffect() Coroutine, found in both the EnemyHealth and playerMovements scripts, temporarily changes the sprite color, creating an exciting flashing effect. Now, there's no hiding when you're hit!

Player Health, Damage, and UI: The Struggle Is Real

The pièce de résistance: the player's health, damage, and UI. This challenge was no walk in the park, but with sheer determination and a bit of hair-pulling, we emerged victorious. We even added the flashy effect to the player's TakeDamage() method, providing a visual cue when the player takes damage. No more blissful ignorance!

Our AI Enemy: A Surprising Ally

Due to some unforeseen circumstances, our artist's assets were unavailable. So, we turned to our trusty AI companion, Midjourney, to generate the enemy. While we plan to replace them in the future, I must say, that AI was a fantastic source of inspiration and world-building assistance. It seems artificial intelligence can be quite the creative sidekick! Here is a quick view of what we got :) 

Image 1 Image 2 Image 4

In conclusion, our journey through UI, inventory systems, and enemy creation was nothing short of exhilarating (and occasionally hair-raising). Despite the challenges, I found a newfound appreciation for UI coding (shh, don't tell the other coders). And who knows, maybe we'll continue to find hidden gems in our AI-generated enemies.

Stay tuned for more updates on our game's development! Until next time, happy coding, and game on!

Changelog: (04/20/2023)

  • Implemented EnemyHealth and BulletDamage scripts for improved combat
  • Developed basic loot system with LootTableItem scriptable object
  • Temporarily added particle effects for enemy death and item spawn
  • Created flashing effect for damage feedback on player and enemy
  • Enhanced player health, damage, and UI functionality
  • Utilized AI for enemy generation and creative inspiration

Files

Builds.zip Play in browser
Apr 22, 2023

Leave a comment

Log in with itch.io to leave a comment.