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

Launch missiles requires pressing keys several times #4

Closed supercobra closed 1 year ago

supercobra commented 1 year ago

In some cases, I need to press several times the b key to launch missiles.

scottschiller commented 1 year ago

Thank you for the report! I should have a dedicated step for smart missiles in the tutorial, and improve how the smart missiles work. I've made a few changes over the years, but it's due for a revisit.

tl;dr: try press-and-hold briefly for now, and see if things work more like you'd expect.

When you push one of the missile keys (X for the original, C for "rubber chicken", b for "banana" - functionally, all the same), it first looks for an eligible target. If none can be found, the "unavailable" tick sound plays and a notification is shown, "no eligible target" etc. It's a bit fiddly and I intend to improve this UX/UI.

If you hold the key down, it will repeat and fire both missiles in quick succession - like in the original game. I found that there seemed to be a bit of a delay, so it helps to press and hold the key briefly to ensure a proper fire attempt.

What I'm thinking is a little marker on the radar showing the maximum missile targeting range (distance) on the battlefield, and/or a marker on the current would-be missile target if you were to fire. This should help reduce confusion about what's being targeted.

I refactored the targeting somewhat recently to prefer the "nearest" target, but it may make more sense to give preference to the target you are flying in line with - e.g., there's an enemy bunker directly underneath, but you're about to engage the enemy helicopter in a dogfight and you're vertically-aligned with them. In this case, the missile should go for the chopper.

supercobra commented 1 year ago

Amazon work btw. Kudos.

scottschiller commented 1 year ago

I've just pushed some updates for this. Missiles, gunfire, bombs and parachutes ("paratroopers") should now be more responsive and provide more immediate feedback. Previously, there was a chance that key presses (or touch events) could fall "in-between" checks for the inputs.

You should be able to press and hold X/C/B to fire two missiles about 500ms apart each, they take a bit of time to "reload." ;) When unavailable, the the inventory "denied" / tick sound should be played.

I plan to improve the UI around missile targeting next, so you'll know what the missile will be going after before firing.

scottschiller commented 1 year ago

Updates, here - hopefully this shows it reasonably. The radar now shows a little red underline, and units on the battlefield have a small red circle indicating when they are the "current" target for smart missiles.

The helicopter typically requires to be facing a target for it to be picked up. If you're out of missiles or if the target dies, these indicators should be hidden. The inference is that if you see red, it means you can fire and expect the "red" thing to be targeted. AA Missile Targeting UX, UI AA Missile Targeting UX, UI 2

https://github.com/scottschiller/ArmorAlley/assets/174437/97e7a930-29dc-4d7c-88f8-9510d525366c

scottschiller commented 1 year ago

@supercobra Let me know if the recent updates have improved your experience. Missiles should fire immediately now on desktop when there is an eligible target. When there is no target, a notification should display, "no nearby target" etc. When there is no target or you are out of missiles, you should hear the "denied" sound similar to when you are out of bombs or ammo.

scottschiller commented 1 year ago

I'm going to close this out, I believe the issue to be largely resolved. And, thanks for the report.