General Concept Question For Game Design
Hi all, I'm relatively new to Java programming, and I'm hoping to expand my knowledge and flesh out my coding skill. I have an idea for a game similar to Stick RPG (link here). My plan for the game is fairly simple: I don't want to have the character move around the environment; instead, I want to have a map screen that links to different screens (workplaces, shops, etc.), in which the player can do certain things (work, sleep, buy items, etc.). The gameplay is actually quite slim in my design, in that most of the "work" will be choosing what to do with your in-game time, and how to make the most of your time and achieve a high score, i.e. large amounts of cash.
I'm sure I'll have a lot of questions throughout the duration of this project, but for now, I'll start small.
1. What can I use for the different screens?
This game will be doing a lot of screen-switching, so I'll need some way to create a frame and constantly insert new "screens" with a background image and buttons. I messed around with JPanels and JLayeredPanes, and I was unable to make a new screen appear without creating a new frame. Could someone point me in the right direction on this?
2. Where do I put the main "logic" of the game?
I'm not sure where I need to put the mathematic portions of the game, like drawing a random number for a paycheck, or adding that number to a "bank account" value on the main screen. I assume this will involve some heavy encapsulation, and most of the work will be done by the specific screen class. This question is mostly unanswered because I've been unable to get to this point in the programming, as I've been stuck on the above question.
3. Any tips for developing a game, even such a simple one, or any general Java advice?
Like I said, I'm new to programming, and I'm willing to listen to any advice you're willing to give. If you think you've got a helpful hint, please post it. Every bit of knowledge is useful to me right now, and I appreciate whatever handy tidbits you have.