Projectiles in tile mapped turn-based tactics game?

Posted by Petteri Hietavirta on Game Development See other posts from Game Development or by Petteri Hietavirta
Published on 2011-02-16T13:56:56Z Indexed on 2011/02/16 15:34 UTC
Read the original article Hit count: 266

I am planning to make a Laser Squad clone and I think I have most of the aspects covered. But the major headache is the projectiles shot/thrown.

The easy way would be to figure out the probability of hit and just mark miss/hit. But I want to be able to have the projectile to hit something eventually (collateral damage!).

Currently everything is flat 2D tile map and there would be full (wall, door) and half height (desk, chair, window) obstacles.

My idea is to draw an imaginary line from the shooter to the target and add some horizontal&vertical error based on the player skills. Then I would trace the modified path until it hits something. This is basically what the original Laser Squad seems to do.

Can you recommend any algorithms or other approaches for this?

© Game Development or respective owner

Related posts about 2d

Related posts about collision-detection