You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PaulAlger05 edited this page Apr 9, 2022
·
27 revisions
The file format we will use for saving the state of the game and all it's components will be a binary file.
Each object will have it's own serialize/deserialize method to read/write data from/to a binary file.
The binary file will be saved with the following format/order:
currentLevel
totalEnemies
screens
entities
currentScreen
currentRow
currentCol
...and so on
Where each variable corresponds to the variables of the object:
Ex.
currentLevel = The world's currentLevel variable (int)
totalEnemies = the currentLevel's totalEnemies variable (int)
screens = the list of screens the level has (Screen[][])
A small snippet from an example binary file would be the following: