scottschiller / ArmorAlley

A browser-based interpretation of Armor Alley, a combat strategy game originally released in 1990 for the Macintosh and MS-DOS PCs.
https://armor-alley.net/
Other
91 stars 25 forks source link

Unit don't build after a certain point #2

Closed whoisterencelee closed 1 year ago

whoisterencelee commented 1 year ago

Playing at insane mode and using the midnight oasis map

Usually game play last for hours due to the difficult level especially that last bunker which cannot be destroyed

After some time, build any units don't show up, the fund is deducted, but no units appear

Thanks for making this by the way

scottschiller commented 1 year ago

D'oh! Thanks for the report, and sorry for the bug; that must be frustrating, particularly after putting a few hours into Midnight Oasis. That is a really tough one on Extreme, indeed; it took me over an hour, last time I tried. 😅

I had run into the inventory ordering myself in development, and someone said they could reliably trigger it by ordering a handful of missile launchers in quick succession. I had fixed that case, but there must be some others. This is tied to the "traffic control" feature in preferences, which can be turned off. In the meantime, I'll set it to the classic behaviour where vehicles like tanks only stop when firing.

scottschiller commented 1 year ago

After some poking around, I found that this bug looks to be irrespective of the "traffic control" feature, but it's tangentially-related. I added some logic to space out units during ordering, so they wouldn't overlap - and the bug that snuck in here was that if you ordered (e.g.) two tanks in a row, and the first one was bombed or destroyed right away, the next tank to be ordered would think "hang on a second, a tank hasn't cleared the ordering area yet" - and so, it would wait indefinitely for something that was never going to move.

In retrospect, the fix was simple; make sure the next item in line is still alive. It did not occur to me to think of this when building the feature, initially. 😉

whoisterencelee commented 1 year ago

That's interesting the way you described it, yeah, the traffic congestion feature I haven't run into much, because for this level, there are so many turrets that I was doing mostly airdropping infantry. Which still happen to get stuck.

I haven't tried playing since your last commit, but if it still shows up I will let you know

scottschiller commented 1 year ago

Thanks for the note. I think I fixed this with the recent commit, that's been pushed live. Let me know if you still hit the issue.

whoisterencelee commented 1 year ago

This is fixed on player side, I was able to complete Midnight Oasis in Insane mode finally. Although something else not sure if it's a bug or not, at some point the enemy stopped producing units, it's not clear if it's because it run out of funds because I have taken all bunkers? Screenshot 2023-06-12 at 09-51-56 Armor Alley

scottschiller commented 1 year ago

Thanks for confirming the original build fix. Enemy ordering shouldn't get stuck, but there might be a condition that still causes it.

There are some cases where enemy order production legitimately stops, as you noted:

1) In Easy + Hard modes, owning all bunkers will halt enemy production. Extreme mode does not have this feature, one more aspect of the difficulty. ;)

2) If you steal enough enemy funds via paratroopers or "rob the bank" via engineers, ordering should halt until there are enough funds. There may be a bug with this case where ordering doesn't resume, I need to verify.