Hi fellow game makers,
I am building a game for the first time, I have several questions regarding it if you don’t mind:
Does tower defense need physics?
I am thinking I can move the enemies and the bullets along using transition (to x and y)
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.
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
[import]uid: 11334 topic_id: 4235 reply_id: 304235[/import]
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
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
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
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.
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]