the tutorial (if its the one I am thinking of) has a monster with homeing missiles, so they do curve (goblin on matrix with lots of brick pillars and a small hud IIRC), if you look at the code I did the direction that each object travels is set with...
point object objnum,x,y,z
then all you need to do is
move object objnum,dist
to move it for as long as it lives, the array location indexed by the object number holds the objects remaining life, and each time you move it the life gets reduced by 1 until it reaches zero and then you just put it out of sight and wait for it to get used again, in a busy scene the different bullets can be jumping in/out/in/out of the scene all at different times/positions and existing as a specific objects bullet for differing times, if you could see the array as (for example) a row of lights for each location, on for active and off for zero then you would see them flickering on and off apparently at random as the game ran, speedwise, allocating a slot to a bullet will take
on average half the time it takes to scan x slots, where x is the number of bullets currently in motion, the code will stop the instant it finds a vacant slot and use that one, so if it found slot 1 free then the search would take 1 loop, likewise if you had twenty bullets active and they where all in the first twenty slots then you need to scan 21 slots to find a free location, the overhead
on average will be 1/2 of the number of bullets active, as you would expect the more bullets active the slower things happen, I used simular code for a two player game with machine guns and the framerate was more affected by the scenery and animations than anything else, the bullets where no problem, you will also notice a "hill" with DB, what I mean by that is (this is just an example) you may have 60fps with 200 objects on screen and 40fps with 204 objects on screen, the limit has been raised with pro but you will notice a marked slowdown above a certain amount of objects.
the main object of my code is to reduce the number of logic decisions (if/then, case etc) in the main loop, you can do (relativley) a lot of loops and math for the price (timewise) of one logic decision, since logic slows code it`s best to try to keep it out of the main loop, for example
if object hit(4,3) then whatever
if object hit(4,8) then something else
if object hit(4,9) then something else again
etc.....
imagine it takes 1/100th of a second to make each decision (it doesn`t..pro is way faster than that, but bear with me), 10 decisions in the main loop will slow the game down to 10fps, but do this
collisionvalue=object hit(4,0)
if collisionvalue>0 then sort out the details
and you do 1 test per loop and the loss to gamespeed is 1/100th second, if an event does happen then the code takes 1/100th of a second to jump to the subroutine/function that handles the event, and 1/10th sec to sort out what happens, so when you die it takes 1/100th second longer for the event to happen and you have the advantage of the main loop running at 100fps rather than 10fps, a good tradeoff, the main thing is to try to keep decision logic out of the loop as much as possible, but this is digressing rather a lot, back to bullets, another option is to just use intersect object and show flashes (texured plains) across the collision positions when bullets hit walls etc, intersect object is way faster and in real life you don`t see the bullets coming anyway, the only time you need something that moves visibly is if you have a rocket launcher, otherwise, let math do the job and ignore fast moving objects like bullets, or you could compromise and have a small amount of ghosted cylinders hidden away and then just flash one up positioned between the player and the object intersection for four or five frames at the correct scale and then remove it again, that would look like a laser shot, or you could rapidly scroll a texture on a box postioned in the same way so that a "bullet" travels down the box from player to object hit and have the box transparent and the texture black apart from the bullet (but you will have to wait untill they sort the transparency properly for that), or any number of other ideas that I haven`t mentioned but may have just occured to you
, it`s a matter of what works best for what you are trying to do, cheers.
Mentor.
ps: you have to keep track of them some way to make sure they don`t fly off into space and journey on forever, so counting down how long they still have to live is a good bet since they can`t travel too far before they get stopped and put on the list of objects free to be used, just make the lifespan such that they can travel as far as is reasonable before they get put back in the heap, normaly they will die before that from hitting walls/players etc, but it would be weird if they traveled off into space and you forgot about them and then half an hour later they suddenly started to rain down on you after the float values had rolled over and allowed them to re-enter the other side of the world-space and pass through the games location again