Devlog 1: Jumping In (09/09 - 20/09)


This week (and a bit of last week), the Wizard Colosseum project was started, to the point of taking it's first steps (quite literally!).

TL;DR: Made basic Rule Tiles for the walls and ground to look and work more nicely, and implemented basic movement for all Creatures to use, which now also die upon losing all their health.


Chapters

  1. Laying Down the Groundwork
  2. What is a Creature? A miserable little pile of secrets!
  3. Known Bugs & Issues


Laying Down the Groundwork

As staring at coloured squares all day can get quite tiresome, the first line of action for Wizard Colosseum was to create Tiles with the acquired sprites from KennyNL (see Devlog 0 for a bit more on that). The chosen angle of approach was to make some Tilemaps and utilise Rule Tiles (it's also my first time making them!) for simplified level remodelling later, notably when balancing the arena's final size.

Using Rule Tiles instead of standard Tiles allows for a single Rule Tile to be painted in the world, but it shifts it's appearance based on it's neighbours.

A simple demonstration showcasing differences between standard Tiles and Rule Tiles

The creation of the ground Rule Tile was quite straightforward, as there were very few total Tiles and states, but the wall Rule Tile was quite a task in comparison. To cut a long story short, much sanity was lost to appease the required conditions of the wall Rule Tile, but features like Custom Physics Shapes were discovered (and subsequently implemented) in tandem. Somewhat afterward, additional bleed was added to Tilemap Texture, which fixed the commonplace Tile tearing issue.

Appearances of Tile tearing in v0.1, and it's absence in v0.2 and onward (reduced to 25% speed)

Addendum: Simple box and barrel Tiles were also created, which have Colliders, which made them solid like walls.


What is a Creature? A miserable little pile of secrets!

A key selling point of Wizard Colossuem will potentially be the flashy spells. Since certain enemies will cast the same spells that the player's wizard can, it made sense (to me at least) to give all creatures use the same base "Creature" Class, and use the same backbone with minor differences placed on top.

To build from the bottom up, the Creature Class needed a way to move itself in the Scene. A Coroutine was written to animate smoothly from one tile to another (and another to rebound from Collisions), and a Method was made to activate the Coroutine with useful values. The player could press certains keys to activate this Method, which would give different values to the Coroutine, and in turn output clean movement in four directions. While this solution worked, this unfortunately made the approach to diagonal movement quite daunting to consider. The straightforward solution was to stop the Method giving values to the Coroutine and instead make it update some new Global Variables in the Creature Class. These could accomodate multiple subsequent inputs, and change the animation's final target even after the Coroutine had started (though this period was made quite brief to prevent teleporting during movement). The implemention of dashes afterward was spawned from a copy of this movement code with tweaked values, such as lowered wait times and increased travel distances.

A minor problem that arose from the use of engaging jumping animations in these movements, was the lack of visual depth in the world made said animations feel odd. These new jumping animations felt best moving Creatures "upward", but in a 2D game there is no "up" and "down" persay, "north" and the other cardinal directions are the only truly quantifiable ones. This issue required a stroke of creativity with the implementation of shadows! This started with the creation of a translucent shadow Prefab, which each Creature would Instanciate a new copy of. Once the shadows were placed into the movement's animation Coroutine and stripped of the vertical animation, they were effectively following the base Creature! Well, mostly...




From left to right: The rambunctious shadow, the impatient shadow, and the final obedient shadow (all taken at 25% speed)

With some additional trials and tribulations (mostly due to tiredness, hunger and bad offscreen code), Creatures finally had fully funtional shadows (the trick was to use the exact same movement code the Creature had, so yes the shadows got a Rigidbody, but it worked, so the code gets to stay :P).

Finally, in what was a mad dash to have the basics of Creatures completed, a health bar system was made. There were two square Sprite GameObjects to the health bar, one was red, the other green. Each Creature Instantiated their own health bar, and would update it's base position just like their shadow. Creatures were also given some placeholder Methods to deal and take damage in Collisions with other Creatures. When a Creature is hurt, it sent a new value to the health bar script, which would adjust the width and position of the green square relative to the red. And when a Creature loses all it's health, it is destroyed. Health bars used GameObjects in this manner to allow them to be layered in the Scene, to allow for large Creatures to obscure health bars of smaller Creatures behind them.

Currently, a simple Derived Class of the Creature Class is used so the enemies can follow the player wizard (which also uses its own for the player inputs). In later weeks, smarter Derived Classes based on the Creature Class will allow for additional behaviours.


Known Bugs & Issues

  • Damage values are being dealt to the wrong Creatures (e.g. ghost attacks should deal 1 damage, but right now ghosts only take 1 damage when hurt).
  • Creatures can occupy the same Tile (and phase into terrain), due to relaxed restrictions.
  • Cameras move slowly when returning from left and right boundaries.
  • Health bars could be on a World Space UI Canvas.
  • Wizard turns weirdly sometimes when moving diagonally.

Leave a comment

Log in with itch.io to leave a comment.