Return to the shadows+blood mad revenant

I’ve beaten every optional new game plus level except for this one. The blood mad revenant makes mincemeat of my melee only units, even with high levels (52+) and a build to maximize armor due to porcupine which deals massive damage.

I managed to beat the first blood mad revenant wave somehow, but the second one overwhelmed me. Well, it probably would have. Game froze when lots of people started dying.

Does anyone have a strategy to deal with these rather annoying units?

To be fair, I’m not confident I have these guys correctly balanced yet - they may genuinely be too hard.

To clarify - have you beaten all other NG+ levels on all difficulties, or just the side missions? Does that include the super sheep? If so, how did you find his HP to be?

If you’ve beaten everything except that one mission, I’ll bet it’s just a bit too tough. Is it Porcupine in particular that’s screwing it up for you? That may need to be toned down a bit (in fact, I’ll go ahead and tone it down a little on my internal dev build). You’re not quite max level yet, but Porcupine at 336 damage is just a bit much I think. Ideally you should be avoiding melee units, but they have armor so you have to at least unleash some knights on them briefly.

Weird about the crash - does that happen often?

— Begin quote from "Nepene"

I’ve beaten every optional new game plus level except for this one. The blood mad revenant makes mincemeat of my melee only units, even with high levels (52+) and a build to maximize armor due to porcupine which deals massive damage.

I managed to beat the first blood mad revenant wave somehow, but the second one overwhelmed me. Well, it probably would have. Game froze when lots of people started dying.

Does anyone have a strategy to deal with these rather annoying units?

— End quote

Haven’t gotten there yet, but I expect that the key will be in respeccing for that level and using unique upgraded items with the right bonuses. What flavour is porcupine damage?
Plus, of course, switching off low-level skills so that they only dish out big hits, maybe respeccing heal spell to the max, evade/defense for both respecced as well. Certainly will give it a try soonish :slight_smile:

Porcupine is just straight up damage that fires when a melee unit hits them. Currently high level blood mads were doing 450 dmg per hit (so a berserker would basically suicide himself in one flurry). I’ve cut that down to about 150 (though not in the public build yet), which may still be high, but should be a lot more manageable.

— Begin quote from "Anthony"

To be fair, I’m not confident I have these guys correctly balanced yet - they may genuinely be too hard.

To clarify - have you beaten all other NG+ levels on all difficulties, or just the side missions? Does that include the super sheep? If so, how did you find his HP to be?

If you’ve beaten everything except that one mission, I’ll bet it’s just a bit too tough. Is it Porcupine in particular that’s screwing it up for you? That may need to be toned down a bit (in fact, I’ll go ahead and tone it down a little on my internal dev build). You’re not quite max level yet, but Porcupine at 336 damage is just a bit much I think. Ideally you should be avoiding melee units, but they have armor so you have to at least unleash some knights on them briefly.

Weird about the crash - does that happen often?

— End quote

Those guys can be dealt with in most levels. Lots of heals makes them survivable with a strong build, though they can destroy all your beserkers in seconds (as beserkers are fast), and they chew up knights pretty fast if unsupported. I don’t imagine that sort of thing is intentional- this game is in general pretty friendly to people and it’s rare that a second of inattention leads to losing. In that level you only gave us melee units. You can’t avoid using melee units. You have beserkers and knights to kill enemies with porcupine.

I’ve beaten most NG+ levels on all difficulties. I just did the right handed level. I am nowhere close to being able to beat that mad revenant level. All of the other enemies are pretty easy to defeat, and it’s doable to take down the mad one’s health. The reduction in porcupine damage should help a lot and make the level more managable.

I’ve tried the super sheep. I got it down to a bit over half health though I didn’t do it especially well. Zeals placed imperfectly, the odd bit of mana wasted. It might be possible to defeat but it’ll be pretty close to the line. With the chill resistance and its health it has 15 times the staying power of the prior sheep (or more, since you have to change your unit positions more often) and I am not doing 15 times the damage so it’ll be pretty hard, even fully levelled up.

On crashing- my units are dying a lot more frequently in NG+ and sometimes when they die a lot the game freezes. I don’t imagine this would have shown up often in the normal game.

Ahhhh - I forgot that was the melee-only level. That makes sense, and was very dumb of me, haha! I think I’ll remove them all together (and just replace them with the other cultists who don’t have porcupine) - that was a bit meaner than I meant to be. :slight_smile: I’ll bump up the porcupine damage a bit again then, though probably not quite to the full level it was at before.

As you may have noticed, I haven’t yet had time to play all of the levels, and when most of your design is on spreadsheets you occasionally miss this kind of thing. I’m working on playthroughs now that the content is done, but feedback like this from you guys is invaluable. :slight_smile:

I may need to unlock chill on the super sheep. That’s a level that really hasn’t been balanced at all, and I just kinda picked a ballpark number. I’d rather allow slowing the sheep down and keep the HP high - I’ll try that next. I may even be able to bump up the HP a little with chill enabled.

Interesting about the crashes - if you’re able to reproduce it regularly that could indicate a memory leak or something.

Just a random though, but what happens in code if two heroes die at precisely the same time?

— Begin quote from "delve"

Just a random though, but what happens in code if two heroes die at precisely the same time?

— End quote

This never happens :slight_smile: - in code, they die sequentially. So unless the death dialog includes timers, you’ll get two dialogues one right after another (if you have dialogues enabled) and two animations “at the same time” as much as with regular creeps dying.

