I’m studying Java right now, and I’m thinking of this tool as my practice project.
The game is “League of Legends” in case anyone knows it, I’m not actually simulating the game as in simulating game play, I’m just trying to create a tool that can compare different champions to each other based on their own abilities and items bought inside the game.
The game basics are:
- Every player has a champion in a team of 5 players playing against
another team. - Each champion has a different set of abilities (usually 4) that s/he
uses to do damage to opposing champions. - Each champion gets stronger by buying different items, increasing the
attack it deals or decreasing the damage received.
What I want to do is to create a tool to be used outside the game enabling players to try out different builds for their champions and compare the figures against other champions they usually fight against.
The goal is to enable players get a deeper understanding of the different item combinations (builds) that can be used during the games, instead of trying them out in real games which can be somehow very time consuming.
What I’m stuck at is the best practice I should follow to make this possible using Java, I can’t figure out which classes should inherit from which, should I make champions and items specs in the code or extracted from other files, specially that I’m talking about hundreds of items and champions to use in that tool.
I’m self studying Java, and I don’t have much practice at it, so I would really appreciate any broad guidelines regarding this, and sorry if my question doesn’t fit here, I tried to follow the rules.
English isn’t my native language, so I’m really sorry if I wasn’t clear enough, I would be more than happy to explain anything that’s not understood.
5
I would start by laying out my objects/classes that I need to code:
- main object (Champion)
- with attributes of Strength, Agility, etc.
- Spells
- special attacks
- decorator objects (Items you buy in Game)
- their attributes
- what increases?
- Class for Champion interaction (or direct battle simulation algorithm)
- attributes like Distance or time (these might even be something to Program into the champion or the item)
with the Items I would use the decorator Pattern to add the stats together.
{very rough example}
when you have the objects all set up then I would create a Database that would hold the information for the different objects
or classes
I hope that this gives you a good starting point. I didn’t want to do all the fun stuff for you. 🙂
Addition
Best Database for Java?
doesn’t look like it matters what database that you use when programming with Java.
I would probably go with MySQL mostly because it is Free. as far as I know you can connect to a MySQL Database from any language.
that post mentions a couple of other Databases
HSQLDB
H2
I do most of my work with SQL Server or MySQL.
1