0 votes

hi, which one much easy to handle and take less resource to do, put all data in one JSON, make different JSON for each type? example if have 2 data, first data, player equipment with stats, color path, sprite path and gender. The other one just color path, sprite and for mob.
similar to first question , which one much easy to handle and take less resource to do,if i have player, npc and mob should i make different autoload or put all together in one autoload?

in Engine by (390 points)

1 Answer

0 votes

Structure them in a way that, you load them, when you will/might need them

example: Do you need to know the equipment of "Alex npc", when you load the stats of "Steve npc"?

Although tbh, Unless your game is going to save tens/hundreds of thousands of attributes, you might be able to get away, with saving/loading most in-game data inside a big dictionary/json or separate them in a way that's easier for you to deal with
(Don't forget to use a separate thread, for saving a large dictionary midgame)

Or if you want something more "professional" and scalable, might wanna give GodotSQLite a try, I think it suits the game you're trying to make very well

by (398 points)
edited by
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.