Hello!
Today I started a SourceForge project for the game that I'm making, and I wanted to get input on the Map Builder/Editor. I DID include a readme file that has directions, contact info, and future features.

JISO Map Builder

Please give me feedback, this is a project that I want to turn out really, really well.

A few observations:

  • It seems that you are using an IDE for developing this project. It would be nice if you would format the code so its easy on the eyes. If using Ecilpse, use CTRL + A to select the code and then press CTRL + SHIFT + F for formatting your code.
  • No need to manually type down the accessors(getters) and mutators(setters). If using Eclipse, use the shortcut CTRL + SHIFT + S and then R.
  • Why use Vectors when you have ArrayLists?
  • The classes lack a proper description and documentation. If you are expecting people to help you out, your code should be easy on the eyes.
  • In class HealthBar.java for line g2.drawString(label, x-12, y+10); , what does 10 and 12 signify? Avoid magic numbers and literals; give them descriptive names and declare them as static final fields.
  • Consider placing the textual entities in your code in a separate properties file [like the strings "HP" and "MP" in HealthBar.java] otherwise a small change in them would require an entire code re-compilation.
  • Rather than having 5 constructors in your Unit.java file, consider using the Builder design pattern.
  • Why does every field in the Unit class has a "default" access specifier? If your class is abstract, it makes much more sense to have "protected" fields since your class is going to be subclassed anyways.
  • When you declare a class as abstract, instead of having methods with empty body [like draw() in Unit.java] consider making the method itself abstract.

Oh well, I can't go in any more details due to time constraints but I hope you get the point. Closely study the source code of some of the best open source projects out there and you'll know how things are structured in the real world. Read Effective Java by Joshua to use Java effectively.

Good luck.

Thank you so much for replying! I read over and thought about what you said, and they are all very good points! thank you for pointing them out. I did rush the project online, not correctly formatting the code and leaving many classes and methods empty. When I get a chance, I will either remove those, or update them.

There are a number of other things that need to be done, and most of that is due to lack of time.....

Anyways, what did you think about the program (If you used it)?

Also, I use NetBeans. I tried using Eclipse in the past, and I don't think it lived up to all the hype....

[*]Why use Vectors when you have ArrayLists?

Vectors are synchronised, and a bit shorter to type.
Why use ArrayLists when you have Vectors?

>Anyways, what did you think about the program (If you used it)?

Sorry, I couldn't due to time constraints.

>I tried using Eclipse in the past, and I don't think it lived up to all the hype....

I personally feel that once you start exploring Eclipse and its real power which lies in the plethora of plugins out there, there is no turning back. As a professional Java developer, I think it's worth a second try IMO.

> Why use ArrayLists when you have Vectors?

  • Because synchronization is broken in the eyes of the masses
  • Because 9 out of 10 usages of Vector is due to the fact that someone needed a simple list but the words 'thread safe' sound much cooler
  • Because 9 out of 10 people don't know what they are synchronizing
  • Because blind faith and abuse of Vectors in lieu of ArrayList results in serious performance problems
  • Because real world synchronization issues are worth more much than synchronizing a single line of code
  • Because concurrency bugs are *hard* and having a fake sense of your applications' thread safety doesn't help

Though Vectors are not necessarily evil, their ill usage has taught me better than to trust a code which prefers Vectors over ArrayLists.

For those interested in citations, please read the chapter on Threads from the book Sun Certified Programmer Java 5 by Kathy Sierra for more details.

While formatting my code today, I noticed that much of my code needed a bit more than tidying up, and I had a few changes in mind. So, I went and downloaded Eclipse, and once again, and many problems at first. But, I kept at it, and I do like it quite a bit. I decided that I was going to rewrite most of my code, and do formatting at the same time. So, in a day or so, I'll have it all nice and neat =D

This article has been dead for over six months. Start a new discussion instead.