Something that I think has been overlooked by many smaller games.. and large ones in some cases has been the camera system. As Valhalla Lost is inspired by the 2D games of old I wanted to create a camera system that while having a few unique traits feels like Metroid.
Nintendo back in the 8-16bit era ruled with its camera systems, perfectly adapted to the game play style. Mario's would pan ahead to give you more time to react to oncoming platforming and even today games like Super Meat Boy have camera systems that track your characters movement and follow at a steady rate. Metroid's camera system worked in a fascinating way.. obviously following your character but giving a 10% margin either side of the center of the screen before camera tracking activated:
This was the basic setup that I wanted to recreate in Unreal for Valhalla Lost. It's not that hard to get something close.. Now I did this in Blueprint, Unreal's visual node based programming language and if your character has a camera attached to them via a boom you can add lag to the boom which results in the camera following the characters movement (as opposed to the character always being centered on the screen.. which just doesn't look good or inventive)
It's making the camera adapt to the players position on the screen; in this case setting up some logic that changes the speed of the boom lag:
Is the distance between the character and the camera greater then a certain amount, if so then follow that character (placing a maximum cap on the lag of the boom)
It's trivial to set up trigger boxes at entrances/exits to you scenery so that the camera stops following completely when your walking off the screen.. in one feature not originally part of the traditional MetroidVania camera system is the camera returning to the center of the screen, or at least the player character which then becomes the center of the screen.
Is the distance between the character and the camera greater then a certain amount, then you follow at the desired lag speed settings, else you make the boom lag speed so low that it doesn't move.(as 0 will turn lag off so 0.00000000001 has to do)
Which is what happens withing the lag cap distance, finally to return the camera to the screen quickly:
Is the player characters velocity greater then -0.5 or less then 0.5 (based on a max run speed of 600),lag speed is changed from 0.000000 to 3 for a smooth snap.
And here is the final result applied to the Unreal side scroller templete scene:
I hope you all found this interesting, I'll do furthering things like this if so. I just found recreating and researching the MetroidVania camera systems rather interesting with little information on making a good setup in Blueprint.
Let me know what you think in the comments and follow the project is this has made you interested
Director - Valhalla Lost