Just scouting for ideas here, but what would be a good way to implemenent mulitple screens in a game. I am thinking of a 2d game where when the player hits the edge of one screen it scroll to the next room.
Thanks all,
Martin
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
First, screen is a pretty bad term to use in your context “what would be a good way to implement multiple screens in a game”. You should stick with using the term rooms. The first time I read that I thought you were talking about developing a split-screen multi-player component.
The answer is simply that it’s really up to how you want to approach this. Since we’re brainstorming: You could read and parse an external data file detailing how each room is set up; You could create each room in code; You could even randomly generate each room. Just make sure you keep track of what room the player is in and the rooms surrounding said room and you will do just fine.
Lastly, in my opinion, I find an object oriented approach works best for game development like this in order to keep your code organized and clean.
Good luck!