2D companion system

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By cassie

Hey guys! I’m building a game somewhere between a metroidvania and simple platformer, and I’m adding a companion pet. Just a cute little pup that can follow the player and have some basic scriptable movement for cutscenes and such.

So…here’s my question:

What is the best/simplest/preferred method to go about this?

Not looking for code or help, just an idea of how you all would do this. My pup will need to follow, mimic jumps, and will have some adorable idle animations but that part is easy. I’ve considered having my player drop invisible collectibles with input data. I’ve considered making control collision areas near platforms to just sorta auto-land him on the next one (not as clean as there will be multiple paths). I’ve also considered input reading and a delay based on distance. Godot has some cool features hidden away if you’re not googling the right things, so just help a girl out if anyone has a suggestion.

Thanks again

I would go for invisible physical object detectig surrounding ground, attached to a player. It would calculate the offset and a side for your pup to keep. It would determine, whether offset would have to be shorter because of lack of walkable terrain and such. Pup himself could be just a visual instance, no pshysics, sprite and some code. It would be programmed to store players actions and path created by invisisible detector, and copy them after some time offset.

Inces | 2023-02-12 07:07