Background bob

Posted: 07 Jan 2021 17:48
by bmcarbaugh

A standard feature in a lot of mobile VN's is tying a slight amount of background movement to the current speaker, to add a little dynamism to back and forth dialogue. You can see an example from an app I worked on here:

https://youtu.be/vjNsB62HEOc?list=PLYF_ ... vLM&t=1688

The way this is handled behind the scenes on that particular app is, one character is designated as the main character and everyone else is an NPC. The main character displays on the left side of the screen, and all NPC's are positioned on the right. If the main character says a line, the screen shifts left. If an NPC says a line, the screen shifts right. All other text doesn't affect the screen position.

Right now it's possible to do this in the Naninovel engine, but you'd have to do it manually for every shift, either with poses or by setting the background's pos parameters.

I'd really like an API command that tells the engine, "Here is background XYZ position 1, which you should bind to characters Bob, Jim, and John. Here is XYZ position 2, which you should bind to characters Sally, Jane, and Ronda. When a character bound to a background position delivers a line, move to that position before displaying the line."

It's just a small game-feel feature, but I think it goes a long way toward making a scene feel less static. Particularly on narrow screens like a phone.


Re: Background bob

Posted: 07 Jan 2021 19:27
by Elringus

Hi, Thanks for the suggestion!

Have you tried using On Author Changed event of Revealable Text Printer Panel component (found on the root game object of all the text printers)? You could listen for that event in a custom printer and move the background accordingly.


Re: Background bob

Posted: 07 Jan 2021 21:26
by bmcarbaugh

Thanks, I'll check that out! I guess the simplest way to get that effect without a lot of coding would be something like, create two custom printers--one that moves the current background left, and one that moves it right--and assign those to the appropriate characters depending on the scene?


Re: Background bob

Posted: 07 Jan 2021 22:22
by Elringus

That's right. The author changed event also returns ID of the current author (character actor), so you can additionally use it to determine how to move the background.


Re: Background bob

Posted: 07 Jan 2021 22:38
by bmcarbaugh

Sounds perfect. Thanks!