0
\$\begingroup\$

I'm building an RPG style game, but i have some trouble with storing data from entities. These entities can carry data including but not limited to their location, their graphics, whether they are solid, and so on.

I have thought about just storing it as a list of numbers, but this means that a single change (adding a variable for example) will break the entire saving system.

Is there an easier and more versatile way to store this information?

EDIT: Ok i did a bit of searching and i found a bunch of questions basically the same as this one. Feel free to ignore this question ;)

\$\endgroup\$

1 Answer 1

1
\$\begingroup\$

Assign each entity an ID, then store each component (location, solid, etc) in a separate table indexed by the entity ID.

Or just use JSON.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .