World 4 is complete. This week I’ve been finishing off the UI enhancements and have finally fixed some bugs with the video player.
For the last few weeks I’ve been struggling with the Video Player extension in GMS2 that I am using on the Windows build to display the logo intro animation and the tutorial videos. Later on I will also need it to play the game story intro and outro so it was important to get everything fixed an working correctly. The problems I’ve been having is that the intro video would only display when the game was run at the native 1920×1080 resolution. Any of the other selectable resolutions seemed to result in a black screen. I discovered that the screen resolution change that occurs when the game starts (as it adjusts to the setting the player has selected) wasn’t finishing completely before the intro video was starting which meant that the video was detecting the start-up resolution rather than the actual resolution the game was going to play in. I added in a wait sequence and that fixed the intro issues.
The tutorial videos on the other hand were experiencing a more complex issue. The first tutorial video would play once and then not loop properly. The second tutorial video would play half way then stop. I tried all sorts of code changes including attempting to draw the video frame on the Draw Event instead of the Draw GUI event. Nothing I tried worked until I had a look at the actual video files themselves. I noticed that the intro was encoded differently to the tutorials. I’m not sure why I encoded them differently. I re-encoded them to MP4 h.264 and replaced them in game. Instantly the videos played fully and looped correctly. Phew!
After all that I added the first World 5 map and recorded the first world 5 tutorial. World 5 will be the last 25 levels of the game.
Lastly for this week I went through the World 4 levels and added in all the titles and level descriptions. This is actually one of the harder aspects of game development. Trying to come up with titles and meaningful descriptions is rather challenging.