Hi there JGO community!
I just started working with a team of friends on a 2D RPG.
We only have about a years worth of experience in Java in our College/University.
So far we have written everything from scratch and haven’t used any external libraries (everything is in javax.swing)
Before we get any further than we are now, I’d like to stop and ask questions to see if we are on the right track,
or if we are failing horribly and need to do things differently.
The only things currently working are the map loading to the screen, and character movement. No collision yet.
A) The game is currently running as an applet. If the game doesn’t turn out as horribly as we think it might, we will consider
making the game available to the public. Is this a viable way of putting the game out there? Or are there better solutions?
B) The map is stored as an array of ints. Each int corresponds to a tile in a switch statement. We currently only have about 10 tiles… but with any more I KNOW this will turn out bad. My idea was to have a tile class and work from there. Does that work?
C) When holding down a movement key, java starts to read the input about as fast as you can type in a text file by holding down a key. Is there any way to limit the input so the movement becomes “fluid”? It currently turns out as one step in any direction, followed by a slight pause, then the character will take off sprinting in that direction.
D) We were probably thinking too far ahead, but we tried making a save method. It gets called when a button was clicked on the applet, just as a test. It then exports the character position into a text file using PrintWriter, which could be loaded later on. Doing so would completely freeze the applet. My professor mentioned that the applet doesn’t have permission to write on the C drive, and that may be why the applet freezes. Is this just a hindrance on our applet choice again? If not, are there ways around it?
E) As I mentioned we are only using java strictly and currently do not use any external libraries. Is there any merit at all to writing the game this way?
Or should we start from scratch using something like slick2D? We are doing this as a learning experience and hope to be professional game developers someday. Is it worth it trying to “reinvent the wheel” so to speak and design the engine the way we are now? Or would we be better off implementing the things others have already figured out?
F) Probably the most important thing in my opinion to learn well at this level: ORGANIZATION. I feel as if we are doing too much in the Game class, and not enough in classes like Player, etc. How much should be done in the actual Main program? How much should be handled elsewhere? I know most organization is a matter of taste, but what has worked for you as far as doing things, and where you do them. The most typical error that I keep encountering is making a static reference to a non-static method/value which usually pushes me to write more in the main and less in outside classes.
Sorry for the extended noobness, but even the questions I thought would be simple on these forums turned out to be quite ahead of where I think we are as developers. Any help or ideas would be greatly appreciated (and also gets JGO in the credits when we finally finish a project :P)
EDIT(added (F) and this–>) FYI if anyone wants to see the abomination that is our current source code, feel free to ask. Your eyes may burn from looking at it.