ochadenas / cpudefense

A tower defense game for Android based on a microprocessor theme
MIT License
116 stars 10 forks source link

Inconsistency regarding which attacker chip attacks #107

Closed vertigo220 closed 6 months ago

vertigo220 commented 7 months ago

There doesn't seem to be any clear rules as to how a chip chooses which attacker to attack when more than one is passing through the chip simultaneously. I took damage in one game because the SUB chip right before the core attacked the second one passing through it (i.e. the one farther from the core), and by the time it recharged the other one had already moved past it. Had it attacked the first one first, it might have recharged in time to attack the second one. I thought maybe it focused on the stronger one, but then one or two games later, I took damage again, this time because the SHR chip before the SUB chip attacked the first and weaker attacker, leaving the stronger one for the SUB chip to deal with, which obviously it couldn't. So in both situations, they attacked the opposite of what they ideally should have.

Which segues into another issue with this game, which is that it's very RNG/luck-based. I've made easily 20+ attempts now at level 23, and while a good portion of the games I've been able to get pretty far along until something like the above happens, many games I didn't even have a chance to get very far due to the randomness of the attacker values and groupings causing too many to be too close together to even be possible to defeat. Level 8 is another one that is very luck-based. Playing it on turbo mode (which until this level has been very easy, easier than many levels in normal mode, which brings up another issue: erratic difficulty) attackers will randomly go straight through, making them impossible to stop.

Cwpute commented 7 months ago

I noticed this happen too, but it never got difficult to a point where i couldn't get through some levels i believe. You might want to reduce the frequency of attackers with recruit upgrades maybe !

I know some tower defense games which allow you to choose a general strategy for all your defenses. Some allow you to fine-tune the behavior per defense-type, and some even per defense unit ! Behaviors i've seen:

  1. attack the weakest/strongest ennemy
  2. attack the closest/furthest from your base
  3. attack the closest/furthest from the defense unit
  4. attack player-targeted unit

But i don't think these options must be made freely available to us, as it would probably add too much options on the game screen. Maybe out of the game, on the recruits page maybe ? but even then, i feel it would give us too much options for something that wouldn't impact the game that much right now.

The safest bet would probably be to change the behavior of all chips to attack the attacker that is closest to the Core. In most cases, i think that's what we expect the chips to do!

Regarding erratic difficulty: i'm pretty sure this has to do with recruit upgrades not alligning with the great difference in level difficulty types, requiring you to reset your recruits regularly to adapt. I've tried to suggest a fitting-solution in #84 and some other separate issues, if you'd like to contribute.

ochadenas commented 6 months ago

There is no defined rule which attacker is chosen if there are more than one possibilities. I think that generally it will be the first one created, which in turn will usually be the first one to enter the chip's range. But there is no guarantee that this is actually the case. They are in an unordered list, it is undefined which one comes first.

