ochadenas / cpudefense

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

Two attackers on the same spot = untouchable #76

Closed Cwpute closed 10 months ago

Cwpute commented 10 months ago

I had a game on which an attacker and cryptocoin seemingly spawned exactly on the same pixel (could be an attacker from an ACC chip) which prevented any of them two to trigger chips and thus be attacked.

This should probably not happen! Perhaps gently slow one down or push one of them one pixel away as to not be on the exact same spot.

ochadenas commented 10 months ago

The atackers already have a small random displacement added to their position, in order to avoid them being in the same place. But of course, as attacker frequency goes up, then there is a certain probability that this happens.

They could be given a small random difference in speed, but that would look "untidy", I think. But perhaps after leaving the ACC chip this would be possible.

Even so, I would expect one of the two attackers to be "hit" by chips. The other one indeed would go through unnoticed.

ochadenas commented 10 months ago

attackers now have a small random change in speed when leaving the ACC chip. Let's see whether this solves the problem.

Cwpute commented 10 months ago

As you said, this will look a bit untidy, it will have to do for now. You could have the chip check the spot at which it should spawn the operation-resulting attacker, and see if there already is an attacker there, but i guess that would be a bit more work.

I think ultimately you may have to implement a hard limit to the shortest distance possible between two attackers, to prevent situations in which you can't tap on them (and reswlve this issue as well).

Le 18 janvier 2024 18:24:59 GMT+01:00, ochadenas @.***> a écrit :

attackers now have a small random change in speed when leaving the ACC chip. Let's see whether this solves the problem.

-- Reply to this email directly or view it on GitHub: https://github.com/ochadenas/cpudefense/issues/76#issuecomment-1898909565 You are receiving this because you authored the thread.

Message ID: @.***>