• Register

A deck building roguelike without turns - place cards from your hand onto a timeline along with the enemy actions. Match your blocks against their attacks, and your attacks against the gaps in their defense. Playable in browser on itch.io right now. Game is in very early development - all art is placeholder, and all mechanics are subject to change.

Post news Report RSS A difficult implementation

Some new cards added, with an interesting new mechanic.

Posted by on

A smaller update this week, most of my time was taken up implementing and troubleshooting the final card. As always, this update is live now and can be downloaded here or played in browser at Isochronalgames.itch.io

-Players can now click on the draw and discard piles to see the cards in there (though not the draw order)

SeeCardDecks   Copy

-Added a heal option to the shop that heals 10 - unlike the others, this doesn't double in price, instead just increasing by 5 each time its used.

-Added some basic sounds for attacks that play on the tick

-Added a settings menu that allows for volume control of those sounds

-Made the draw icon move smoothly with the timelines

-Fixed some minor bugs

-To let players see the new cards more easily, I upped the amount of cards shows when buying a new card to 4.

-Four new cards added

--Bind Wounds, a more powerful but interruptible heal


--Cleave, which hits all enemies for 5

Cleave   Copy


--Breather, which draws two cards

Breather   Copy


--Tactician, which allows you to predict enemy moves 20 ticks out

Tactician   Copy


--Wait For It, which doesn't do anything but whose length can be adjusted

WaitForItBasicUse   Copy

I've messed around with Wait For It a little, and I'm really happy with how it works, although I think it might need something of a nerf in the long run. It's also the most difficult thing I've implemented so far, and I'd like to talk about that in the dev log portion of this post.

The idea is pretty easy to explain - unlike most cards which have a set length, Wait For It can be anywhere from 1 to 8 ticks long. How long it is is up to the player, which allows them to line up future cards exactly how the want them. Very useful for dodging a big attack or timing an attack to interrupt an enemy.

My first thought for how to implement was to prompt a popup when the card was placed in the timeline where the player could enter a number and the card would become that long. That almost certainly would have been much easier, but it seemed clumsy and didn't match with the drag and drop feel of all other card placements. The more intuitive way to me was to allow the player to drag in Wait For It at full length, and then place another card to interrupt it, which is what I ended up doing.

My first attempt I thought it seemed pretty simple - I already had a method that found all the spots a card could be placed, I just had to modify it to also find those spots inside the Wait For It card, and then add something that would shorten the Canceled card.

That... didn't work.

FailedCancellableImplimentation

It was a mess. A bunch of strange inconsistent bugs, most of them sort of understandable but a few not. Although I didn't capture it, I managed to at some point completely destroy a dodge card, so it wasn't anywhere. I was never able to recreate that.

So I rolled back to my last commit (thank you Github!) and tried again. This time however I sat down with a pencil and paper and did some planning first. This is the process I landed on.

First I refactored a bunch of stuff in the timeline card handler to make it easier to work with. The big one was changing the way I stored the list of cards currently in the timeline. I went two separate arrays containing the cards locations and the cards, in the order they happened to be added, to a single array of dictionaries with a Card and a Location key, ordered by the order they were in the timeline. Previously cards didn't really care about what card came before or after them, but Wait For It did. This is also just better, and should enable some interesting things in the future like a card that buffs the one after it.

Then I set out a list of triggers and what should happen at each one.

When Card is looking for a playable position in timeline - Find the spot after every card, as well as every tick of a card with the Cancellable tag (just wait for it for now). However, it also had to find the hidden ticks of a card that had already been shortened, so it could be relengthened. It also needed to NOT find ticks that would normally be within a shortened card, but were now on the other side of a card played after it.

For example, if Wait For it is played at Tick 0 and would normally stretch to 8, but it got shortened to 2 by a 4 tick Dodge Roll, tick 7 is not longer a playable spot as that would leave a gap.

On card added to timeline - Check if the card placement intersects with a Cancellable card - if it does, find the first tick they intersect and remove all ticks on or after that tick from the cancellable card. Also, be sure to move all future cards back the same amount of ticks.

On card removed from timeline - Check if the card removed is directly after a card that has been shortened - if so, return that card to its original length and move all future cards forward the amount of restored ticks. Also, restore the removed card to its full length

WaitForItExtendedUse   Copy

In the end I was able to get it working without too much fudging, and I expect the infrastructure to be very useful in the future for other cards that can change their length dynamically. This was one of the first mechanics I came up with when paper prototyping, and while it was a lot easier to implement on the tabletop, I'm excited to have it in this version of the game. I think it really shows off what the timeline mechanic can do.

Next up - I would like to add some more combat variety, so I'll be working on adding some more enemies. As with the boss, any new mechanics might come over to the player side in new cards as well.

If you're interested and want to see what comes next, I'd love to have you follow along! You can also play the demo on my itch.io page here: Isochronalgames.itch.io

Sounds added this week can be found here:

Opengameart.org

Opengameart.org

Opengameart.org

Gifs in this were created using ScreenToGif - thank you ScreenToGif!

Post a comment

Your comment will be anonymous unless you join the community. Or sign in with your social account: