Java End of Year Project
Well it's almost the end of my school year, and I'm looking for a nice project to end the year.
I'll skip the requirements; I can fix up anything later on. I'm just looking for a fun but plausible idea. Eg. Game.
No board games; other classmates are already doing those. :(
No AI in the games either. That'll be complicated @_@
I'm just looking for some help in brainstorming and getting started. Still pretty new to Java, using JCreator. If anyone can help, that'd be cool. Thanks!
Also, I'm looking for something to do with Pokemon just because...well...it's Pokemon. No AI. Possibly something like, two players pick out of a list of pokemon and battle?
Not going to code too many though. But how would it work?
ArrayList of Pokemon objects? And would adding stats(Strength, Speed, etc) be too much trouble or should I just stick with flat damage similar to Pokemon cards?
So you want a turn based rpg, or just a turn based battle system? The ai would be real simple and you can definitely incorporate stats into the damage calculations. An array list of pokeman objects would work. There are a lot of different ways you can approach this, be creative, and if you get stuck come ask for help.
I'm thinking just a simple version. Two players pick out of a small group of pokemon(Maybe ~20?), and they just have an old fashioned battle. Player one's will be in the lower left, etc etc.
Only problems I'm seeing:
Drawing the actual Pokemon and the attack animations. I doubt I'll do an AI because I'm not sure what I'd want it to do.
- Pokemon objects in an array list.
- Moves will be a sort of boolean. Also with a paint method or some sort to move with a step counter. Turn to false once it reaches the other pokemon and make that pokemon blink.
I suggest you take a bit of time and really plan out what will be needed before you start the project.
For example, you may want a class to represent pokeman(which allows them to attack and do other stuff)
Then an a class that manages one players group of pokeman and so on. It should be fairly simple if you think out all the classes ahead of time.
You can also make the pokeman class be able to draw itself, or just have it have an image of it's self which is drawn to the panel.
AI would be simple. Random a number 1-20, play that pokemon. Random 1-4, play that abilities like in the gameboy game.
Are you trying to make it look like the game where the pokemon shakes a little and a short animation plays for each move? You could load a jpeg of the chosen pokemon to the screen.
The concept isn't hard, its how deep you want to go. I suggest drawing up your idea, what do you want out of it? Do you want the battle screen like from the gameboy games or are you looking for more of a trading card style? Is it hotseat or network multiplayer if multiplayer at all? What options are you trying to achieve and ultimately, what does your teacher need from you for your grade?
Before you start coding, figure out what you need, then make it. Focus on fulfilling the class requirements before adding the filler data that makes it more appealing to the user.
-General 1v1 Pokemon Battle. Two players pick out of a pool of ~20 Pokemon, 6 per player. Also option to choose VS AI. Difficulty might make it harder to code. Eg. It picks super effective moves/pokemon. Might just stick with the random.
-Attacks are going to have basic animation. Fireball flying across the screen step by step and when it reaches the other pokemon, disappears and the pokemon blinks.
-No items. Just [Fight] [Pokemon] and [Forfeit]. Might implement items later on.
3 "Major" objects
Max of 4 "Minor" objects.
No Blinking(Bad animation)
Key Listener, Mouse Listener
Object Oriented Programming:
Modular, Adv Graphics/Java concepts.
Major Objects can maybe be a background. Maybe a "background" option in the game? Major objects are just "detailed representations of an object". Just realistic. Maybe a city scene or a field with realistic trees, buildings, cars, etc.
Minor objects, I'm not really sure. Maybe another part of the background?
Major Movement: The Pokemon attacks.
Minor Movement: The Pokemon flinch and maybe status effects(Speed down, attack up, etc)
Blinking: Just don't let it blink.
Sound: Import the original soundtrack?
Key Listener/Mouse Listener: Keyboard arrows to select an option from Attack, Pokemon, and Forfeit.
Importing images: The pokemon pics.
Buffering: Can go with the object images.
Other: Will see as it goes on.
Modular: Just make it more organized. Self documenting identifiers, comments, methods, etc.
Advanced Graphics/Java Concepts: ArrayList to hold the Pokemon, polygon motion for the moves.
Does this all work out? Point out anything that's weird or can be improved on. Thanks!
Making difficulties wouldn't be that hard, you'd still be using the random however say difficulty one is just random # 1-4 then do move. Difficulty two would be random 1-6, where 5 and 6 are moves of the most effective type. You would just make a table of what is effective against what. If you code the weakness stat in your pokemon class, you would just call the weakness array and if there are any attacks of that attack type it would be triggered if it hit 5 or 6. If there are more than one, call a random again for each move of that type.
Random number 1- grass(Move 1), 2- normal, 3- normal, 4- grass(Move 2), 5- grass, 6- grass
Number drawn = 5 or 6
Random number 1- grass attack move 1, 2- grass attack move 2.
Its not much different than what they use in the game.
Well I'm not really worried about the AI at the moment. Just the 1v1 thing.
Ok. I have most of it planned out... Now for the actual code. -_-
Can anyone help me start the code? Right now I'm just trying to get it to show the basic pokemon battle screen. The grass I can do a polygon with a ton of points to make the effect work and just put the pokemon pic on top of it. But I'm really bad with code :/
Try writing something up, are you forced into drawing all the graphics with the Graphics2D? If not it may be better to get a bunch of little JPEG's and load them into the game.
I still need to plan this all.
Just overall class is called Pokemans
Then methods for the battle screen, pokemon, etc? I'm just not sure. I have the idea, just not the code and ideas.
I'm planning to draw the grass field under the pokemon(See other pokemon battle screens) and just import JPEG's for the Pokemon. Really need some help @_@
Ok. I got two more partners(Wooohoo!) who are pretty good at code! :D
Anyhow, I'm making the Battle Screen for the project.
Black Border(Filled Polygons so they can be thick-ish.)
Both Health Menus(Polygon box, Lv. 100 Text, HP bar filled with green, empty spot for pokemon name)
Circle Field under both Pokemon(Seperate methods for light and dark spots) Pokemon just go on top of the field.
Does this seem like it'll work?
This is the part of code that you have to solve yourself. We can tell you a 101 ways to write the code, but in the end its however you want to write it. The beauty of OOP is that as long as it confines to the rules, theres no wrong way to do it. Your goal is to come up with it, establish your pokemon objects and then draw them.
How I would do it is probably different then how you would do it. At this point in development you need to sit with your partners and discuss how you want to develop it. When you get to the part were you don't know where to go with your code, don't know whats wrong with your code, or are unsure of how to accomplish your idea in code thats when you ask.
If you take the time and effort to produce something, thats when we will help. The design procedure is up to your team, not us.
Thanks for the support.
Right now I'm drawing the basic Pokemon Battle Screen.
Borders(Top, Left, Right, and Bottom as methods. Filled black polygons.)
HP Boxes(HP Bar, green fill, will find some way to make it decrease depending on HP lost. Level is automatically 100 for argument's sake. Room for pokemon name.)
Right now the only problems I'm having:
-Drawing the grass(Though I can do that with a polygon and a busload of points. Fun stuff.)
-HP Box; curved corners? I don't want a normal solid rectangular angular box. How would you make the corners curved?
-Found out how to make a curved-corner rectangle. Also found out how to find the right colors. Finished basic format for HP boxes and borders.
-Start screen main Pokeball and "Start" button complete.
Progress Check: HP Box complete, HP Bar complete, Lv. 100 Complete, Title Screen complete-ish.