ochadenas / cpudefense

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

[1.39]Resistor doesn't slow down some attackers at all. #171

Open sere3925sere opened 1 month ago

sere3925sere commented 1 month ago

I have reached endless mode, and it seems that resistor just lets some attackers pass through unaffected. It was a pretty big number too, like x2c or something, though I don't remember. Are resistors tied to clock rate like the rest of elements? They don't pulse at all, so I expected them to affect everything.

Short review. Game is a big janky right now, but I like games like this, I like finding exploits in balance. I had some fun during easy and medium difficulty, but endless mode forces me to use memory cells and clock a lot at least at the start, and it's not really a tower defence anymore if you have to do a lot of manual clicking. Maybe things will improve once I get more coins, but I'll wait for some bugs to get fixed first.

ochadenas commented 1 month ago

Yes, currently resistors have a cool down time, but it is very short.

Am not very happy about this, I think that I'll make their effect instantaneous.

ochadenas commented 1 month ago

Short review. Game is a big janky right now, but I like games like this, I like finding exploits in balance

I'm very much relying on you all to find and tell me, so that game balance can gradually become better ...

sere3925sere commented 4 weeks ago

... I was planning to wait for the next version, but I'm really itching to try it now. Can I get an apk with, like, version 1.40.1 that fixes this and #170? I can wait if it's better though, it's up to you.

ochadenas commented 3 weeks ago

I've put an APK into the releases section here on github. You can try this if you want; it uses still the same internal version code, so I hope that you'll be able to upgrade to this version on your device.

sere3925sere commented 3 weeks ago

Tried version 1.40.1, resistor still lets some attackers pass not slowed. It seems that, when a big attacker touches resistor, it slows to a crawl to the point that a smaller attacker can pass through untouched. Issue is that resistor can only affect one attacker at the time, it should affect everything that passes through.

Uploading a screenshot of a randomly generated level where this is a pretty big issue, I cannot imagine building my defense in any other way. Also with a screenshot of a "stuck attacker" that doesn't move and doesn't get affected by anything, the number at the bottom. Screenshot_20240816_162811_ChipDefense

By the way, what do you use to compile and develop apk? Android Studio? IntelliJ IDEA? Thinking of trying to compile it myself.

ochadenas commented 3 weeks ago

Resistors do slow down large values much more than small ones. To the point that 00 or 01 are barely affected at all. This was introduced in 1.39, and the idea is that you would be able to "sort" the attackers. The small ones will reach their goal faster, and give you a chance to remove them while building your defenses. I don't know whether this strategy actually works ...

Apart from that, a resistor can "fire" once every tick (approx. 50 milliseconds). So it should get more or less all of the attackers. You can tell that they have been affected because they slightly change their colour.

I'm using Android Studio in a standard configuration (with Gradle).

ochadenas commented 3 weeks ago

I've added a description of the resistor effect to the wiki: https://github.com/ochadenas/cpudefense/wiki/RES

sere3925sere commented 3 weeks ago

Yeah, but at this difficulty I'm barely getting small numbers, by the time I can afford something besides MEM I get a steady supply of 0x37 and bigger. Trust me, some attackers pass resistor completely unaffected, most likely because resistor is too busy attacking the big number that it lets smaller number (like 0x37) completely unaffected.

I probably can record a vid if you really want me to.

In cpudefense/app/src/main/java/com/example/cpudefense/gameElements/Chip.kt update(), please change this:

selectTarget(attackers)?.let { shootAt(it)}

to something like this:

if (chipData.type == ChipType.RES) {
    for attacker in attackers {
        if attacker.immuneTo != it {
            attacker.shootAt(it)
        }
    }
    return
}
selectTarget(attackers)?.let { shootAt(it)}

This should work, though I wouldn't know unless I test it.

sere3925sere commented 1 week ago

... Don't have time to compile it myself right now, can you please add this in the code? I expect I'll have to download gigabytes of updates to get android studio to run again, and I have a monthly internet usage limit.