• Register
Post feature RSS Valhalla Lost Dev Dairy: The MetroidVania Camera System

A break down of the camera system the game will use.

Posted by on

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

Ryatta
Director - Valhalla Lost

Comments
AXE978
AXE978

Very interesting! Thanks for sharing.

Reply Good karma Bad karma+2 votes
Ryatta Author
Ryatta

Thanks, I hope I can do other little bits like this as the project moves along

Reply Good karma+1 vote
Post a comment
Sign in or join with:

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.

Feature
Related Games
Valhalla Lost
Valhalla Lost Hack 'n' Slash
Related Engines
Unreal Engine 4
Unreal Engine 4 Commercial
Related Groups
Indie Devs
Indie Devs Hobbies & Interests with 1,666 members
Indie Gamers
Indie Gamers Hobbies & Interests with 1,509 members
Unreal Engine Devs, Modders and Players
Unreal Engine Devs, Modders and Players Fans & Clans with 694 members