Hello everone on the forum
I am trying out a new idea for a game that requires me to build several tables, each to hold images from different image sheets by theme and data for each image.
At the beginning of each new level, i want, in some cases, to randomly use data from the tables and put it into a new array to hold the data relevant to the current level.
to make things more clear, here is an example.
1- lets say i have an image sheet containing 10 images of different characters.
2- i want to create a table to hold each of the character images in a saparate key. (i.e - characters[i])
3- the table will additionaly hold characteristic of each character like “name” or “age” . (i.e -characters[i].name = “john”, characters[i].age = 34)
4- each level i want to generate a new table to hold 4 characters generated randomly from the main “characters” table, to use in the current level.
(5- the same thing i would like to do for thinks like - weapons, enemies, and what not.)
now the newly generated tables i know i should be calling from within each level. my question is from where should i create the main tables to hold the main data that i can use for each level to read from?
if i do it from the main module, wont it end up using tons of memory usage at the start of the game?
just for reference, i use the modules: main, menu, level1, level2, level3 and so on.
thank you all in advance fro any idea or help you might be able to provide.