Jump to content

  • Log In with Google      Sign In   
  • Create Account


Text-TurnedBase java


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
3 replies to this topic

#1 logitech1   Members   -  Reputation: 121

Like
0Likes
Like

Posted 17 April 2014 - 05:08 PM

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,



Sponsor:

#2 minibutmany   Members   -  Reputation: 1591

Like
0Likes
Like

Posted 17 April 2014 - 07:10 PM

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.

#3 logitech1   Members   -  Reputation: 121

Like
0Likes
Like

Posted 17 April 2014 - 09:10 PM

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?? 



#4 Glass_Knife   Moderators   -  Reputation: 4176

Like
0Likes
Like

Posted 18 April 2014 - 01:26 PM

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."  


Edited by Glass_Knife, 18 April 2014 - 01:28 PM.

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




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS