More randomness and new features


Hello!

I'm quite happy with the latest update. I learned a lot of new concepts with Godot and it makes the game way more fun. Here is a list of changes since previous version:

  • Player and relics spawning position are now random, more replayability!
  • Campfire now emits light, this makes the journey a bit less dark
  • The dungeon more than doubled its size, you have way more area to explore
  • Controller support, you can entirely play the game with a controller
  • Full keyboard support, a mouse isn't required anymore for the menus or for attacking

I was afraid that adding random spawning location would be complicated, it did turn out it wasn't that hard. A simple way to proceed was to iterate over the tiles and pick the location of a random tile of type "ground". I added a simple check for relics to avoid spawning a relic too close to another. As for zombies, I was using a 2DPath and a 2DPathFollow, this was replaced with similar code looking for a ground tile, except I added a condition to spawn not too close of the player but not too far, this makes the game more challenging because zombies spawned are now in your area.

The whole randomness change made the level design easier as I didn't had to take care of where to spawn the zombies or if I should add a relic or not in a new room. This was then easy to draw a few more rooms, connect to the existing one and voilà.

The controller support was super easy to do using Godot as it takes care of managing the controller, I just had to associate actions to buttons with my controller and it works. Because of the previous target system (using the mouse to point your sword and click to swing it), I chose to make four actions: attack up/left/down/right, mapped to the controller buttons but also to the keyboard i j k l keys, allowing players to play without a mouse. It's a welcome addition because playing with a touchpad was way to hard.

All the code is already published on the git repository, feel free to write me if you want to contribute.

Files

zhack_web.zip Play in browser
Apr 30, 2022
Z-hack Windows 64 bits
External
Apr 29, 2022
Z-hack Linux 64 bits
External
Apr 29, 2022

Get z-hack

Leave a comment

Log in with itch.io to leave a comment.