Zshandi / SuperSpherebox65

This is a preliminary repository for my groups GGJ 2024 entry.
0 stars 0 forks source link

Make the GameData class use Resource instead of Node #9

Closed Zshandi closed 6 months ago

Zshandi commented 6 months ago

For a lower footprint, make GameData extend Resource instead of Node. The Main class now iterates through each game folder to look for a "game_data.tres" file to get the game data from. Then, if custom data functionality is needed, each game may have their own gdscript class which extends GameData.

The current game data were also moved to the new resource formats.

Closes #4 [Architecture] Make the GameData class use Resource instead of Node

Zshandi commented 6 months ago

In the final implementation, instead of an array in the Main class, I decided to make the Main simply find the "game_data.tres" files within the game folders. This way, when a new game is added, it is completely independent, not requiring editing any files outside of the game folder. This will allow for easier time with using branching and merging, as 2 people can create 2 different games, and/or work on the main scene independently, without ending up with merge conflicts.