3 Replies Latest reply on Mar 1, 2010 3:01 PM by gimbal2

    Designing Tower Defense

      Hi, I'm currently studying Java in our course and we have a game project due on April. Frankly, our course doesn't teach much about Java except the basics. I would like to ask for some advice on which class to work on first, because our prototype is due about two weeks from now and I don't really understand the tutorials I've been reading online so we haven't really started on anything.Another thing I would like to ask is which layout would be easier to implement, using tiles or not. Thanks for all the help and sorry for the bad English. I'm a Filipino. :D
        • 1. Re: Designing Tower Defense
          First of all: your English is near perfect, so stop being insecure about that ;)

          It is a little hard to guide here, as you don't give so much details. It is fine that your Java skills are not that strong yet as you are only in the prototype phase, but I do hope you are studying hard to get to know it. Learning a programming language is not something you can do in a classroom (only for support), it depends heavily on the amount of time you invest yourself, reading a book and trying out little experiments to see how things work. The basic idea is that you get behind a keyboard and start experimenting, you do not rely on information a teacher feeds you.

          Having a pet project is a good way to learn, as you focus on specific problems in stead of "learning Java". But you cannot get into those specific problems until you learn the basic syntax of the language and the idea behind object oriented programming, so get cracking on that. The java tutorial is a good source for information in this regard:

          [the java tutorial|http://java.sun.com/docs/books/tutorial/]

          Now for your prototype: you'll need to be a little more clear on what you are supposed to do. What do you mean by "layout" and "tiles" ? What kind of application are you supposed to deliver? A console application? An applet?
          • 2. Re: Designing Tower Defense
            Thanks for the quick reply. I am self-studying right now, and I have Sam's Teach Yourself Java in 21 days as my reference, but I have only read up to Day 6 which is about packages and interfaces. I doubt that I will have enough time to finish reading till the last day. I can see that Java is really more complex than C, which we were studying for the past two terms in college. We're (my partner and I) are supposed to program a game which is similar to tower defense. As for the tiling layout thing, it's from some flash game my cousin gave to me as a reference. Here's the link:
            By tiling, I mean designing the game, maps, and placing the towers in square blocks. The other option is that I don't use that and just allow the user to place towers on tree sprites that I might make. It might sound a little confusing, I don't understand myself anymore either :)) I'm starting to regret the project we proposed. We should've gone the easy way lol
            • 3. Re: Designing Tower Defense
              you seem to be a little in over your head with this project I'm afraid. If you want to do something similar to Flash in Java, you're at least looking at Java2D + a little Swing (the GUI API), which is not really an option to learn if you don't even have the language basics down. The second option is JavaFX, which is again not really an option before you know the language. In fact, how can you ever do a project with such a strict deadline when you don't know the language yet!?

              As far as game mechanics go, a tiled solution is by far the easiest to work with, as the data structure you can use to manage it can be very simple; a class on top of a 2D array can be enough to get the most basic functions implemented quickly.

              Well, good luck. I hope you can pull something together. If you have troubles, feel free to post your progress here and hopefully people will try go guide you - I'd continue your questions in the "new to java" forum though, you'll have more chance of getting the right kind of help.