Original Post
Hey everyone! It's been a while again since I've posted. I'm working on a Roguelike right now, and I'm currently in the console stage still. I'm trying to work out all the mechanics before I flush out the graphics.
Currently I plan on having several classes available to the player that have unique skill trees and stats. I have a class Entity that is the top level class for anything that can battle in the game. Monster extends Entity and Player extends Entity. Then I have each of the individual classes of Monster extend Monster and the same for the Player. However this is where I seem to have run into a snag.
When I start the game I create a Dungeon object with a random number of Floors. Dungeon then spawns those number of Floor objects, each with a random number of Rooms. Then each Floor spawns those number of Room objects, and finally each Room takes care of how many items,"interactors", and Monsters it has.
After Dungeon has spawned the entirety of it's components it generates a random story based on a static array of Strings that I pull from a "random" utility class I made. Then the game proceeds into the TUTORIAL state before going into the actual game loop. At this point the program asks the Player his/her name and profession. This is the part that confuses me. My program is currently responding to requests to the Player as such:
Pick your Job:
1:ARCHER
2:WARRIOR
3:MAGE
4:ASSASSIN
etc.
However a number of things escape me. I only have a few classes as of now, but I plan to expand on them, so how should I prompt the character with the classes? As of now I simply use a forLoop to run through an array of String names of the classes. But then after that how do I read in a number input to spawn the right class for the character?
Also, in anticipation of the graphics I had a few questions as well. I don't plan on making the game real time. The window will display one Room at a time and a mini-map of the rooms at the top left corner. The player will make every command from a selection of buttons at the bottom section of the screen.
This is where I get confused.
Take the following hypothetical situation:
Player is a Warrior, and enters a battle with a monster. The bottom panel displays
[ATTACK] [MAGIC] [ITEMS]
[DEFEND] [SKILLS] [RUN]
The player decides to attack so he clicks the attack button. The panel's "state" switches over to the attack state and displays a new set of buttons. However, each class will have a different set and number of buttons. How would I allocate them in the screen per each class? I haven't gotten to this stage yet but I would still like some feedback on it.
I'm still cleaning up the code a bit, it's quite ugly so I'm not going to post it immediately. If anyone requests it though I will gladly post it.
Thank you so much for your help, I hope my questions and descriptions were clear enough.
Currently I plan on having several classes available to the player that have unique skill trees and stats. I have a class Entity that is the top level class for anything that can battle in the game. Monster extends Entity and Player extends Entity. Then I have each of the individual classes of Monster extend Monster and the same for the Player. However this is where I seem to have run into a snag.
When I start the game I create a Dungeon object with a random number of Floors. Dungeon then spawns those number of Floor objects, each with a random number of Rooms. Then each Floor spawns those number of Room objects, and finally each Room takes care of how many items,"interactors", and Monsters it has.
After Dungeon has spawned the entirety of it's components it generates a random story based on a static array of Strings that I pull from a "random" utility class I made. Then the game proceeds into the TUTORIAL state before going into the actual game loop. At this point the program asks the Player his/her name and profession. This is the part that confuses me. My program is currently responding to requests to the Player as such:
Pick your Job:
1:ARCHER
2:WARRIOR
3:MAGE
4:ASSASSIN
etc.
However a number of things escape me. I only have a few classes as of now, but I plan to expand on them, so how should I prompt the character with the classes? As of now I simply use a forLoop to run through an array of String names of the classes. But then after that how do I read in a number input to spawn the right class for the character?
Also, in anticipation of the graphics I had a few questions as well. I don't plan on making the game real time. The window will display one Room at a time and a mini-map of the rooms at the top left corner. The player will make every command from a selection of buttons at the bottom section of the screen.
This is where I get confused.
Take the following hypothetical situation:
Player is a Warrior, and enters a battle with a monster. The bottom panel displays
[ATTACK] [MAGIC] [ITEMS]
[DEFEND] [SKILLS] [RUN]
The player decides to attack so he clicks the attack button. The panel's "state" switches over to the attack state and displays a new set of buttons. However, each class will have a different set and number of buttons. How would I allocate them in the screen per each class? I haven't gotten to this stage yet but I would still like some feedback on it.
I'm still cleaning up the code a bit, it's quite ugly so I'm not going to post it immediately. If anyone requests it though I will gladly post it.
Thank you so much for your help, I hope my questions and descriptions were clear enough.