Author Topic: Tips for cutscenes  (Read 2112 times)

wrightmat

  • Sr. Member
  • ****
  • Posts: 259
    • View Profile
Tips for cutscenes
« on: April 23, 2014, 01:24:51 am »
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.

Christopho

  • Administrator
  • Hero Member
  • *****
  • Posts: 1172
    • View Profile
Re: Tips for cutscenes
« Reply #1 on: April 23, 2014, 08:42:28 am »
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 :)

Christopho

  • Administrator
  • Hero Member
  • *****
  • Posts: 1172
    • View Profile
Re: Tips for cutscenes
« Reply #2 on: April 23, 2014, 10:07:40 am »
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.

wrightmat

  • Sr. Member
  • ****
  • Posts: 259
    • View Profile
Re: Tips for cutscenes
« Reply #3 on: April 23, 2014, 11:51:39 pm »
Haha, thanks. I'm glad I'm not the only one who came up with that quick and dirty solution :-)