Every day I'm shuffling

Had an issue with the shuffling mechanic.  More specifically when I went to grab the cards from the discard deck and then put them into the main deck for shuffling there were none even though I saw them go in.  The issue was my class for the CombatScreen was not passing the values back and forth reliably.  Rather than waste brain sweat on it, I just globaled them.  I would rather than done a programming pattern but I want to see if I can actually finish this rather than have it be a bunch of bits languishing on my computer.

I will say that the game is pretty playable at this point. There are some gotchas but for the most part if you kill a monster you can move onto killing other ones.  As long as you got the cards you can clear the level.  However there are a couple bugs like always.  One being that you can't put a card on the monster and have it discard.  It crashes currently.  Plus I want to have the ability to discard cards if you want to draw more.  I.e. you only draw 2 cards if your hand is lower than 3 so if you have 4 you won't get new cards.  The mechanic to fix this is just allow the player to discard up to their hand.  This is going to get tricky with magic items since they will stay out on the board and not get discarded.  That permanence is going to be an interesting coding challenge.

In discussion with a friend today we talked about having specific side dungeons based on monster type like a Goblin warren or a dragon lair.  Obviously not this iteration.  But something to consider.

So I got through a bunch of ToDos yesterday and today.  My next big thing for tomorrow and Thursday is going to be "Pick New Card Screen"  

This will be a way for the player to add new cards to his deck after he has defeated a monster.  They need to be able to pick one card from a choice of 2 or just ignore the new cards to keep their deck lean.  There are 10 monsters on the first level.  If they defeated all of them the end result would be an 18 card deck which makes it harder to cycle through and will weight their deck towards some element.  This could be something they want to do depending on strategies.  Last time I talked about what some of the monster special abilities were.  Here are some of the card special abilities:

fire = level damage or multiple damage
air = draw and/or discard
earth = stun or armor
water = heal or copy a card

So depending on the type of deck maybe you go fire air and work to cycle a bunch of damage cards.  Or Earth / water to heal and armor up so they can't hurt you.

Yeah Fire says multiple damage.  My goal is to have Pack creatures which have multiple creatures attack you and the ultimate plan is that when you hit end turn the rest of the monsters in the dungeon get a move which could have them join the battle.

[x] Move deck hand and discard to global variables
[x] figure out why the discard pile doesn't grow each time. passing variables back and forth isn't working.
[x] reset turn button
[x] do damage to player
[x] handle screen disappearance better - center on player

[x] comment out drakes
[x] work on killing hounds
[x] end turn computes damage etc.
[x] Discard Cards

Keep on Decking

So the hope was this weekend I could figure out how to do damage to the monsters via card dragging and dropping.

I got the drag and drop figured out Friday but the damage track got a little tricky to code.  I had several false starts and there are a few bugs that I still need to work through.

Most Elemental hounds are element as the first requirement and then any card as the second.  I think there is a bug if we did 2 as a damage level.  Still need to test that out.

Plus if there are double elements I need to test that out as well.  However as you can see in the picture I got it down for water and any card to kill this Hound.

Now End turn needs to do a final check to confirm that monster is dead and then determine if they can give out cards or not.  In this case I would get a water card of level 1.  I need to kill a Drake to get access to level 2 cards.  Of course drakes have their own set of difficulties.  They come with a double element requirement for first damage level.  Also when they attack they do an extra effect.

fire - Burn damage - if no armor more damage is done
air - discard # - discard a number of cards
earth - stun - can only draw 1 card 
water - heal themselves

These are the basic effects per element but there will be more as the monsters get tougher deeper into the dungeon you go.


Back to coding

Latest game concept is from DragonFire the game.  Basically a spiritual successor to the ShadowRun: Crossfire card game.  Cards are used to defeat monsters but for the most part you need at least 2 and perferrably 4 players to play the game correctly.

So I thought why not make a roguelike that uses cards to defeat monsters.  Similar to Slay the Spire but with movement and a continuous hand drawn.  Magic items were part of your deck like Dragonfire and would stay if stated otherwise you would have to draw them to use them.

Working on getting the basics to work.  The screenshot below shows where we are at.  Basically I am just extending the RogueSharp Tutorial for Monogame to include different combat mechanics and different monsters.  Below is showing debug options where you can see the monsters anywhere.  The Hand shown is so you can judge who you can take on with your current hand.

Later on I added more monster types.  Clearly I need art work but this works for now in terms of testing.

First image of my combat screen, the mouse is over the first card giving it a bump up:

ToDos for the weekend are:

[] once dropped card overlays bottom half of monster and marks off damage virtually
Wound track

The goal here is to temporarily tag the enemy with cards you drop on it to determine damage. 

[] Show Reset Button on CombatScreen

I want to reset combat screen so you can rethink your turn.  The cards don't go into effect until you hit end turn.  The end goal on end turn is that the rest of the world will have a turn as well.  Potentially adding more monsters for you to fight if you don't kill this one quickly.


ToDos I completed yesterday were:

[x] Drag and drop card onto monster - needs tweaking but working
[x] Reset Turn Button - sprite

Finished the Tutorial onto the hard stuff.

Finished the last Monogame Tutorial for RogueSharp 

There were a couple of gotchas.  

1) I messed up in removing the scaling code and was still scaling the enemies so they were super small compared to my player.  Found that bug.

2) The dice code that was part of RogueSharp changed both in scope and in effect so had to do some updating of his calling code as well as constructors.  He had dice being created from Die as a collection.  His new pattern was just a string to hold the dice notation in.  So calling code as well as constructors had to be updated to match the new pattern.

3) When the enemy finally found the player the shortestPath call ended up throwing a null reference exception. So I added in a quick handler to ignore the call when you are actually on the enemy.


Now comes the fun part.  Completely rewriting how the combat works to use cards.  I got visitors from out of town on Wednesday this week so hopefully I can make some stabs at it before then. Otherwise it will be after Easter the next time I will have fun coding time.


First snag on tutorial 4

For Rogue Sharp  the author changed the shortestpath return from a single cell to a Ienumberable collection of cells.  This caused the ShortestPath return result to fail to compile. It wasn't hard to just change the 4 lines to match it up but definitely though it was going to be too easy to move from roguesharp 2 to 3.  

The other fail that was a little trickier to figure out was that I wasn't setting the initial state of the game to PlayerTurn so I couldn't do anything when I entered the game.  I had to check the source code for Rogue Sharp for this answer.

Finished 3rd part of the tutorial

Finished the 3rd part of RogueSharp Monogame tutorial.  There are a couple gotchas in terms of classes that have been moved but VS picks up on them and the hints get them sorted out.  

Design:  So start with 8 cards: 2 each of Earth, Fire, Air, and Water.  Monsters will be colored to indicate which type they are.  When you defeat them they will have a couple cards to choose from that you can grab. building up your deck.  Not sure on draw mechanic.  That is the stingy part of Dragonfire.  you only get to draw two cards during draw phase.  I would like more but I can see how that can be too powerful.  Also since currently I am planning solo dungeon run the assist cards can't really help.  Though maybe I can add a party to it later on and you can control multiple hands.

Of course first step is finish the tutorial.

Health - back to eating as few carbs as possible and working out.  Like everyone does that is fit.



Wow long drought but I'm back.

So where to begin.

DBP 2017 - didn't enter.  Had a few contract gigs that kept me busy til the end of the year.

Game: working through this tutorial via monogame: RogueSharp Monogame Tutorial

Thinking of doing a mashup between that and DragonFire (for combat) 


Life: New kid in July - boy this time.  Nervous since I know how to handle girls from 0-4 so far.

Health: no carbs til April to see how blood tests go.

Weekly blog to continue.

Carry on.

DBP 2017

So hopefully I can keep the momentum going while doing Dream Build Play 2017.  Just grabbed a gif creator so that once I get those asteroids moving we can start getting some cool shots.

ToDo List for Sept 9th (normally I'll sprint each week but going out of town for Labor Day weekend so might have less time)

  • Move Asteroids Move
  • Shoot from space station to asteroid on click of asteroid
  • Blow up asteroid
  • Collect Pieces
  • In Station Screen
  • Main Game Screen
  • Toggle between the two
  • Credits screen (give props to the open game art asset authors I am using)

That list seems long so I am going to stop here and we can see how much progress is made.  I need to get to the point where I can start with a super MVP and have my co-designer start working on the design and tightening game play.

Dream Play Build 2017

So many things since April.

Health:  Signed up for 10k Turkey Trot.  Working on getting back up to running that distance.

Game:  Signed up for Dream Play Build 2017.  Going to see about making a mash up of Trade wars, Eve, and MagiKarp.  We shall see.  Either way it should be fun.

Contract:  Still working.  Got a few projects in the pipeline and when not running or taking a break coding the game I am doing this in the evenings.

Screen shot of just some sprites laid out:

Ups and Downs

So I am 4/5 this week for working out and plan on making it 5/5 tomorrow morning.  I have my alarm set for 6am for the weekday and run into the garage and get a quick workout in.  The only day I missed the morning was Tuesday but I got it covered that afternoon cause my kids were asleep when I got home.  Also I picked up a FitBit Blaze so I have been hitting my walking goal of 8k each day.  I'll probably up that next month but for now it works.

Unity Coding: Stalled.  The course I am taking was holding my hand and then just stopped and said now fill out 4 pages of code and we can continue.  It isn't hard just haven't spent the time on it yet.

Contract:  The reason for no Unity is that I got a contract and I am working on gaining a second.  So that has kept my free time pretty packed.

Game:  None

Game Design:  Been thinking a lot about match 3.  How to combine it with other game types.  Like a match3 plus rpg (puzzle pirates)  or match 3 plus an rts or builder game.  Not 100 percent sure what that would look like but we shall see.