Campbell Ritchie wrote:The actual requirements will depend on your game's requirements; if it is turn‑based like chess, the networking mightn't have a heavy workload. I suggest you try this part of the Java™ Tutorials. You can probably connect any two computers not more than 8,000 miles apart in a straight line.
Moving you to our Sockets forum.
Rob Spoor wrote:Did you already check if such a game would be legal? The Pokemon copyrights are owned by Nintendo who have given licenses to a few development companies to produce games for them. If you create a Pokemon game you may (probably will) end up getting sued.
Of course you can work around this a bit by making a Pokemon-like game. You can't use any existing Pokemon, but catching monsters and having them battle and evolve isn't copyrighted - I've seen enough Pokemon clones already.
Knute Snortum wrote:
Also, there is one thing with javafx that is causing me problems- The inability to add my own UI classes to scenebuilder. I made several helper classes to group UI functionality. For example,there is a battleUIHolder class that holds hpbars aand text labels for showing pokemon info. In unity3d I would have made a prefab for this class and instaintiated it in the UI when necessary. In scenebuilder the concept of a prefab does not exist.
Scene Builder is an application to help you build an FXML file, so I'm guessing when you say, "add my own UI classes to scenebuilder" your saying you want to add GUI objects to a Scene that was created by an FXMLLoader? If so, that's not true. A Scene is a Scene, no matter how it was built or loaded. You can add Nodes to a Scene to your heart's content.
Knute Snortum wrote:Since some people on this forum don't want to click on links, here is the class Trainer:
For example, the trainer class is responsible for enabling the pokemon swap menu and making sure that the player is forced to send in a new pokemon after the current one dies.
I have a hard time understanding exactly what the problem is here -- maybe it's above my pay grade -- but I can point out a few other problems with the code.
Always start a class with an uppercase letter. Trainer is fine but pcTrainer should be PcTrainer or PCTrainer.
Use a real package name. Do you own the domain company.com? If not, fine some other unique package name.
Create object variables with an interface rather than a concrete class, if possible. For instance, you have protected ArrayList<Pokemon> party = new ArrayList<>(); Use protected List<Pokemon> party = new ArrayList<>(); instead.
Don't use underscores in variable names. The idiom for setting an field with a parameter is this.name = name;
Use more comments. Even when writing prototype code, every method and class should have a comment. This clears your mind as to what the method is doing and helps you remember why you wrote it.
Always use braces, even when you don't have too. Especially with if statements, even if there is only one statement in the "then" clause, use braces for clarity.