Godot Version
4.3
Question
So I’m starting a small project and as a newbie, I’m not sure which way to approach the challenge. I’m looking for a little advice before coding myself into a dead end only to start all over again.
- Imagine a 2D game that has a static map.
- On this map are 5 static locations where chests are going to be placed.
- Each chest may or may not require a key. Each chest could have contents or be empty.
- As the game designer, I have a number of pre-planned chest layouts. It contains a list of five chests; their contents, the key required and where they are to be placed. These preplanned layouts are required because random generated layouts could make the map unsolvable.
- So at the start of the game, the game will pick a random number which denotes which chest layout to use (prob start with 3 and then expand later).
- Now reading all the data in the selected chest layout, each chest (node?) is instantiated and populated with the chest X,Y position, what key is required and what is inside the chest
=======
My question is in regards to these preplanned chest layouts. What approach would be best. I already believe that I will have a scene which is a single chest and I will instantiate each chest from it.
But how should I store the preplanned layouts. Should I create a dictionary with each entry having all the data for the five chests as sub-dictionaries? Should I create a resource?
Yup, I’m not sure which way to turn. Thanks in advance for any help given.