Asteroids Bullets Directions?

Blitz3D Forums/Blitz3D Beginners Area/Asteroids Bullets Directions?

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

You could 'prerotate' the images: copy the original ship's image 36 times, and rotate them with steps of 10.
For the projectiles, you could use cos and sin to calculate it's position:
x# = x# + (cos(angle#) * speed#)
y# = y# + (sin(angle#) * speed#)
DrawImage bullet, x#, y#

DrawImage ship, ship_x, ship_y, angle# / 10