Making visual novel using Defold

Hello! I’m pretty new in Defold and I’m going to try to create a visual novel with some point-and-click mechanics using Defold engine as the first project. I’m a bit confused about the question how to implement this the most Defold-ish way. The mechanics include: cutscenes, dialogues with choices, clickable areas with simple GUI (go to a room, click a table to explore this, click to something on the table to zoom and to see GUI with more detailed information about objects etc.).

The question is: what is the best way to implement something like “scene manager” for gameplay like this? I can’t find an appropriate example of something like this. My idea was to create a several types of collection factories (for cutscenes, for mini-games, for dialogues etc.) and spawn a new scene as a new collection everytime user does something. But I’m not sure is it okay or not. And I can’t find an example how to easily configurate collection factories (for example for dialogue factory I will need to pass a text as option).

I hope there is simple and obvious solution that I just missed, and hope for your help. Thank you in advance.

1 Like

Collection factories sounds like a good way to go.

You can pass parameters that are set on script properties in the spawned collection. See https://www.defold.com/manuals/collection-factory/#_properties

If you need to pass text continously, a better way is to send messages to a script component or GUI in the spawned collection. Either have the script that spawns the collection track the id of the receiving game object, or have the text thing register to some manager via message (like ”register_current_dialog”) so the system knows where to send text.

4 Likes