Thwaite 0.01 is out
Download from the
compo page.
Drag wrote:
Though... what kind of script could this game have?
There are actually two scripts. Each game starts on the perfect script and sticks with it as long as the player keeps 100%ing it, meaning no houses get blown up. Then it switches to the imperfect script.
In case you haven't managed to get very far in the game since the release of the compo entries, here's a sample of the perfect script:
<Justin> It's like we get a fireworks show every night! We don't even have to wait for July.
<Briar> Cool it, Justin.
The next night:
<Justin> Last night's show was even more impressive!
<Isca> You know what, Justin? I'm starting to think you're right. Because if it weren't just a show, something would have been blown up by now.
<Briar> I don't know, but it makes me so nervous I can't sleep.
And a sample of the imperfect script, which focuses around investigation:
<Gnivad> I was looking in the wreckage of Torben's house when I noticed something. Look at this.
<Meg> It's half melted. What's that supposed to be?
<Gnivad> I'm not sure. There's some writing on it, but I can't make it out.
<Torben> Could be a guitar pick. Someone has a strange taste in shrapnel.
Finally, a tech note:
How Thwaite aims player missiles
For player missiles, normal enemy missiles, and MIRV missiles, the game first calculates the
atan2 function:
- Find the displacement from the missile silo to the target.
- Reflect the displacement into the first octant: 0-45 degrees, or 0 to τ/8 radians, where τ represents one turn (as suggested by Michael Hartl). Remember which reflections were performed.
- Divide the smaller by the larger to produce the slope, in the range 0/256 to 255/256.
- Search a 1-octant tangent table for the arctangent, or the angle whose tangent is closest to this slope.
- Undo the reflections. This gives the missile's heading as 0 to 31, in units of τ/32 radians (360/32 degrees). This heading is used to determine which sprite cel to draw for the missile and how to reflect it.
These additional steps are taken for player missiles only:
- Look up the unit vector (x=cosine, y=sine) of this angle, and compute the dot product (2 multiplies) with the displacement. This will be very close to the actual length and can be computed without a square root.
- Compute this length to a travel time using a speed factor that differs between NTSC and PAL.
- Divide the displacement by the travel time to produce the velocity.