— Begin quote from "Anthony"

Ahhhh - I forgot that was the melee-only level. That makes sense, and was very dumb of me, haha! I think I’ll remove them all together (and just replace them with the other cultists who don’t have porcupine) - that was a bit meaner than I meant to be. :slight_smile: I’ll bump up the porcupine damage a bit again then, though probably not quite to the full level it was at before.

As you may have noticed, I haven’t yet had time to play all of the levels, and when most of your design is on spreadsheets you occasionally miss this kind of thing. I’m working on playthroughs now that the content is done, but feedback like this from you guys is invaluable. :slight_smile:

— End quote

Glad to help.

— Begin quote from ____

Interesting about the crashes - if you’re able to reproduce it regularly that could indicate a memory leak or something.

— End quote

It’s not something I can reproduce regularly. It tends to happen after playing the game for a while. I’ll go into a fairly hard extreme level and at some point a bunch of my units will die. Normally an optional level where I can’t use healers effectively. Then my game will freeze, destroying all my progress and annoying me much.

I’ve normally turned off particle effects by that point as the game was already slowing. It’s a sequential process.

I’m really interested in these crash bugs, because I can’t seem to reproduce them at all.

This is my highest priority bug before release. So far all I’ve consistenly heard on this front is that if you play a battle for a while, eventually the game crashes? And it only happens sometimes? I’ll see if it’s related to defenders dying - that might explain why it only happens after you’ve been in a battle for a while.

@Delve:

You know, although two defenders can’t die simultaneously, two of them dying in the same update step might cause unanticipated problems, let me investigate there!

Success!

I’ve reproduced the bug (I think). After making liberal use of the F5 cheat key (kill selected thing) I’ve been summoning rows and rows of defenders, then pausing and killing them all at once. Play the clock forward and kill a bunch of enemies, summon rows and rows of defenders, kill them all again, eventually it freezes up.

And it’s not just any freeze, neither. There’s no unhandled error or anything, the whole application just hard crashes. This is likely a memory leak or other semi-related bug.

I was able to copy the stack trace before the crash. I’m going to see if I can repro this again and find the root cause.

Saw this in the command line window that FlashDevelop launches to test an AIR project:

“out of memory.”

So I think we have it there. It’s just a simple memory leak, and when it goes to far, it kills the world!
Significant observation: the ultra memory leak seems tied to killing and resummoning defenders.

I’m going to try to repro it with JUST killing defenders over and over again. If that doesn’t work, I’ll try filling the screen full of enemies and killing those all at once over and over again. My guess is it’s a flaw in defender recycling - enemy recycling is pretty optimized as it happens all the time, but defender death is rare enough that a bug in that code could go unnoticed for a long time.

Confirmed! Just summoning and executing a bunch of dudes over and over again is enough to repro this bug.

I was able to reproduce it by summoning my entire army (28 dudes total), executing them all with F5, rinse repeat. About the second time through the game hung up. I also noticed it getting progressively slower towards the end (as others have reported, and consistent with the memory leak hypothesis).

Running a second test - does recalling defenders in this manner (instead of executing them) also result in the same bug?

Answer:
Totally.

Happens around the same time, too. About two cycles. Theoretically mass-summoning/killing/re-summoning should hit a memory plateau as it just re-uses dead defenders, but there’s obviously a leak somewhere. Time to profile.

Fear not, noble sirs and ladies, for Lars is on the job!

Wow.

Just wow.

This is the mother of all memory leaks.

It’s like I was casually chipping away at the stone floor of my basement when it all cracked open all of a sudden and I fall into a giant pit below and saw a huge, bloated dragon staring at me with one eye half-open.

Here’s what I found: there’s a major bug in the way I’ve been using the flixel engine to cache bitmaps. Flixel is smart, and will only use one master copy of a bitmapdata when there are multiple things of that type on screen. So if you’ve got multiple monsters all of one type, or multiple status effect, or multiple buttons, etc, it will draw all of those individual instances of the same thing by copying from the same basic pixel bucket.

However, sometimes you need a unique set of pixels, like with defenders, who are all colored independently of one another. These are set to “unique.” However…

Apparently, any graphics I set to unique are never, ever, being cleaned out of the graphics cache. I do clear the cache after a battle, but during battle, it just fills up. Every time you summon a defender, that’s a new graphic. Sell him and resummon? New graphic. Also all the ghost icons are counted separately too. Just summoning one guy over and over will fill up the cache. And the worst part is, it’s bitmapdata - raw pixels. That stuff is huuuuge and it adds up fast. I’m amazed the game was able to run at all before this!

The fix is fortunately quite simple. I just keep a record of the unique key for a unique graphic, and when it’s destructed, manually remove it from the cache. Normally I want to leave things in the cache since they might get reused again later and I want to avoid an allocation, but for something that’s unique, there’s only one, so it should get deleted as soon as it’s not being used anymore.

Memory leak is solved. I can now mass-summon and mass-recall/mass-execute my party over and over again without the game crashing. It also doesn’t seem to slow down as much, either.

The fix will be in version 0.9.55, not sure if I’ll have time to upload it before I have to run, since it’s pretty late in the day, but I will upload it tomorrow morning in that case.

http://www.aeonity.com/ab/soundboards/video-game/nba-jam.php

Good job!