Advertisement

Text-TurnedBase java

Started by April 17, 2014 11:08 PM
2 comments, last by Glass_Knife 10 years, 9 months ago

Hi guys, im new here in game development so, please bear with my noob questions.. just asking, about game states.. as of now, im working on a small textbased-semi RPG game,..

in the game i have:

MainGameStates:
----------------------------------

Start
Option
Exit

just asking if i can treat this places

Town
TrainingGrounds
Coliiseum

also as game state??

what do you think is much easier to implement game states in a game?? i mean, if switch case or enum class or anything you suggest


Regards,

Depending on the size of the project I would probably separate the Town, Training Ground, etc. into their own classes. There probably wont be very much code concerning Start, Option, and Exit, so you could have them in some kind of main class or launcher class.

Stay gold, Pony Boy.
Advertisement

well i did. i have a concrete class called World and Town, Training ground etc, is there. but, as method call. not a class.. is it okay to do that if my project is just small like this??

http://en.wikipedia.org/wiki/You_aren't_gonna_need_it

Because, when you're learning how to program, there is all this new knowledge in your brain, you want to cram all the language features into your program, you may be tempted to try and make every class perfect. Don't worry about it.

I have never, every written something that I looked at 6 months or a year later and thought, "Wow, is that the most impressive, elegant, spectacular code snippet I have every seen. I am truly a programming God!"

I usually think (before I even realize I wrote it) "Who wrote this crap?" "Oh, I did."

It will take a while to understand what I am about to say, but I promise you it is true.

"By only adding the code you need right now, you make it easier to fix problems later."

I think, therefore I am. I think? - "George Carlin"
My Website: Indie Game Programming

My Twitter: https://twitter.com/indieprogram

My Book: http://amzn.com/1305076532

This topic is closed to new replies.

Advertisement