this post was submitted on 03 Jul 2023
6 points (100.0% liked)

GameDev

2725 readers
2 users here now

A community about game development.

Rules:

More rules might follow if they become necessary; general rule is don't be a pain in the butt. Have fun! ♥

GameDev Telegram chat.

founded 1 year ago
MODERATORS
 

Narrative scripting languages like Yarn Spinner or Inkle were originally meant for writing dialogue, but I think they can also be used for scripting the world progression even when no dialogue or even narration is involved.

Example for something silent that can be scripted with a narrative scripting language:

  1. When the player pulls a lever...
  2. Move the camera to show a certain gate
  3. Open the gate
  4. Move the camera to show something interesting behind the gate
  5. Return the camera to the player

Even though no text nor voice are involved here, I think a narrative language will still fit better than a traditional scripting language because:

  • Narrative languages describe everything in steps. Scripting languages will need to work a bit harder to generate steps the actual game engine can use.
  • Narrative languages have visual editor that can help showing the flow of the level as nodes.
  • The interface between a narrative language and the game engine tends to be seems to tend to be higher level (and less powerful) than the one with a traditional scripting language.

On the other hand, flow control seems a bit more crude and ugly with narrative scripting languages than with traditional scripting languages. It should probably still be fine for simple things (e.g. - player activates a keyhole. Do they have the key?), but I wonder if a game can reach a point where it becomes too complex for a narrative language (I'm still talking about simple world progression, not full blown modding)

top 3 comments
sorted by: hot top controversial new old
[–] mangomission@lemm.ee 0 points 1 year ago (1 children)

Good idea! I don’t have experience with this but I’d bet you can call a script from the narrative for more complex flows like you mentioned.

[–] AeonFelis@lemmy.world 1 points 1 year ago (1 children)

If I bake the complex flow into the game code itself and invoke it from the narrative, I can hopefully get away with not having scripting at all (other than the narrative). Not sure if it makes sense, but I have a feeling that integrating a scripting engine is much harder than integrating a narrative engine...

Of course, I need to be careful not to fall into the trap of using that complex flow all over the place once it's in the game code...

[–] mangomission@lemm.ee 1 points 1 year ago

Yeah definitely need to be thoughtful about it but very useful I’d bet