Learn You a Game Jam Day 12 (I think) - UI/Map/Character


Itch ate my notes from yesterday.  Plus I think I've been misnumbering my days at some point.  So DAY 12!

Yesterday I put down a Map and fleshed it out a bit.  It looks great, although I haven't done anything to the town part except the ground.  I haven't even started on the generators - a Priest bug was bothering me and I spent too much time on it.  I thought they were skipping their animations and just mega healing everything super fast, but it turns out nothing was dealing damage.

I had commented out the code that transfers the character strength into the DamageZone damage variable on the Guildie because there was no damage zone, so when I upgraded the slimes I needed to turn this back on.  The preists had nothing to heal, except when the MainTank damaged them.

That's the other problem - my MainTank is hitting my Friend - not all the time, but usually.  But the plus side - I learned about BREAKS!  I'm pretty sure I knew about them, but its been a while since I've done this level of coding and I had forgotten about Debug tools in general and was using prints to monitor variables and debug.

I also got a simple autoscroller going, and I will have it trigger when the Guilie picks up the Recruiter's Broadsword.  The Y of the camera will follow the Recruiter, but the X will churn along at a reasonable pace to the right.  I want the whole game to take about 3 min from start to finish.  I'm not trying to take up anyone's day, especially with an autoscroll.

Ok, so today is supposed to be UI, Sound, and Music but some of that might be pushed to polish.  Overall I have this issue with Friendly Fire to resolve and I need to make an Archer and another Enemy at least.  The Map needs to be finished and I want to add a boss.  

Then the UI needs to be able to turn on and off Damage Bars, Current Action, and Item Held.  Credits for the Assets I'm using and myself, a Title, starting the game, and dealing with deal and an ending it when you kill the boss.

I can do this!

First I have to rehookup death animation/effects.  When I separated the Character and Type Cores the death animation broke and I never fixed it.  Things have to die!

Tried to fix it, now its no damage to the slimes, and my Guildies aren't even dying when I kill them.  How dare they!  Gotta get this Main Tank damage situation figured out before I can go forward.

I got the death animation problem fixed, it was with the Lottery.  Normally the animation started by an ACTION command sets a timer for the lottery to keep doing the same animation, but the DEATH animation was triggerd by the damage, caused by a body collision.  I had to have the lottery check for Is Alive flag on the character before trying to make a decision.... obv.

I added flags to the game stats that I thought would be useful, and triggered them when appropriate even if I didn't know exactly what would need it. This is a good case - the is_alive flag was being turned off by check_for_death() already so all I I had it to check for the lottery call.

Is_Alive flag being turned off is a fantastic and dark euphemism!

The words "is_instance_valid" are about to be my new best friend!

if not is_instance_valid(node_id):
return

No more crashing the game trying to do something to a released object!  ERROR CHECKING!  Also I think I was messing with the Visibility Mask and Layer insead of the Collision ones on some of these, plus I just deleted the code setting these all together for Guildies and made sure I was setting the RIGHT number boxes array in the Inspector.  No more Friendly Fire!

OK, in business.  Major issues have been solved.

I still have to make Generators for Guildies and Monsters and then do a loot drop system.  That's not too bad on the technical side.

Then its iteration and polish - the good stuff.

Speaking of iteration:

On. To. Archer.... Finally.

Long time coming buddy, lets get you suited up!

And that was... well not easy, but not COMPLICATED.  I made some adjustments on Rally/Attack/Heal/PickUpItem behavior and will continue to tweak them, but...

WE HAVE AN ARMY!

RAISE ARMS MEN, THE SLIMES ARE ATTACKING THE WELL!

I need to make the Monsters compelled to attack the tank more than the others.  I had a Tank Multiplier that should work better, but the slimes are all over the place even when I pump it up.  I'm going with a different method - a PREHOPPER!

The PREHOPPER is just an array of TICKETS just like the hopper, only the character doesn't put these in... someone else does for the next time they are going to make a decision.  When the hopper is cleared for the next lottery, the first tickets that get added are the PREHOPPER ones....

or... or I could just move the clear hopper to AFTER the lottery pick and then because the HOPPER is already an exported variable anyone can add TICKETS to it at any time.  They just won't CHECK it until they are done with the current action (wait timer timesout).

Huh, that was easy.  Now I just have a PREHOPPER_taunt_foes(): function that the MainTankType (and any other tanking types) makes every process loop to add ATTACK ME! tickets to the hoppers of all FOES - up to a certain amount (check to see how many of this exact ticket there are already and don't go past a max) so that when the FOE is in an animation they don't have 100000000000 ATTACK ME! in their hoppers when 500 will do.

Which means I have to add the lookup tables to the MainTank, no problem I just copy the Variables, Functions, and the Call in the Process needed from one of the other Guildies.  Then copy the Archer Foe scan and instead of adding tickets to the MainTank hopper with add tickets, we will add them to the hoppers of the current foe.

But no mater how many tickets I add they don't seem to attack the tank. Another time for Taunts.

I got to get a Door generator up and running.  This will periodically spit out a new Guildie and is the only way the game will start.  There will be a scattering of items in the village, including the Recruiter Broadsword.  When the game start, the Door generators will start and one will eventually spit out a Guildie that will then, CHOOSE ITS DESTINY!

Once one picks up the Recruiters Broadsword the Autoscroller will go until it triggers the boss fight at the end.  When the boss is defeated, all the enemies will die Avengers/Episode 1 style.  Victory screen, Quit, Play again?

That's the game, and its almost done!

And doors are done.  A marker that has a 1 in 1000 chance of producing a Guile - just generating a blank Character scene at the spot of the marker and making it a child of the Character node where all the characters are made... done!  Even set it to turn off when 200 pixels away from the camera.

Now things are coming together!

Ok, I could get the enemy generator going now, but I think I want to get Autoscrolling working like I want. The guildies will come out of doors, picking up Items until one picks up the Broadsword and starts the Autoscroller.  I also want to shrink down the MainTank sprite a bit to be a BIT more inline with the rest of the Guildies.  Right now its a pretty big jump in scale and it looks way off.

Got the door routine to work when its both near the camera for when its on screen, and it really pumps out Guildies if the MainTank is near by, doing some recruitment.

Speaking of which, my perfomance is tanking on so many guildies, and my guess is 1) I need to reduce the Hopper size by making it a tally for each type of ticket rather than individual arrays for each ticket entry. 2) Maybe switch to 2DBox if that doesn't help.

I think I know how to pick a random selection like this, but not being able to just use the Array function on the hopper sucks.  Plus I have to copy it to all the other types because my stupid ass doesn't know how to build this right and I don't want to tear it apart at the juncture.  Any change I do to one I have to do to all, which is why I'm holding off on the melee types for now.

I think that's good for logging today, I mostly just have to buckle down and work.  It looks like I will actually get to use my polish days for POLISH!

Get Guildies

Leave a comment

Log in with itch.io to leave a comment.