Last week, I was contacted by Phil who has commented on this site a few times. He’s a good friend who I’ve had the pleasure of knowing since about 2013-2014. His first impression of me was of a short guy cosplaying Edward Elric and being chased around by a Slenderman. What a day that was… Nevertheless, he reached out and asked what would be needed to make an FMV game. I told him I’d do one better than that – I’d make a simple demo to explain the principles behind it.
What Is An FMV Game?
Full Motion Video Adventure Games have been around for a lot longer than people may think. In 1992, the genre had its biggest exposure to date with the game Night Trap. It’s a fascinating bit of gaming history, one that saw mainstream media become even more interested in how to effectively deal with violence in video games. That’s a debate for another day… However, not long after this, the FMV genre sort of fizzled out for a while. Thankfully, the genre had a huge resurgence with games such as the critically acclaimed Her Story.
FMV Games, also known as Interactive Movie Games, are all about having a film-like quality with interactable elements over the top. They use recordings, or perhaps cartoon animations not determined by in-game mechanics. I believe anime franchises could utilise this genre very well.
Now that the backstory of FMV games is out of the way with…
A Basic FMV Game Template
So discussing this briefly with Phil, there were a few key points that I thought were of importance to an FMV game. Typically the video would need to be full screen or at least take up a specific amount of room on the screen. In theory, when you’re watching a scene, you’d want it to be full screen and then you’d want items to overlay themselves once that scene has reached a close. As such, I figured you could just shove a video to the main camera and be done with it.
Depending on the type of game you’re making, you would possibly want an inventory system. I didn’t make one of these for the short tech demo I made. Instead, I thought I’d opt for a simpler solution, which is simply a counter of how many objects were found. I put in a couple of different types of items, some which were “collectables” and some which were not.
Scenes will need to be able to move back and forth and you’d likely keep each scene in its own individual scene. You could, if you wanted, keep it all to one scene and dynamically move everything about, but I feel that this would be quite code intensive. So instead, I opted to have all scenes for the game loaded in the build (by going to “File” > “Build Settings …”). I then unloaded every scene that wasn’t needed from the get go and code handled the loading and unloading of other scenes.
For the most part, that’s kind of all you need for an FMV game, they’re not the most technical of genres. Don’t get me wrong, there are still plenty of challenges which can trip you up. However don’t take the genre as not-very-technical as an insult, as trust me, these can be amongst some of the most creative games out there. It’s all about the creators imagination.
Right, shall we move onto the technical stuff?
Alright, let’s break this down… First of all, here’s the GitHub Repo so you can download what’s been made.
Please note, there are more technical details in each of the files comments.
The UI disables itself when it realises a video is playing. It then enables itself when that video has stopped. This is achieved by setting up a parent UI GameObject (typically a Canvas in Unity). On there, I created and added a script component called WhileVidPlaying.
The file to see this is in Assets/Scripts/WhileVidPlaying.cs
I was a bit lazy here with just a Back and Forward button. Creative people will make it so these are invisible buttons which are clickable when the video’s stopped You also don’t have to be limited to a back/forward button, but rather you could have it so different buttons lead to different scenes. You could always add an extra variable to a movement script, which tells us which scene to load when the player clicks that button.
This simple movement can be found in Assets/Scripts/NavigationButtons.cs.
In my example, I created a Scriptable Object (Assets/Scripts/ClickableObjects.cs) which handles the data for different items.
I made two items, a Lollipop and a Rock. These objects contains the name of the object and they also contain a description which is displayed when that item is interacted with. There’s also data about the sprite that goes with that object and finally a Boolean (true/false) field. This is presented as a tickbox, allowing you to tick whether or not the item is removable. If you were doing an inventory-based game, that tickbox could be used for items that get put to your inventory vs ones that aren’t.
The Main Camera was a perfect place to run the video. All I did was take the default Main Camera and shove a Video Player Component onto it. Every scene by default has a Main Camera, so you can set up a different video for each scene.
Things I could have done better
Bearing in mind, to make this whole project took me about just 2.5-3 hours total, including sourcing and making some of the “assets”, I am fairly happy with what was achieved in the short time. There are a few things I’d look to do next:
- Make a centralised script for checking if the video was running, as opposed to redoing that script in different scripts. This would be a case for refactoring.
- Include a full inventory system. I could have done this, it wouldn’t have been too nightmareish… But in honesty, I didn’t feel that I needed to go deeply into inventories as a whole.
- Conceptually, all you would need is a separate UI GameObject (Make it UI > Canvas), let’s call it “Inventory”.
- Inside of “Inventory”, create a Panel and size it the size you’d want the inventory to be. You can add your own image to it and more.
- You will need to find a way to lay the inventory out and this is why this fell outside the scope of this short project. However to call your inventory…
- Create a Script which reads for when a player either clicks a button for the inventory, or presses the i button.
- The basis for how to make this as a clickable button is already in the files, by going to Assets/Scripts/OnObjectClick.cs and looking at the public void OnMouseOver() script.
- Fancy transition effects. I mean that just woulda been nice.
- Perhaps more scenes?
Please note, I made this base for educational purposes only. You may use any scripts if you deem them useful as you like. I do not own the copyright to Dwayne ‘the rock’ Johnson’s face. The video included in the files is available on Pexels here as a free to use file.
The FMV genre is interesting and feels like a great introduction to video game concepts. I’d argue that to really get into Unity game development, if you already have the assets, then making an interesting FMV is a good use of your time. However the time and cost for this genre would be fairly high, unless you record your own videos anyway. Nevertheless, if you are planning on filming your home, putting objects around it and making people click on the objects to solve puzzles or to chat to your friends/family in your home, then why not? It’s a fun genre that is easy to get started on.
That’s all for this week. Phew. This was a beast of an article, so I hope you enjoyed reading it. Hopefully the concepts included were interesting, perhaps you have a better method of dealing with these concepts? Share your thoughts below and in the meantime, I’m off to go and figure out how to share Matchagana properly with everyone.
So it’s a goodbye from me and a goodbye to you.
Much love to you all.
In case you missed the link to the files in the post…
You can download the files directly from GitHub, or have Git installed on your PC, open Command Prompt and enter:
git clone https://github.com/GOTimlah/FMV-Example.git.