360 shooter

BlitzPlus Forums/BlitzPlus Programming/360 shooter

B_Paulie(Posted 2006) [#1]
how do i create a 360 shooter? i know im asking alot of questions, but i dont have anywhere to learn from but here. :)
i want to learn how to make the ship rotate
and how to make the ship shoot in the direction its facing.


WolRon(Posted 2006) [#2]
Sorry, but I'm not sure what exactly is a "360 shooter".
Do you mean a game like "Time Pilot" or "Sinistar"?

To 'simply' make an image rotate, just use the RotateImage command. HOWEVER, such a command is processor intensive and it's best to either:
A: Use it once at the beginning of your program to create an image strip with all of the rotations you will need.
B: Load in an image strip with all of the necessary rotations.

to make the ship shoot in the direction its facing, set the bullets 'vector' using the Sin and Cos of the ships rotational angle:
thisBullet\xangle# = Sin(ship\rotation)
thisBullet\yangle# = -(Cos(ship\rotation))
I took the effort to make a quick 360 shooter example and uploaded it to my website. Have a looksy.


Grey Alien(Posted 2006) [#3]
Also before applying the rotate command use AutoMidHandle = True.


B_Paulie(Posted 2006) [#4]
ron you are my hero


B_Paulie(Posted 2006) [#5]
ok another problem
how do i make my ship move across a field of a tiled background, so i can place things like planets and such in the distance so that i can reach them.


Buggy(Posted 2006) [#6]
If you know how to tile the background, then just put the planets on top of the tile - as separate images.