Fasteroids Space Rock Lava Lamp Shoot-Em-Up Game, by Don Hopkins.
Originally written in JScript for Internet Explorer using VML (Vector Markup Language) graphics in 2001. (See "notes/fasteroids-vml.js".)
Then ported to JavaScript for the Adobe SVG Viewer web browser plug-in in 2003. (See "notes/fasteroids-svg.js".)
Later translated to OpenLaszlo JavaScript/XML running in the Flash player in 2005. (See "notes/fasteroids-laszlo.lzx" and "notes/dynamics.lzx".)
Now translated to TypeScript in 2020, and playing in a web browser near you, courtesy of the Svelt cybernetically enhanced web app un-framework. (See "src/fasteroids.ts".)
Adapted from Chris Hecker's 1996-1997 Game Developer Magazine series of articles on 2D Rigid Body Dynamics:
From Wikipedia: Chris Hecker's Articles
During his time at Microsoft and Definition Six, Hecker wrote an influential programming column for Game Developer Magazine. Two series of articles from this column still serve today as standard references on their respective subjects. The first series was the first complete synthesis of perspectively-correct texture mapping and formed the mathematical basis for many important game rasterizers, including Michael Abrash's rasterizer for the 3D title Quake. The second was a series on rigid body dynamics simulation for games, complete with an extensive bibliography of rigid body dynamics resources. The articles were part of a general push by Hecker to incorporate more interactive physics into games, which at the time in 1996 rarely featured any physical simulation. In the summer of 1997, Hecker stepped down as author of the regular column to focus on game development full-time.
This is the introduction to the physics series. It covers the linear parts of 2D rigid body mechanics, and a little bit of numerical integration.
This article covers 2D angular rigid body mechanics and the overall 2D dynamics algorithm.
We finish off 2D physics with collision response, including the angular effects induced by a collision. The 2D physics sample, discussed below, demonstrates all the concepts learned so far.
The final article in the series. To pack in all the 3D equivalents of the first three articles, I created this monster of an article. It comes in at twice the length of the others, with 6000 words and 20 equations.
An Annotated Bibliography for Rigid Body Dynamics. Originally Presented at the 1997 Computer Game Developer's Conference.
Install the dependencies...
cd fasteroids
npm install...then start Rollup:
npm run devNavigate to localhost:5000. You should see
fasteroids running. Edit a component file in src, save it, and
reload the page to see your changes.