0 votes


So i need a bit of advice here. Thus far i have only used the second option, e.g. having my Player being a part/node of a level from the very beginning (added through editor).
But now i´m wondering if it would be better to instance the player via the _ready callback each level. What are the pros and cons of them both?

How do you handle that, what is your approach?

PS: Talking about 2D Platformers and Top-Down Action RPGs, e.g. games with levels and a visual/controllable player character.

Godot version 3.2.3
in Engine by (78 points)
recategorized by

1 Answer

+1 vote

I do neither. I don't have the player instanced on level in the editor and i also don't instance it in level's _ready().
Instead i instance the player from parent's scene of the level once level is ready.
When i change levels i take player's avatar from current level and insert it into the next level once it's ready.

This way there's no coupling between level and the player. It gives me great flexibility since levels do not dictate what the player node is. It may not be needed for platformers but i recommend it for games with complex player units like ARPGs you've mentioned.

I'm assuming "player" means player's avatar.

by (2,302 points)
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.