A difficult implementation


A smaller update this week, most of my time was taken up implementing and troubleshooting the final card. As always, all these changes are live and playable on the main game page, so take a look if these seem interesting!

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


-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.

-Five new cards added

--Bind Wounds, a more powerful but interruptible heal


--Cleave, which hits all enemies for 5


--Breather, which draws two cards


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


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


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.


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


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.

Sounds added this week can be found here:

https://opengameart.org/content/3-melee-sounds

https://opengameart.org/content/37-hitspunches

https://opengameart.org/content/punches-hits-swords-and-squishes

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

Get Moment to Moment

Comments

Log in with itch.io to leave a comment.

(+1)

I think the game is feeling pretty good.   There are a lot of interesting decisions to make and enough tools to consistently beat the boss even with bad rng (and it's often a close fight, which is good I think).

There was also something I hadn't noticed before about the number of cards played per turn.  When I first played, I naturally was playing cards to address everything visible, and this is why I mentioned feeling like I needed to play safer.  But then I realized you'd almost never want to play more than 1 card at a time anyway, or just enough to meet the draw card tick.  Having more options is so important and there doesn't seem to be a reason to play more cards than that (or I haven't noticed it yet).  Seems like it would be cool to have incentives for playing multiple cards on a turn.  Do you have ideas or plans for that?

Feel free to hit me up on Discord if you ever want to discuss the game: eternalsandsm

(+1)

That's good to hear, thank you! Hopefully I can keep it feeling an alright level of difficulty as I start to add more enemies.

My current plan to incentivize playing more than one card at a time is with cards that work better if you do so. Like cards that do more damage the farther out in the timeline they're played, or a combo tag that makes cards more powerful when two or more combo cards are played at once, or a card that can 'share' wait ticks with a card played before or after it. That way people who want to play riskier have an incentive to do so, while people who want to play it safe one card at a time can just avoid those combo cards.

If that ends up not being enough, I thought about adding a mechanic that would add 2 or 3 empty ticks at the end whenever you finalize a play. That would incentivize people to play as many cards as they could at once, to minimize those wasted ticks. I'm worried that would feel bad though, like a punishment. I think that's the sort of thing that can only really coming out in playtesting.

I might do that! It would be nice to have someone to bounce ideas off of if you'd be willing.

Thanks as always for your time and for the feedback.