---------------
Story:
---------------

The Pfhor have captured our dear Hero, and now the Hero must fight through the legendary commanders in the gladiatorial arena to earn their freedom!

---------------
Gameplay Notes:
---------------

- Ammo will respawn around the edge of the arena. Health will not.

- Health will be refilled after the 4th round.

- If the player is too close to the arena's center after defeating a boss round, the player will be teleported away so they do not become stuck by overlapping enemies.

- Pressing the mic key (default ~) will skip the first 4 rounds of enemies, but only if executed during the first boss round.

- Balanced around Normal difficulty. No promises for harder. Good Luck!

---------------
To Install:
---------------

Move the BossArena folder into the Aleph One directory.
Start Aleph One and select 'Boss Arena' as the map under "Preferences->Environment->Map" in Aleph One.

Aleph One version 1.7+ is required for the music to activate properly.

FPS interpolation turned on is highly recommended for better camera movement fluidity.

Have Ephemera effects rendering set to atleast Low.

---------------
About:
---------------

This one-level map was born out of the desire to improve my Lua & programming skills without going deep into map making, shapes editing, or the like.

I started it as part of Global Game Jam in January 2023, with the goal to finish it in a weekend. This did not happen.
https://v3.globalgamejam.org/2023/games/marathon-boss-battle-arena-7

After the Jam, I ended up increasing the number of boss rounds, and scope. Started to lose interest, so I think it's in a good state to release.

---------------
Credits:
---------------

Lua script by Zott and ChatGPT ;)
You may freely modify and use. Attribution is preferred but not required.

Music:
'More Power' by Liborio Conti
https://www.no-copyright-music.com/

'Holding Out for a Hero Eurobeat Instrumental' by TurboAlt
"...feel free to use any and all of my work for your own purposes!"


---------------
Versioning + Postmortem/Misc:
---------------
SPOILERS BELOW.

v1.011   11/10/2025
-- Stage 1: Fixed critical bug of bad Lua monster assignment that blocked all progression. 
-- Sometimes monsters wouldn't teleport out during stage transitions, which would impact gameplay balance. Tried to make the teleport-outs more robust + Added a monster delete after 5-second if they didn't complete their teleport.
-- Folder structure adjusted to be more self-contained for install/uninstall.
-- Music MIGHT have been broken on Mac and Linux because I used "\" instead of "/" paths. Changed to "/" just to be safe.

v1.01   12/10/2023
-- Slightly reduced health of drones, cyborgs, and green pfhor.
-- Locked the round count for the blue pfhor across difficulties.
-- Replaced math.random with Game.random in most cases to help with film replay sync
-- Yellow health pack regen instead of purple for final boss.
-- Arena polygons optimized so Major Juggernaut won't get stuck in corners.
-- Teleport out sound added for blue fighter defeat.
-- Fixed incorrect indexing bug where single projectile in jugg phase wouldn't transform.
-- 3 ammo guaranteed at all times within Arena instead of 2.
-- Music should now transition properly

v1.00   11/05/2023
-- Initial Release

In this section we will cover discussion on the gameplay, as well as ideas that didn't make it in.

Round 1: Green Fighter
The engine is not conducive to dodging enemies by default, and so the fighter leans heavily on speed to be hard to hit. This could be frustrating for the player, except flinching is left on and so the introductory boss is not particularly difficult to pin and beat.

At times when shot, the boss will jump behind the player. This was a cool unintended feature in the Lua code I didn't bother fixing. It reminds me a bit of those fast Anime characters appearing/disappearing with speed lines.

If the boss is punched, it will move backwards. I didn't expand this behavior much, but it does keep the combat fluid.


Round 2: Purple Fighter (Drone Barrier)
AR Grenades are my preferred weapon to work around the drone barrier to chip at the boss. Floating enemies were required for the barrier so that they will fire while being repositioned with Lua. 

It was a bit hard to see the boss with the typical drone size, which is why the drones were minimized.


Round 3: Orange Fighter (Rotating Bolts)
The spawned drone bolts are kept close to the ground so that the player can always see the boss clearly. There is also enough angled depth perception to visually locate clear paths around the bolts. The bolt spawning origin location doesn't make much sense from a enemy graphic perspective, but I felt it was better for gameplay.

Initially the bolts rotated around the origin like a pinwheel, but this was hard to understand as a player. The bolts could unexpectedly swing around a barrier the player thought they were protected by. This was changed so while the spawning origin rotates, the bolts themselves only move straight outward.

