I'm trying to write a simple space game in Delphi. Everything has gone fine so far until now. I'm trying to draw some very very simple graphics for when you shoot another ship. A laser beam effect kinda thing.
First I tried using a single line drawn onto the canvas from the image of your gun to the image of the ship you want to fire at. This works but looks really bad.
The next thing I thought of was to draw a triangle on the screen and have the base of the triangle at your gun and stretch the point to the ship you were firing at. To give some kind of perspective view of your laser.
Unfortunatly Delphi doesn't support drawing triangles (that I could find) and I'd have to use someone else's VCL. I tried this but the major problem here is that the triangle can't be an equilateral triangle as the ship won't always be directly in front of your gun (so the triangle won't line up)
The next method I thought of was to draw a very small bitmap like
and then draw that on screen. Again I'm not sure I'm going about it the correct way because I would like to have some kind of perspective view on the laser beam.
This has been bugging me for a while now.
Anyway have any idea how I could do this?