|
cutscenes |
Vieira
Member #16,926
December 2018
|
Hello, I would like to know how to introduce videos to my curscenes within the Allegro. This is possible? |
Neil Roy
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. --- |
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: DrawGame(); break; case CUTSCENE1: DrawGame(); ShowVideo(CUTSCENE1); if (Finished(CUTSCENE1)) {state = NORMAL;} break; case FINISH: break; default: break; };
My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
|