Search code examples
videogame-maker

How do I create a video background?


This is not HTML or CSS! - If you have not already figured it out...


So, I'm trying to play a video within a GameMaker program as a background but I'm only able to find the ability to play them as a splash screen, similar to the ones that you get when opening a game (ie. Halo 1, Half-Life 2, etc.)...

Is there any way to play a video as a background? (Or create a sprite that behaves like a background and plays the video?) Also, the video is in .mp4 (and converted .avi) formats, for example, the menu in the game "Space Engineers".


Solution

  • Playing them as splash screens is the only implemented way to play video files in Game Maker.

    However, if you can convert the video into a large sprite strip, you could then use that as a background in your game. You will want to look for software that can split up a video into individual pictures; you'll want to import those pictures in bulk as an animated sprite. Then, make an object with a high depth value that will go underneath all other sprites.

    In addition, you'll need to use Movie Maker or similar software to take out the audio track to be played with the animated sprite. Make sure this sound is uncompressed (preloaded into memory); otherwise, the video and sound will start at notably different times.