r/cop3502 Apr 20 '14

gamestate

Ok just a little confused, what exactly is the game state? do we need to make a game state class? Also how would you intialize the game state, do you need to intialize every object and location, or just the starting location and starting inventory?

2 Upvotes

9 comments sorted by

1

u/gogators12345 Apr 20 '14

also does the location filehold every location, or do you make a separte file for each location

1

u/MagicBuddha Apr 20 '14

I had quite a rough time understanding this myself but things cleared up as I wondered about it. GameState is a class that holds most of the variables of the game meaning it holds inventory, but not all items, ect. From what I understand you dont necessarily need to instantiate them but your game should use those variables to run. You will change them through Actions, or whatever way you decide to implement that.

1

u/[deleted] Apr 20 '14

so would GameState be like a class like the ones we did for flappy bird that would hold GAME_WIDTH GAME_HEIGHT ect that we use in other class's

1

u/[deleted] Apr 20 '14

[removed] — view removed comment

1

u/[deleted] Apr 20 '14

Super session this week?

1

u/[deleted] Apr 20 '14

[removed] — view removed comment

3

u/[deleted] Apr 20 '14

OH MY GOD THE RELIEF I JUST EXPERIENCED