Build0.0008 - Cockroaches!


HOW'S IT GOING?

        Well, It could be better. I had a couple Twitch and YouTube projects in mind so I wanted to build a PC to handle more demanding tasks such as video rendering and streaming.

        Although I had bought the parts and they had arrived in no time, my power supply unit was subject to another DOA case, which means 'dead on arrival', and I couldn't begin my projects right away. Sadly, I need to wait for a couple more weeks to begin...





SORRY FOR THAT, HOW ABOUT THE PROJECT THOUGH?

        It's going perfect and as planned! This post covers all builds since the last post to be more comprehensive. As you can get from the title, oh boy it contains many bug fixes!

  • First of all, I  implemented character dodge and enemy attack systems at least to make the game playable at some point. Here is the first result after basic implementation.


  • After the basic mechanics, sprite positions were not correct during animations so I created a function to control z-index of sprites.
  • Created a function that picks random attack intervals for enemies.
  • Placed calls to functions during animations to catch the exact moment where the character dodges. Here is an example of how to make it on Godot Engine:



  • Added a function similar to the heroes' so now enemies can attack too.
  • Implemented a couple configuration functions for entities so the main game scene now can instance every character properly without the game crashing.
  • Learned how to use .json files in order to create game saves and entity attribute dictionaries, now each enemy have their name in the dictionary for further development and heroes have save files of their own.
    • Simply, created a singleton to store save and load functions and used to_json() and parse_json() built-in methods.
    • Here in the Godot Documents you can find an example to fit into your own project!
  • After polishing the animations I created before and fixing bugs that was crashing the game, here is how it looks now:


WHERE ARE THE COCKROACHES?

        Well said! Actually they are not cockroaches to be honest, they seems to be more like ladybugs that wear cockroach costumes. Although these bugs took me some hours to fix, the way to fix them was almost effortless.

  • Somehow the engine could not recognize some of the essential functions of the inherited base classes while I was working on implementation of dodge and attack states.
    • After hours of searching for a fix on the internet, I couldn't find anything related to the problem instead of waiting for a new version of the engine.
    • Then, I simply duplicated the function from the base class to the derived class and everything worked fine...
  • The game scene was not updating the relevant entities during runtime which was causing crashes after the death of them, so I created a couple functions for now to update the entities constantly, let's say, for each frame...


WHAT'S THE NEXT STEP?

        Considering that the game is partially playable now, I think I'll be adding some new attack patterns for enemies and maybe a couple new feature to make the game a bit more interesting at first sight. Frank is much looking forward to swing his sword against stronger enemies...


ANYTHING ELSE?

        Not much, but I started including some sneak peaks from the future updates in the posts I share on Instagram, be sure to check it out!

Leave a comment

Log in with itch.io to leave a comment.