• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Help with Tower Defence

Jinam

Lurker
Mar 8, 2010
5
0
I have decided to do a Tower Defence on Android platform for my final University project. After i builed the map/road/hill i found myself stuck on building the Tower and how to make them interact with monsters.
I want to know if i should make a new class that implements view or use the class that does all the drawing.
Any examples of Tower defence implementations would be nice.
 
Welcome to the forum! :D
(...but please don't double-post :eek:)
FYI, I've moved this to the "Developer" subforum. As it's obviously not about a finished app.

-> For this type of game, you should definitely consider making separate base classes for the environment, the monsters, and the towers (and then make subclasses for each type of tower and monster).
-> You don't want your "when-tower-sees-an-enemy" code in the same module as the painting code! You might want to use a model/view/controller setup, that'd be one way to make sure the physics are not frame-rate dependent.

There's a ton of tower defence source code out there...
 
Upvote 0
Being my first post in a forum hope you believe me when i say the double post was without intention. Back to my problem...i followed your advice and found a nice open source java TD named hexTD and read most of its classes and found myself with another problem. The fact is that all the monsters/towers classes are actualy interfaces(Ex: public interface tower), but in all the Android app i have never seen a interface so i guess what i'm asking is did the Android platform replace interface with something like view?? Btw thx for the fast reply
 
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones