X-Wing vs. Tie Fighter: Attack on the Deathstar
by freds72
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:
_g.update_player=function(self)
self.x+=1
self.y+=0.5
end()
local player=json_parse('{"x":0,"y":0,"update":"update_player"}')
-- works!
player:update()
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.
Changelog
1.0:
Initial public version
Bug: not able to restart after gameover (will be fixed soon)
1.1:
change: redone control scheme (flat turn, optional roll)
change: removed boost
change: laser auto lock
change: difficulty curve
fixed: NPC flight AI
fixed: torpedo aiming
1.2:
added: menu to switch view
changed: turret & tie fire lead (+ random chance to miss)
changed: tie fighter difficulty ramp up
fixed: random hit on NPC (distance function overflow)
fixed: reworked trench to keep 60 fps
removed: in-game help
1.3:
changed: reduced tie hit points
changed: increased tie damage