Here we go, dev-blog of March ! What’s new since February ?
Game introduction : the ghost
I’m starting to have a lot of gameplay features and a time will come when I will have to make an introduction inside the game. I have a little plan in my head and a part of it is already done. I will not say yet what is inside, I prefer to keep the surprise. However, what I can say is that a second character will be showed (the first one is Lena of course). I’m still working on the concept art of this character, designing it, but I already know which way I want it to appear in the game introduction. I want to show it as a ghost !
Ghost are often showed as a simple translucent mesh in games and I found this method quite lazy. So I tried something different, mostly inspired by the “ghost” effect used in the game DmC. As I understand it of course, because I can’t be exactly sure of how they did it. In DmC the characters from the parallel universe are showed in gray and looks like they have a different lighting than you. They add some particles on the top to blend everything.
My first guess was that they use the specific lighting they create on the character as an opacity mask. This mean the lighting should itself determine what is visible or not. However, some dark parts are still visible on the screenshots above so I guess they use this but not alone and they combine it with the luminosity of the clothe/skin of the character. You can see that Dante is invisible with his pant, but not his skin. On the top they also use a tilling texture that move on the UV to add some variety and make a sort of magic effect.
I personally chosen to use the lighting as the opacity filter and a cloud texture to add some variation. So the cloud move and make the shadow on the character to move a bit. This break the linearity of the lighting. Then I have added a distortion pass. So every part of the character that is hidden distort the background. So even if invisible, you steel feel the character.
I did all my test on Lena since it’s the most advanced character I have yet for the game. If you follow these dev-blog post you have already seen in the previous one the start of this shader. So I improved it to look better !
Camera : Cinematic and Volumes
I continued the work on the camera since the previous month. This time to make camera volumes and a cinematic camera effect. Camera volumes are simple brush volumes based on touch detection to change the position of the player camera. Often in platform game the free camera is disabled to use a fixed point of view, just to help to understand a part of the level design. In Prince of Persia it’s often used to show a vertical layout. This helps a lot to see where you need to go.
I decided to make the transition between the volume and the player camera smoothly : this means that your camera will quickly move to the volume position. When you go out of the volume you get back the control on the camera. The camera is fast enough to not loose what you are doing. Especially because the camera will still look at you.
The setup is very simple on my side : in the editor I simply create a volume and link to it a target actor. this actor will be the position of the camera. This make the position of the camera very easy to change if something does not work well.
Since the control inputs are based on the camera rotation you keep a perfect control of the player. I found some little bugs like the player leaving a climbable ledge when the camera volume look in front of you, but I didn’t have the time to fix it. Since my code is starting to be old for this part I believe I missed a special case. Nothing serious to manage I guess.
The other little system I created is a cinematic camera. What do I mean exactly ? Well, some games use cinematic to tell you a bit of story. Each one with his own way. My idea is inherited from Half-life 2 : in this game you can move freely in an arena while the story is told by the NPCs currently here. You are free to react as you wish but with a limited range of action and distance. I would like to let the player free to look at what he wants. But I also want to focus the main character to care about the scene where he is currently in. That’s why a created a custom trigger that toggle the walk and the cinematic camera : when this mode is enabled, the camera is put on the side of the player as seen in Batman Arkham City and you are forced to walk.
I’m myself divided on this idea. While I hate games that force you to walk, I think it’s also a good idea to force the player to calm down and take the time to look. Especially in a game where you will have to run and walk on walls everywhere.
I’m still working on the beam walking system and started to add the jump from one beam to one another. I managed to make the Root Motion animation to work really well now. My previous problem was that I forgot to disable the stop of the player (when under a low velocity) when doing the root motion. The result was a conflict between the code and the animation. It’s solved now.
No video yet, because I want to finish the system before showing it in action. But here is a screenshot that I already showed on Twitter :