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

- Watch the Ball Drop (Shoot or press Microphone key)

- Listen to the BOBs sing Auld Lang Syne.

- Enjoy the Fireworks.

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

Move the 'Fireworks' map into your Marathon Infinity directory. (Where the executable is)
Aleph One version 1.7+ is recommended.

Select 'Fireworks' as the map under "Preferences/Environment/Map" in Aleph One.

FPS interpolation turned on is highly recommended for better fluidity.

Have Fog rendering set to on.

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

Happy New Years!
Enjoy the vibes of the New Years from the comforts of your own computer:
1) Fireworks exploding loudly on the horizon.
2) The gentle pfft of the fireworks launchers.
3) The fireworks illuminating the fog/clouds/smoke
4) The outlines of onlookers.

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

Lua script by Zott and Google Gemini Experimental v1206 ;)
You may freely modify and use the code. Attribution is preferred but not required.

---------------
Versioning 
---------------

v1.0
-- Initial Release

---------------
Postmortem/Misc:
---------------

Q: Using less Lua, how would you have implemented the same effects within the Vanilla Marathon engine?
A: 

Broken down into parts:

Music: 
Similar to the Jingle Bobs map, different pitches for the same sound could have been assigned to unique Monster slots. One would then use crushing platforms to define monster kill timing to match the beat of the chosen song.
Alternatively, the song could also be defined as an actual audio file, whether by MML external reference or inputted into a sound slot.
I thought it was cool to have no audio file included in the download so the user could be slightly surprised at the included result. At the same time, it was more convenient than the in-game generated methods for tweaking pitches, BPM, etc.

Ball Drop:
This effect consists of all vanilla engine gameplay elements based on the default Juggernaut behaviors.
I wasn't sure how to adjust the Hard Death fall rate, so that's one area Lua might have been useful.

Fireworks:
The shooting of the grenade upwards could of consisted of no sprite origin and target enemy monsters.
Using the same concept, the explosions could originate from no sprite monsters in the sky where their projectiles are fired in large quantities and with a very large Theta. If not limiting to default Sprites, one could certainly just make some cool looking custom firework sprites for projectiles or their impact effects.
I went with Lua because the timing is better controlled.

Colored Fog:
Not possible. Or at least not the ability to dynamically color and match firework projectiles.


Q: If you had more time what would you change?
A: More distinct firework types. For example, have very long-lasting Compiler bolts that move very slowly. Turn gravity on for them so they fall in a noticeable arc downward with their contrails tracing a nice shape.
Sometimes the Charged Fusion Bolts move too far and impact the scenery. They either need to be slowed down a bit, or have their specific max lifetime shortened.

I distinctly did NOT place the fireworks above water relative to the player's viewpoint because there would be the expectation of water reflections. That said, maybe with some math and Ephemera... 

Otherwise I'm quite satisfied. :)

Q: How was the music made?
A:

Using Audacity and the default 'Bob Scream' based around assumed F6 base note, I generated the following approximate pitch shifts:

0.4983, C
0.5874, C#
0.6818, D
0.7818, D#
0.88774, E
1, F
1.11892, F#
1.24492, G
1.37842, G#
1.51984, A
1.66968, A#

Then I converted to a #GoodEnough polynomial function to simplify shifting semitones to pitch values:
Pitch = 0.0034 * semitones * semitones + 0.1167 * semitones + 1
A semitone of 0 maps to a pitch of 1. 1 being the default playback rate of the sound.

Each note is then defined as a semitone and delay to next note:
{0, 0.5}, {5, 0.75}, {4, 0.25}, {5, 0.5}, {9, 0.5}
