Post tutorial RSS Tutorial 7 - Camera Settings & Music

Covers the basics of changing the camera and music in levels.

Posted by on - Basic Mapping/Technical

For the 2021 release of Hard Corps, the camera & music systems have been upgraded and streamlined. It is easier to use and more flexible than before. Various bugs in the original version of them have been solved to make them very reliable.


Map authors may change various aspects of the camera including it's distance from the player, if it can scroll horizontally, if it can scroll vertically and offset the height of the camera. This allows the map author it lock the camera in a fixed position of their choosing. It is useful incase you are creating a vertically scrolling level, but don't want the camera to move left or right, a boss fight room, or not to the follow the player while they move during jumping. Maybe your level contains bottomless pits which kill the player. In that case you might want to lock camera vertically so it doesn't follow them down into it.

There are 3 ways to change the camera's settings...


The first is through info_player_start. New keys have been added to the entity to do so. The second is through the new "target_camera" entity. This entity can be triggered to change the camera through adjusting it's key values. Finally the camera can also be changed when the player teleports in.

Note that checkpoints only store the camera settings set before the player reached it. You can have checkpoints target the target_camera if your having issues with getting the settings to stick due to your map's design.



Adding and stopping music in your maps is extremely easy. There are 2 new entities to do so. The first is simply named "music_speaker." This entity can be targeted same as anything else to trigger music to play. After creating the entity and targeting it, you will need to add the s_shader key & set it's value to the sound file you wish to use. This is the exact same way you choose to add sounds to a speaker entity.

The second entity is "music_stop." This is exactly what it does. Target this entity to stop the current music from playing. The current music_speaker will automatically fade out.


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.