• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Windows Sports Game: How to store teams and their players

D

deuschristiamor

Guest
What would be the easiest way to for example have 8 teams in a sports game that each have their own players. The teams will have backup players as well so in a match players must be able to swap in and out of the game.

I am thinking that each player will have to be an object that is stored under a team folder. Would they have to be stored in a list or array?

Any insight might help clear this in my mind.
 
Here is my simple save and load system. You may use it depending your needs. I basicly put the execution codes of those scripts onto the Game Start/Room Start Events and the Closing button/state.
 

Attachments

D

deuschristiamor

Guest
I don't see how that would apply to having teams and players. Perhaps I am just not getting it
 
D

deuschristiamor

Guest
Okay so Team1[1] would be the first position in the Team1 array?

How would values in an array translate to a player object? In other words how would you take information in an array of players and make them player objects in room?
 
I haven't used arrays yet but I think so. Here is how you can use it in my opinion. There would be an easy way to sort this out but this is way more simplified I think.
 

Attachments

D

deuschristiamor

Guest
Okay so I guess I will have to have a way to change around the order of the player objects in the array if I want to swap one player for another on the same team.
 
Top