Does anybody know of any methods of quickly displaying two bitmaps at one time. I know that technically it's not possible but... Such as if you were in a plane and you were firing at something so bullets appear as if are being shot of the plane. But what if you want to quickly shoot twice. I can't seem to find a way that is able to display all of the bullets flying at once. I have an algorithm that is able to do it okay at best, but it's not good enough.
Here is what I'm doing:
//display the beginning animation of the bullets coming out of the plane
//continue to display the bullets until it reaches a certain point
//if a certain variable is triggered then display animation 3
//if a certain variable is triggered then display animation 2
//if the shoot key (space bar) is pressed during the display of shooting bullets then animation 1 is triggered...animation 1 can not be triggered if variable 2 or 3 are triggered...hence this means that it can only display 2 bullet display at once (Sorry it's hard to explain)
//animation 1 = the beginning display of the bullets for the 2nd shooting
//animation 2 = the repetitive display of bullets being shot until the 2nd bullets reach the 1st bullets y coordinates
//animation 3 = the repetitive display of bullets until the bullets reach a certain point
//so the first round of bullets go off then once the second round go off the first round stop until the second round reach the height of the first round of bullets...once the first round of bullets reaches that certain point then the second round of bullets finish off reaching to that certain point
that technique does not look pretty at all. would it best if i just created bitmaps that would represent all of these situations? but that would mean i would have to create a ton of bitmaps. should i create more animations to where it doesn't appear as if much lag is happening when the bullet movements are switching back and forth. is their a better way that i'm not aware of? i don't think there are multithreading capabilities in allegro are there? any ideas anybody?
sorry, vicious, for kind of stealing your thread and your ideas...well somewhat. :D
EDIT: Thanks Josh for the info. And, Vicious, it doesn't look good at all when I do it...not sure why?
EDIT 2: Would page flipping be something that could help resolve that problem?