Tips for cutscenes

Started by wizard_wizzle (aka ZeldaHistorian), April 23, 2014, 01:24:51 AM

Previous topic - Next topic
I'm wondering if anyone has ideas on how to implement cutscenes in Solarus?

Unless I'm missing something in the documentation, it appears that the only option for moving the camera is with map:move_camera which always returns to the hero after the delay is completed - otherwise the engine always centers the camera on the hero.

Is there some trick to center the camera on a different entity, such as an NPC, so RPG-like cutscenes could be created? I even tried making the hero invisible, moving him to the area where the action was taking place and then moving him back and making him visible again after the scene was over, but I couldn't get it to work correctly.

I entered an issue for this: https://github.com/christopho/solarus/issues/484
This will be done in 1.3.
In the meantime, you should be able to workaround the problem by moving an invisible hero (this is a dirty hack).
It is also possible to do chain successive camera movements without returning to the hero before the last move. I don't know if it can help :)

Another idea: I haven't tested this, but maybe you could move the camera, and from the camera callback, teleport the hero at the camera position. This way, the camera will not return at its initial position.

Haha, thanks. I'm glad I'm not the only one who came up with that quick and dirty solution :-)