The flip-flopping of the bolt rotating direction when the boss was damaged was intended to force player dodging while the boss is flinching, and give the player more agency to control their movement.

The rotating angle of bolt spawner does speed up when the boss is damaged, but there is a careful line where the bolt pattern is too narrow or too wide. I think more work could be done here to improve it.

Overall, while the rotating bolt effect is cool, this is the first boss where there is a perceived drop in pacing. Now the player must be more calculating in how they trade shots with the boss while dodging behind the pillars.


Round 4: Blue Fighter (Trickster)
The Blue fighter always initially spawns alone so the player can see the green bolts that it fires. This identifier of the true boss is used later during the stage with the dummy bosses.

Dummy enemies undesirably leave corpses because I had trouble deleting them upon death without the game crashing. Removing their corpse in Physics didn't seem to work properly either. I had commited to not editing shapes, so invisible corpses wasn't an option. If I do another update, I could probably treat them how I do the bosses, and just delete them when they go below a health amount, rather than wait for actual death to trigger.

After I played around with changing wall textures at run-time, I saw that enemy sprites could be placed as wall textures. It would have been neat for the trickster Boss to hide within a wall texture, similar to Phantom Ganon from Ocarina of Time, or walk along the walls similar to Link in The Legend of Zelda: A Link Between Worlds 3D.


Round 5: Juggernaut (Phase 1)
The boss is a homage to the Power Rangers' Zord. I had commissioned on Fiverr for some Power Rangers inspired musical guitar stems, but ended up not using them since they would have required a good deal of editing to bring them to a satisfactory level and distracted from the Lua focus of this project. Perhaps the stems will be repurposed or released one day.

Once again, the commitment to not editing shapes reared its ugly side. The Juggernaut visual shape and corresponding collision box are wide. The width and height of the Juggernaut collision cylinder was considerably reduced to allow the Cyborgs to sit against the Juggernaut torso without the two hitboxes interacting. If they interact the Juggernaut will become stuck when the Cyborg constantly repositions via Lua. This collision adjustment is negligible when the Juggernaut is engaged from the front, but when the juggernaut is fired at in profile view, the player’s shots towards the rear of the sprite may miss where one would visually expect a hit. For the Juggernaut phase 2, the cyborgs are killed off to return the hitbox to normal.

Seeking bouncing grenades were trialed for the cyborgs, but they would circle around the arena and hit the unsuspecting player in the back. Since there was already a lot of simulus for this stage, the grenades were an un-fun nuisance.


Round 6: Juggernaut (Phase 2)
Seeking bolts visually clump together after a time tracking the player. There is legacy code that is currently commented out to merge these bolts into a PowerBolt that would be slower moving but more powerful. As more bolts collided with the PowerBolt, they would add more power, indicated by increasing count of rotating sparkles. The sparkles would have also increased the PowerBall's radius. The merging was working acceptably, but the rotating sparkles would not properly track the PowerBolts. The feature was taking too long to diagnose without a true debugger, so I replaced it with the Seeking->Fast bolt mechanic. This is probably a better gameplay change anyways, since ALL slow seeking bolts distract the player's attention from firing at the boss.

One idea on the cutting room floor was a shield for the boss. Players would have had to activate panels on the pillars to drop the Boss's shield temporarily and hit for damage. The visual effect was leaning towards shapes editing (Invincibility effect on the sprite), so I dropped it. To signal the player to hit any still-active panels, there would have been Ephemera that created live energy lines between the boss and pillars.

Another abandoned idea was danger polygons. Some polygons would be signaled for damage by the boss, and the player would have to avoid those locations. Since this is a first-person shooter, rather than a third-person shooter, good visibility on the danger polygons was not guaranteed. Typically the player is looking slightly upward at the Juggernaut, not downward at the floor.

The boss arena needs a good redesign since enemies get trapped in a movement loop near the corners and never navigate back towards the center.

The outro cutscene shows the interior of the Juggernaut exploding. An extended alternative was to have Bob rescue the player. As the Juggernaught was damaged, the space landscape texture would flicker back to the original room's texture panels. Eventually, the player would break the 'spell' allowing Bob to throw down a rocket launcher from the ceiling. "OVER HERE". The player would use it to defeat the Juggernaught, similar to Resident Evil 4.
