Skip to content

V1.6.20220101: 2022 Update

Compare
Choose a tag to compare
@scottschiller scottschiller released this 05 Jan 18:15
· 3369 commits to master since this release

V1.6.20220101: Massive update for 2022, based on work from 2020 + 2021

http://schillmania.com/armor-alley/

Armor Alley: Home Screen

Armor Alley: Gameplay. A tank has just been taken out by the mid-level landing pad.

Previous release: V1.5.20180201
Original release: V1.0.20131031

Video overview

• Demo, features and walk-through of "extreme" mode (55 minutes): https://youtu.be/9BQ62c7u2JM

Performance improvements

• The game should be smoother, targeting 30FPS. It is OK full-screen @ 1080p and windowed @ 4K in Chrome on a 2018 Mac Mini, 3.2 GHz 6-core i7 w/Intel UHD Graphics 630 1536 MB.

• More GPU-accelerated rendering, reduced DOM nodes by removing when off-screen (e.g., static terrain items)

• All sprites should be on the GPU and moved using transforms, reducing paint operations

• All transforms (CSS + JS) for positioning + animation are 3d, with the goal of GPU acceleration - e.g., translate3d(), rotate3d(), scale3d()

• DOM nodes are not appended at object create time - now deferred until the object is on-screen for the first time.

• All "sub-sprites" should now be GPU-accelerated via CSS animations, transforms and transitions

• Sound: Only create Audio() when actively playing sounds, and destroy when they finish playing. Browsers are starting to limit the number of Audio() instances.

• Sound: Queue and play sounds all at once with each animation frame callback, vs. prior ad-hoc behaviour.

• Refactored game tip scroller to only show two nodes at a time, 1024px width vs. 102,400px. Front-end tech / Chrome Dev Tools demo: https://youtu.be/eVW0WgTdK3A

• Performance: Don't update known static radar items: turret, base, bunkers (bunker, end bunker, super bunker) unless marked as "stale" during resize / world scaling

• Performance: CSS / contentVisibility to reduce / optimize rendering costs

• Animation loop: improved timing, target 30 fps. Request next frame right away. Exit early if next frame arrives too quickly.

• Turret "scan" is now a CSS animation; previously, animated via JS.

• Smart missiles and helicopter trailers are now GPU-accelerated.

• Performance: Battlefield and radar units are now positioned via transform: translate3d() - no more legacy CSS shenanigans using bottom: 0px.

• Memory leak fixes: DOM nodes, audio events, and a few others.

Sound

• Over 100 sound assets now in use

• New and updated sound effects: Infantry and engineer gunfire, injury and death, credit +/-, helicopter and turret guns, shell casings on turrets, bullets hitting the ground, turret being disabled and enabled (restored.)

UX / UI

• Proper "game options" modal with radio buttons and checkboxes for various UX/UI and gameplay features

• "It was a dark and stormy night" - option for snow on the battlefield. (May be slow on some computers.)

• Bunkers, balloons and super-bunkers now use graphics from the Macintosh (68K) version of Armor Alley; a bit more orange, and less garish yellow.

• Dune ][-style credit / debit UI and sounds

• Toast-style game notifications

• Health status bars when units are being hit or repaired

• New and improved smoke / particle effects, more explosions and shrapnel, more fun!

• Order queue: Refactored UI to show letters (e.g., MTVIE), with superscript numbers as appropriate.

• Missiles smoke more, and in extreme mode, have a burst of thrust (as in the original game) as they near expiry

• Pseudo-3D effect on shrapnel: Increase size slightly with vertical position on screen

• Ground units are "behind" most terrain elements like trees, bushes etc.

Bug fixes

• Bombing floating balloons no longer causes an explosion on the ground

• Improved bomb and shrapnel alignment / collision positioning with balloons, tanks, bunkers, and super-bunkers

• Fixed bug with quickly-respawning balloons (shooting balloon while infantry are passing under bunker, for example.)

• Fixed UI bug where the "incoming missile" white line would not always disappear.

• Game end: Improve alignment of view and base

• Adjusted initial position of game, centering view on the helicopter + base

• Helicopter / super-bunker: Improve vertical alignment if helicopter crashes on superbunker "roof."

• Fixed radar item for Super Bunkers, now shows correct friendly / enemy status.

• Cloud "wind" accelerates / decelerates more smoothly

• Clouds no longer "bounce" when they drift off the end of the world, but get a nice bit of wind to bring them back into view.

• Slight vertical alignment tweaks on gunfire and balloons in radar view.

• Improved orientation of heat-seeking smart missiles (and rubber chickens and bananas) as they track their target

• Tweaked movement and velocity of smart missiles, making them potentially faster / more random

• Enemy helicopter will now turn to face targets. Sometimes it would fire the other way. ;)

