- Online Community Forums » Programming Questions » cutscenes

This thread is locked; no one can reply to it. rss feed Print
Member #16,926
December 2018

Hello, I would like to know how to introduce videos to my curscenes within the Allegro. This is possible?
Say, choose specific locations of the game where the character arrives and start the cut ???

Member #2,229
April 2002

Certainly. If you can play a video in Allegro, than you can show it anytime you wish.

How and when is up to you. Maybe when you create a level, you can add certain flags to it. If it was say, a tile map, certain tiles could make marked to show a video if the players moves over them. For example, lets say you have a 2D map with a bridge the player must cross, but if they cross a troll appears from under the bridge in a video you prepared. The map itself consists of 2D tiles, so you could mark one of those tiles as a trigger for the video clip. In your game you would have a tile struct which would have a flag which could indicate if that tile is a trigger, then another one which indicates the trigger type, like a video. Then another variable which contains which video to play, maybe a filename etc.

“The world is a dangerous place to live, not because of the people who are evil, but because of the people who don't do anything about it.” ― Albert Einstein

Edgar Reynaldo
Major Reynaldo
May 2007

Adding all that information to your Tile struct is really unnecessary, unless it applies to EVERY tile.

All you need is a state machine, which can be as simple as a switch statement.

switch (state) {
   case NORMAL:
   case CUTSCENE1:
      if (Finished(CUTSCENE1)) {state = NORMAL;}
   case FINISH:

Go to: