tower defense physics

Hi fellow game makers,
I am building a game for the first time, I have several questions regarding it if you don’t mind:

  1. Does tower defense need physics?
    I am thinking I can move the enemies and the bullets along using transition (to x and y)
  2. Suppose that I only use transition for moving the objects around, how would I “lead the target” basically shooting the bullet ahead of the target so it will intercept.
  3. Is it simpler to move the enemies along using physics? I am not sure how to start? maybe apply force along the path to turn?

Thank you for your time :slight_smile:
[import]uid: 11334 topic_id: 4235 reply_id: 304235[/import]

  1. no you don’t *need* physics. it might help with collisions but actually you can use x,y coordinates a lot of the time to determine whether 2 objects have collided

  2. i imagine you want to use the formula speed = distance/time and adjust your variables accordingly. ie you know how fast your enemy is travelling, you know how far your bullet will travel and you can calculate the distance between them, or rather the target point in front of your enemy where he will end up. therefore you can calculate the time in advance you will need to shoot your bullet

  3. i dont think so. i think using physics would be more complicated. physics is good for simulations. but in tower defense games it is rare you will want your enemies to collide with other objects, accelerate, decelerate etc… however it might make for a more interesting game. I’m not saying *don’t* use it, i’m just saying you don’t need to

[import]uid: 6645 topic_id: 4235 reply_id: 13139[/import]

Argh sorry for the late reply. Work has been crazy busy.
All of your answers make complete sense, thank you , I opt to not include physics module, the extra space is minimal but hey. :slight_smile:

You have been very helpful jmp909, I have used your module, a piece of your code (in that Bounty/Lime tiling thread) and your informational replies to keep my project going, I sincerely thank you. [import]uid: 11334 topic_id: 4235 reply_id: 13455[/import]

Did you have any joy writing code for this?

m [import]uid: 8271 topic_id: 4235 reply_id: 15426[/import]

any joy? Yeah sure I enjoyed writing it? [import]uid: 11334 topic_id: 4235 reply_id: 15559[/import]

Do you have any code to share? [import]uid: 8271 topic_id: 4235 reply_id: 15597[/import]