0 votes

Hello All,
I'm new to Godot but I have one specific question about dynamically loading sprites into a scene.

My game could potentially have 5 - 100 different sprites with customization options.

Where can I look up how to load a sprite dynamically into a scene such that that sprite characteristics are loaded along with it's attributes?

There will always only be 2 - 6 characters on the screen at once, but those 2 - 6 characters would be randomly chosen.

Characteristics and attributes will be stored in a DB somewhere.

Thank you!

Godot version v3.5.1
in Engine by (12 points)

1 Answer

0 votes

It depends on what kind of format the database is. Like, is it json? Godot has support for reading JSON files.

by (8,528 points)

Yes, I can have the data in JSON.
Basically I will be retreiving character traits from the DB. Then I will need to load or generate the rite sprite with those attributes. The animation for running would also depend on the attributes.

Do I make templated sprites and then load the correct one and apply masks to that sprite?

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 Frequently asked questions and 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 [email protected] with your username.