617 games and counting

X-Wing Vs. Tie Figther: Attack on the Deathstar

By freds72 Published on Jun 23rd, 2018 Last updated on Aug 31st, 2018

Be a X-Wing pilot!

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.

Flight Manual

Copyright Notice

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

Dev Log

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).

Tie Fighters

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 Torpedo

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

3d Engine

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.

3d Sound

(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.

Software Pipeline

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:

local player=json_parse('{"x":0,"y":0,"update":"update_player"}')
-- works!

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.