1. Check out our app, Forums for Android! Download and leave feedback here!

Help with Tower Defence

Discussion in 'Application Development' started by Jinam, Mar 16, 2010.

  1. Jinam

    Jinam Member
    Thread Starter
    25

    Mar 8, 2010
    5
    0
    25
    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.
     

    Advertisement

  2. KlaymenDK

    KlaymenDK Well-Known Member
    143

    May 29, 2009
    1,217
    130
    143
    Denmark
    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...
     
  3. Jinam

    Jinam Member
    Thread Starter
    25

    Mar 8, 2010
    5
    0
    25
    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
     

Share This Page

Loading...