pouët.net

Amenthes by wamma [web]

            .____
    _____   |   /. _____         ____         ____   _____
    \    \  |    |_\_.  \_ ____ / _  \_ ____ / _  \__\_.  \_
     \    \/\    :  \|   /.\   \\//   /.\   \\//      \|   /.
      \______________|    :_____\/_____|_____\/________|    : g6
 --------------------|____|----------------------------|____|-------

                           Presents

                          "Amenthes"

             a JavaScript 4k intro for Revision 2023

                        Damage - Music
                        y0bi   - Code



Few words about the visuals
---------------------------
The basic routine for drawing both the landscape and the pyramid
is the same. It's two-phase routine capable of drawing both hidden
line and flat filled polygons. The first phase draws the outline of
the polygons using a cheap line routine. It has vertical gaps in long
lines, but those don't matter as it is only important to have 
a gapless line on the X-axis. The lines are z-buffered. The second
phase scans the screen from top to bottom and performs either filling
or line hiding. It relies on the fact that the z-value on each line
is supposed to be decreasing from top to bottom. This is a hybrid
between the usual raycasted landscape and a polygon filled one. 

Post processing relies on the z-buffer and here we have some hacky
8-point blur for some depth of field. There's also temporal blur on
the red channel. Finally  the "shadows" seen in some scenes are
actually an artifact of the rendering routine, but let's not think
about that too much ;)

The code was done using a custom Oberon/Modula to JS compiler and
this time no optimization was necessary on the JavaScript side. Our
forthcoming stuff might be either WebGPU or WASM based. Let's see.


How to run it
-------------

The simplest way to run it is to use Chrome and run it with the
following parameters:

Windows:

  --disable-web-security  
  --user-data-dir="C:/Temp" 
  --autoplay-policy=no-user-gesture-required
  
Linux:

  --disable-web-security
  --user-data-dir="/tmp"
  --autoplay-policy=no-user-gesture-required

Opening the intro.html should then work without any further tricks.

Alternatively, you can place it on any web server and open the intro.html
from there. If you have python, the usual "python -m http.server" is
just fine. The view must be clicked around with a mouse before
the intro starts so that the music is allowed to play.