This could perhaps be changed, although "closest to the core" is probably not possible (the chip doesn't know where the cpu is). But on the other hand this would add much complexity.

I agree with cwpute that if situations like these happen often to you, then there are too many attackers, and you should revise your strategy. Speed up the chips with CLK, use ACC chips, or upgrade the appropriate heroes (such as Vaughan or LHC).

I think that a certain randomness in the game is desired, as long as it's not completely luck-dependend. I mean, this is not chess. There is not the one and only optimal strategy in every situation. This may sometimes mean that one cannot avoid losing a life. Well, shit happens. It's a game. Just go on and replay the level later.

However, cwpute is right also in that the difficulties of the levels and the strength of the heroes need better alignment. It's generally difficult to estimate beforehand what consequences all these numbers have, and what impact to game play. For example this dreaded level 8 where many players seem to have problems with. And some heroes are too weak to be of much use. So I'm relying very much on your feedback to fine-tune the whole game.

ochadenas commented 6 months ago

Tried to implement the following: SUB chips target the weakest attacker. All other chips target the strongest attacker.

Usually that should be the desired behaviour, I suppose.

vertigo220 commented 6 months ago

Tried to implement the following: SUB chips target the weakest attacker. All other chips target the strongest attacker.

Usually that should be the desired behaviour, I suppose.

I'm not sure. Usually sub chips are placed last, to pick off the 0s and weakened attackers. So it's not like you'd want them to attack the weakest to have a better chance to kill it while leaving stronger ones for other chips, because often there are no other chips. By the time an attacker reaches a sub chip, typically that's it, and it's all or nothing. This means it's better to target the first attacker, so it can hopefully recharge in time to damage the next one as well. Of course, it's possible there are more than one sub chips in series, in which case it might be better to target the stronger attackers in order to weaken them enough so hopefully the next sub chip(s) can finish them off, but I'd say that's less likely. Perhaps sub chips could be the only ones to allow selecting the targeting mechanism, or they could target the first if there are no other sub chips between them and the core and target the strongest if there are (though not sure if this is possible since you said they don't know where the core is, but maybe they (can) know what is and isn't downstream).

I agree with cwpute that if situations like these happen often to you, then there are too many attackers, and you should revise your strategy. Speed up the chips with CLK, use ACC chips, or upgrade the appropriate heroes (such as Vaughan or LHC).

Not often, just once in a while, which suggests it's a level design issue more than anything, but certainly with balancing and hero elements. I've been able to do every level perfectly so far (currently on endless 8 which is proving exceptionally challenging), so obviously it's possible, but there were definitely a few levels that jumped significantly in difficulty, and this particular issue was at least part of that cause on one or two of them. Also, I seem to have better success most of the time just using more SHR chips than trying to use ACC ones. I use them sometimes, and they do seem to help sometimes, but many times when I've struggled while using them, I've done better by just using SHR chips in their place.

I think that a certain randomness in the game is desired, as long as it's not completely luck-dependend. I mean, this is not chess. There is not the one and only optimal strategy in every situation. This may sometimes mean that one cannot avoid losing a life. Well, shit happens. It's a game. Just go on and replay the level later.

It's a game, yes, but games should be able to be beat perfectly. For TD games, it should be possible to do so on each level, ideally without having to come back later after getting stronger. And I think it is in this game (though I'm not 100% sure, since I had to come back to a handful of levels to get all the coins due to #103, and it's not consistently possible and often requires restarting over and over due to various issues out of the player's control), it's just that a small handful of them suddenly get much harder than the previous level(s), only to usually get easier again on the next one, just due to the design of some of them, combined with things like this. And don't get me wrong, it should be difficult, but the difficulty really goes up and down a lot, either being too easy much of time or very hard sometimes, with little in between and the difficulty feeling more due to randomness rather than having to figure it out and plan things properly. Knowing which way attackers will go and needing to set up proper defenses is good difficulty; not being able to tell which route they'll take, having them randomly go this way and that, and especially having them sometimes just go straight for the core without having any chance of stopping them is bad difficulty.

Regarding erratic difficulty: i'm pretty sure this has to do with recruit upgrades not alligning with the great difference in level difficulty types, requiring you to reset your recruits regularly to adapt. I've tried to suggest a fitting-solution in #84 and some other separate issues, if you'd like to contribute.

Possibly, but it happened even early on, before heroes really played a big role. Or maybe I just hadn't upgraded them enough or properly even then, hard to say now. But as I mentioned above, throughout the entire game the difficulty has been up and down a lot, generally being easy or very difficult, with little in-between, and with jumps rather than gradual progression.

ochadenas commented 6 months ago

I've done the following now:

This should eliminate two major difficulty spikes.

What other levels are there that you consider too easy or too difficult?

vertigo220 commented 6 months ago

Hard to remember, but both @Cwpute and myself have found level 23 to be particularly difficult, though they found the turbo version hard, whereas I didn't have much trouble at all on that one (probably a difference of heroes), whereas I found the normal version difficult (perhaps I just hadn't upgraded my heroes yet, or not properly). Frankly, I found the turbo levels to be generally much easier than the normal ones, which may be partly due to having the game a bit more figured out, but I think it was mostly due to the heroes making things so much (too much?) easier.

