braingdx icon indicating copy to clipboard operation
braingdx copied to clipboard

Cutscene Manager 🎥

Open bitbrain opened this issue 5 years ago • 0 comments

Motivation

Cut scenes give your game that special extra. Especially during game jams this can be a big surprise if your game suddenly has some story to reveal.

This feature is highly inspired by the map editor of Wargroove.

Goals

  • register events which then get executed on a timeline
  • the timeline itself can be paused, reset or played again or moved to a particular time

Design

todo

Example cutscene file

[
  {
    "action": "show-text",
    "config": {
      "duration": "3.0",
      "fadeDuration": "0.5",
      "align": "center",
      "fontPath": "fonts/test.ttf",
      "fontSize": "40",
      "text": "my.translated.text",
    }
  },
  {
    "action": "add-object",
    "config": {
      "type": "soldier",
      "alias": "player",
      "position": "200,300",
      "visible": "false"
    }
  },
  {
    "action": "add-object",
    "config": {
      "type": "soldier",
      "alias": "player",
      "position": "200,300",
      "visible": "false"
    }
  },
  {
    "action": "tween-object",
    "config": {
      "target": "player",
      "attribute": "alpha",
      "duration": "1.5",
      "to": "1.0"
    }
  },
  {
    "action": "tween-object",
    "config": {
      "target": "player",
      "attribute": "position.x",
      "duration": "1.0",
      "to": "300"
    }
  },
  {
    "action": "screenshake",
    "async": "true",
    "config": {
      "strength": "4",
      "duration": "2.0"
    }
  },
  {
    "action": "screenshake",
    "async": "true",
    "config": {
      "strength": "4",
      "duration": "2.0"
    }
  },
  {
    "action": "show-text",
    "config": {
      "duration": "2.0",
      "fadeDuration": "0.5",
      "target": "player",
      "align": "top",
      "fontPath": "fonts/test.ttf",
      "fontSize": "30",
      "text": "my.translated.text"
    }
  }
]

bitbrain avatar May 25 '19 18:05 bitbrain