• Improved helicopter motion when approaching landing pad - "bounce" has largely been eliminated.

• Improved off-screen / on-screen DOM pruning, restoration of 3D transforms when re-appending DOM elements

• Fixed end-game bug, sometimes ground units (e.g. van) did not appear at base when blowing up.

• Adjusted collision detection: if helicopter is hiding "in" a friendly super-bunker, bombs should hit the roof of the super bunker and not the helicopter.

Gameplay

• New weapon: Heat-seeking bananas

• Ground unit "Traffic Control" option: Vehicles try to leave space between, and avoid overlapping each other. Tanks will now "park" behind friendly tanks, avoiding a pile-up. Tanks normally only stop to fire. Vans and missile launchers will now wait for each other, too. Tanks will not stop for vans or missile launchers, giving tanks a greater chance of ending up at the front of a convoy - a preferable offensive position.

• Units can now be "recycled" if they cross the battlefield, you are rewarded 2x cost in credits

• Engineers can now steal all funds from enemy bunker

• Engineers can now repair (but not rebuid) friendly bunkers

• Bullets now ricochet off non-friendly super-bunkers

• Shrapnel will ricochet off certain units (tank, super-bunker)

• "Incoming missile" doesn't show in extreme mode when the radar is jammed.

• End base, extreme mode: if a defense missile is destroyed, respawn another within 0.5 seconds.

• Missile launchers trigger when closer to the helicopter, more likely now to be on-screen

• Helicopter respawn: Delay if certain ground units are obstructing the landing pad.

• Enemy helicopter AI: Default 10% of dropping bombs when targeting a tank, subject to game difficulty (hard: 15%, extreme: 25%.)

• Bombs can now collide with smart missiles and take them out

• Tank gunfire only hits bunkers if tanks are shooting at a helicopter, or another tank (bug fix: previously, tanks could destroy a bunker trying to hit an infantry on the other side.)

• Super bunkers that are un-manned are "neutral" and dangerous to both sides, and will be shown as hostile on the radar.
(This includes when tanks disarm a bunker by firing at it.)

• Bomb trajectory now includes the helicopter's Y-axis velocity, and they now rotate along with their trajectory.

• Helicopters now rise up from the landing pad on game start and respawn, like the original game.

• Helicopter gunfire takes tilt / angle into account.

• Helicopter "shake" starts when health is under 70%, gets worse with damage. This affects gunfire trajectory.

• Your missile launchers only fire at the enemy helicopter when the convoy is "unassisted", e.g., there is no friendly helicopter or turret nearby.

• Extreme mode: If you shoot down the enemy base's smart missiles while near the base, it will launch new ones that are faster and more difficult to dodge.

• While on a landing pad, your gunfire may go over infantry's heads most of the time.

• Don't assume the top of the battlefield is always safe; watch out for balloons!

• Parachute infantry now fall at slightly different rates, and may be affected more by wind

• A few additional, inspirational [ game paused in background ] messages

Technical notes: development / code

• Migrated core JavaScript to ES6 syntax, retaining functional + prototypal inheritance style. Slightly less verbose.

• As part of ES6 migration, dropped legacy IE 8 + 9 code and checks: ancient event handlers, lack of transform, requestAnimationFrame() polyfill etc.

• Lots of cleanup: Exit early, reduced if/else nesting. Dropped all setTimeout() calls, moved to a frame-based approach: setFrameTimeout().

aa.js (core game code) is massive at ~450 KB, and seems like a good candidate to be broken up into ES6 modules. TBD.