filmov
tv
Programming II Project | Tank Game | Multithreaded

Показать описание
This was my first experimentation with creating new threads at run time.
My Tank class passes information on obstacles positions, along with an 'Impact' function pointer, to my ProjectilePool class, which then runs through it's active projectiles checking for any collisions.
If it finds a collision, it sends a call back to the 'Impact' function with information on the collision location. This function then creates a new thread to handle the particleFX, allowing the collision checker to continue running.
(NOTE: My free screen recording software makes things look a lil bit jumpy; in reality, it runs nice and smooth)
My Tank class passes information on obstacles positions, along with an 'Impact' function pointer, to my ProjectilePool class, which then runs through it's active projectiles checking for any collisions.
If it finds a collision, it sends a call back to the 'Impact' function with information on the collision location. This function then creates a new thread to handle the particleFX, allowing the collision checker to continue running.
(NOTE: My free screen recording software makes things look a lil bit jumpy; in reality, it runs nice and smooth)