I’m Santiago Zapata, better known online as slashie, a Software Engineer and Independent Game Developer and from Medellín, Colombia.

You are in the devlog, a chronological collection of updates on my projects, alongside articles about software and game development. Subscribe to get these directly into your inbox.

Castle of the Vampire: Day 13, wrath of the relics

Published by

on

This has been a substantial change to how combat works in Castle of the Vampire. What started as a free-aim system for relics has grown into a more unified weapon system, with different firing patterns, consumable ammunition, and a tutorial that teaches the player to use ranged attacks as a core part of the game.

The goal is to make ranged combat something players actively use, rather than an alternative they forget about while walking into enemies.

Previously, using a relic meant choosing a direction to shoot. That worked, but it didn’t take full advantage of the tactical grid. I replaced directional firing with free targeting. Pressing F or the Relic button now starts aiming at the nearest visible enemy, preferring targets with a clear line of sight. If there are no enemies in sight, the cursor starts on the player.

From there, the player can move the targeting cursor with the arrow keys or D-pad, using Shift to jump five tiles. Tab cycles through visible enemies, nearest first. On the map, clicking or tapping moves the cursor, and a second tap on the target fires. F, Enter, Space, or the pad’s centre button fires the relic.

The projectile follows a Bresenham line toward the target, using the same approach enemies already use to shoot at the player. Shots stop at the relic’s range and the first blocking enemy, wall, keg, lever, or chest. The Sun Medallion and Flame Chalice can pierce beyond the selected target, continuing in the same direction up to their range; other relics stop at the cursor.

The interface now shows a tinted aiming line, a marker on the target tile, and a status line identifying the target, its HP, and the available controls. The Hourglass remains an exception because it has no target and activates immediately.

The Flame Chalice now attacks in a cone instead of firing along a single line. It covers a short range of four tiles and approximately 40 degrees on either side of the intended direction, affecting only tiles within clear sight.

The aiming highlight previews the cone, so the player can see which tiles will be affected before committing to the attack. Walls, doors, gates, and chests block the flames.

The animation spreads outward from the player in expanding rings, reusing the explosion replay system without its knockback. The inner flames are yellow, transitioning toward red at the outer edge. Effects are applied as each ring reaches its destination, and fire patches appear when the flames arrive. The fireball remains visible during hit flashes.

The cone can do considerably more than damage enemies. Creatures take five base damage plus half the player’s levels beyond the first. Fire-vulnerable creatures take double damage, and flammable ones catch fire. Kegs and crates can explode, poison gas and oil can ignite, and hidden plates and buried charges can be triggered. Flames linger for several turns, except on water.

The Storm Totem now fires four lightning bolts per use, each with a little inaccuracy. Instead of sending every bolt along exactly the same line, each is rotated randomly by up to 20 degrees on either side of the intended direction.

The targeting preview shows the whole spread rather than a single line. Each bolt travels along its own Bresenham line for up to five tiles, stopping at the first wall, keg, chest, or creature. Bolts can hit different enemies, and they still trigger levers, plates, and kegs along their paths.

The next change was more fundamental: I removed MP altogether.

Relics no longer have a magic-point cost. Their use is limited by charges instead, and a relic that reaches zero charges stays in the inventory rather than crumbling away. Trying to use an empty relic tells the player which potion can recharge it.

Three consumable potions now replenish relic charges:

  • StormSalt recharges the Wraith Sigil and Storm Totem.
  • EmberHeart recharges the Flame Chalice.
  • Solenne recharges the Sun Medallion.

Using a potion applies it to the equipped relic if compatible. Otherwise, it goes to the first matching relic that isn’t full. Each potion restores half of that relic’s charges. If there is no compatible relic, or the matching relic is already full, the potion is retained rather than wasted.

Potions stack up to ten per inventory slot, a rule also extended to healing potions so consumables behave consistently. Their colours distinguish the three varieties, and the inventory explains which relics each potion recharges.

The change also reaches beyond combat. The MP counter, magic crystals, relic costs, and related references were removed from screens, help and Look text. The debug healing command now recharges relics instead. Existing crystal drops were replaced with the new potions across chests, monster drops, treasure rooms, boss-stage kits, and the test range. Random drops favour the potion types used by the player’s relics, while the merchant sells all three for $7 each, with three of each available.

With charges replacing MP, I took the next step and unified relics and the Rune Sword under the concept of an equipped weapon.

Only one weapon can be equipped at a time. A new game starts with a fully charged Wraith Sigil equipped, holding 16 charges, and the Rune Sword in the inventory.

Bumping into an enemy now uses the equipped weapon. With a relic equipped, the player fires at the enemy and spends a charge. An empty relic does nothing and explains that it must be recharged or replaced with the sword. With the Rune Sword equipped, bump attacks perform the familiar melee strike. The Hourglass cannot attack through a bump, so it reports that it has no such attack.

The Rune Sword is equipped from the inventory just like a relic, but it cannot be dropped. The interface displays the equipped weapon and, for relics, its remaining charges.

I wanted the opening tutorial to teach the player to use ranged weapons, not simply to walk into an enemy. Stage 0 now replaces the owl with a “powder skeleton” standing on the opposite side of a lake. The lake is four tiles wide, and the stairs cannot be reached on foot until the skeleton is dealt with. The skeleton cannot cross the water, and the player cannot reach it by walking either.

When the skeleton comes into sight, the tutorial explains how to aim and fire the relic. Desktop players are told to press F to aim and then F again or Enter to fire. The phone instructions use the Relic button and the pad’s centre button instead.

Killing the powder skeleton triggers its explosion, which brings trees crashing down across the water to form a makeshift bridge. The game announces, “Trees come crashing down across the water: a way across!” The fallen trunks can be crossed, but movement over them is slow, like rubble. Looking at them identifies them as “Fallen trees, laid across the water.”

The gold that previously sat in the lake’s path was moved to the near side. Players can still skip the tutorial with Space, but the old hint about walking into an enemy has been removed. The tutorial now has one clear lesson: use a ranged weapon to solve a problem that melee cannot.

The next planned enemy change is to replace owls with cultists: low-health enemies that attack from range. This supports the same combat direction as the revised tutorial, giving ranged combat a role on both sides of the encounter.

I’m also adding an r command to reload the equipped sigil, and cultists are intended to have a high chance of dropping StormSalt. That would give players a more direct source of charges for their ranged weapon as they fight through the castle.

Leave a Reply

Discover more from Slashie's Gamedev Adventures

Subscribe now to keep reading and get access to the full archive.

Continue reading