Cwpute commented 6 months ago

It's a game, yes, but games should be able to be beat perfectly.

I strongly disagree with that 😄 but for Chip Defense, i think this becomes true, because there are incentives to beat them perfectly: get more cryptocoins that help you in later levels, and that sweet sweet satisfaction of seeing the game display 3 of 3 coins got. under each level.

Le 25 février 2024 07:19:14 GMT+01:00, vertigo220 @.***> a écrit :

Tried to implement the following: SUB chips target the weakest attacker. All other chips target the strongest attacker.

Usually that should be the desired behaviour, I suppose.

I'm not sure. Usually sub chips are placed last, to pick off the 0s and weakened attackers. So it's not like you'd want them to attack the weakest to have a better chance to kill it while leaving stronger ones for other chips, because often there are no other chips. By the time an attacker reaches a sub chip, typically that's it, and it's all or nothing. This means it's better to target the first attacker, so it can hopefully recharge in time to damage the next one as well. Of course, it's possible there are more than one sub chips in series, in which case it might be better to target the stronger attackers in order to weaken them enough so hopefully the next sub chip(s) can finish them off, but I'd say that's less likely. Perhaps sub chips could be the only ones to allow selecting the targeting mechanism, or they could target the first if there are no other sub chips between them and the core and target the strongest if there are (though not sure if this is possible since you said they don't know where the core is, but maybe they (can) know what is and isn't downstream).

I agree with cwpute that if situations like these happen often to you, then there are too many attackers, and you should revise your strategy. Speed up the chips with CLK, use ACC chips, or upgrade the appropriate heroes (such as Vaughan or LHC).

Not often, just once in a while, which suggests it's a level design issue more than anything, but certainly with balancing and hero elements. I've been able to do every level perfectly so far (currently on endless 8 which is proving exceptionally challenging), so obviously it's possible, but there were definitely a few levels that jumped significantly in difficulty, and this particular issue was at least part of that cause on one or two of them. Also, I seem to have better success most of the time just using more SHR chips than trying to use ACC ones. I use them sometimes, and they do seem to help sometimes, but many times when I've struggled while using them, I've done better by just using SHR chips in their place.

I think that a certain randomness in the game is desired, as long as it's not completely luck-dependend. I mean, this is not chess. There is not the one and only optimal strategy in every situation. This may sometimes mean that one cannot avoid losing a life. Well, shit happens. It's a game. Just go on and replay the level later.

It's a game, yes, but games should be able to be beat perfectly. For TD games, it should be possible to do so on each level, ideally without having to come back later after getting stronger. And I think it is in this game (though I'm not 100% sure, since I had to come back to a handful of levels to get all the coins due to #103, and it's not consistently possible and often requires restarting over and over due to various issues out of the player's control), it's just that a small handful of them suddenly get much harder than the previous level(s), only to usually get easier again on the next one, just due to the design of some of them, combined with things like this. And don't get me wrong, it should be difficult, but the difficulty really goes up and down a lot, either being too easy much of time or very hard sometimes, with little in between and the difficulty feeling more due to randomness rather than having to figure it out and plan things properly. Knowing which way attackers will go and needing to set up proper defenses is good difficulty; not being able to tell which route they'll take, having them randomly go this way and that, and especially having them sometimes just go straight for the core without having any chance of stopping them is bad difficulty.

Regarding erratic difficulty: i'm pretty sure this has to do with recruit upgrades not alligning with the great difference in level difficulty types, requiring you to reset your recruits regularly to adapt. I've tried to suggest a fitting-solution in #84 and some other separate issues, if you'd like to contribute.

Possibly, but it happened even early on, before heroes really played a big role. Or maybe I just hadn't upgraded them enough or properly even then, hard to say now. But as I mentioned above, throughout the entire game the difficulty has been up and down a lot, generally being easy or very difficult, with little in-between, and with jumps rather than gradual progression.

-- Reply to this email directly or view it on GitHub: https://github.com/ochadenas/cpudefense/issues/107#issuecomment-1962828290 You are receiving this because you commented.

Message ID: @.***>