You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.
Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.
`Create a Spaceship structure
`actual x/y coords
`'sliding' x/y coords
`Current YAW (or yrotation)
`Make ourselves a spaceship!
Andromida as Spaceship
`This is updates the ships position by its thrust
Andromida.x = Andromida.x + Andromida.xs
Andromida.y = Andromida.y + Andromida.ys
`Now the nitty gritty math stuff
`Grab the Input and thrust accordingly
`thrust is held in xs and ys
if upkey() = 1 then
Andromida.xs = Andromida.xs + cos(wrapvalue(Andromida.dir))
Andromida.ys = Andromida.ys - sin(wrapvalue(Andromida.dir))
Login to post a reply