X-Wing vs. Tie Fighter: Attack on the Deathstar

0
0
Published 2023-06-12


Take a seat in the most advanced fighter of the galaxy. Fight against the evil empire!
Use proton torpedo to quickly dismiss enemy forces or your 4 blasters (aiming skill required).
Go through 4 epic missions, from space to Deathstar and back.

Starwars logo/music/... credits to their respective owners. Don't sue me :/

This is a demake of the X68000 Attack of the Deathstar game, (kind of) complete with space/ground/trench missions.
This version departs from the original with a less arcade/grinding gameplay.

The un-minified version can be found (as usual) on my Github page (includes all 3d assets).

All flying NPCs are following boids behavior (seek, avoid, follow) and are really a blast to watch in pack (imho)!
Baddies will try to get on your six to fry good old r2d2 :/

Proton flight path is following Proportional Navigation rules. Gives a nice interception path (and the math is cool :)

Engine is a edge renderer (wireframe only as you certainly noticed!). It supports faces with an arbitrary number of edges to reduce visual cluter and achieve good performance.

Face culling is using object-space culling, the normal.point constant is pre-calculated when model is loaded.

Quaternions functions ported from ThreeJS.

(sort of...) Sound volume is changed at runtime according to sound emitter location, using the PICO-8 "feature" that sfx can be modified without impacting currently playing sound.
Note: sfx 63 is reserved for that use.

3d assets are modeled in Blender, exported in sprite/map format using a Python exporter .

Models are unpacked from spritesheet/map memory at startup and made available in a global table.

All game data are expressed as JSON strings, supporting references to global functions. Ex:

Mini json parser from Tyler Neylon: lua JSON parser

Code is minified using picotool.
Music lifted from "public" MIDI files, simplified and converted with midi2pico.

1.0:

1.1:

1.2:

1.3: