# Range

**URL:** <https://forum.kirupa.com/t/range/229652>\
**Category:** Uncategorized\
**Created:** [June 19, 2007, 8:35am UTC](https://forum.kirupa.com/t/range/229652 "2007-06-19T08:35:36Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chesso](https://avatars.discourse-cdn.com/v4/letter/c/f14d63/32.png) [@Chesso](https://forum.kirupa.com/u/Chesso)\
**Post date:** [June 19, 2007, 8:35am UTC](https://forum.kirupa.com/t/range/229652/1 "2007-06-19T08:35:36Z")

</div>

I’m thinking about having a go at one of those Tower Defense games (or building as many elements to help make one up as possible).

I have a static non-moving tower that fires at a specific enemy object (bullets never miss, I can change there frequency etc).

But I don’t know how to handle “ranging”?, like a circular range around the tower that defines if it should shoot or not (only if the enemy intersects/comes inside of the towers range).

Any ideas?

**P.S.** I have tried to do a couple simple things like if enemy X/Y is N amount of pixels away but it only ever ends up doing well with 1 particular entry point and not others, there must be a better way of going about this lol.

Oh and if anyone has advice for other elements (that I haven’t yet gotten to) concerning tower defense games (ones like Vector TD in particular as I like how that one works), it would be greatly appreciated.
