• 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!

DS Grids or file handling for item, quest and dialogue data bases [MOVED]

G

Ggbah

Guest
I've been trying to think about this for some time now, and I would like your input and perspectives.

I was considering at the start of the game creating a ds grid which acts as a spreadsheet for items in game.
This DS grid would be what all of the chest or other item generating objects would call for item details. It would pull this data from the item database grid and populate into the players individual dsgrid inventory system.

I want to know if it would be better to have the item database be a file on the drive rather than taking up ram at the start of the game and always being open. I am also concerned about people having easy access to an entire item database, as I would prefer to keep things appropriately hidden from the majority. (so people dont have a very easy way of changing item data in the item database).

I would bring up dialogue and quest systems but I have a feeling they are all very similar in how I will store them, and wanted some sage advice.

Thank you,
 

Joh

Member
How would you do it, without keeping everything in game/memory? clearly Item referencing happens very often.

I know you can use ds_grid_write/read to get string version of the data structures. Its not human readable So this should be "basic" defense enough. I assume whatever encryption used is out there though.

I personally use a system where all base items are initialised in an array. I then use a grid that contains all actual items ("instances") some items are modified from base form. In a way, I guess i make use of the decorator design pattern. the grid references the array "base item" and also contains extra information on how it was altered.
the grid would be what I save on file. but since it only contains references to the in-game array, stat editing/ item creating wouldnt work. Although modifying existing ones could, but again since its a grid, writing it has a weird format.
base_item_array -> existing_items_grid{base_item id, extra stuff} //-> inventory/equip/whatever {existing_item id}

Not sure if its an efficient way to do things, but its working.
 
Top