March 2023

More Camera Control

Most of my time this month was spent focusing on camera controls. I have updated and upgraded my system and enhanced how I configure cameras depending on context.

This configuration can take into account a lot of parameters such as rotation limit, delay times before recentering, algorithms used, camera motions and other parameters tied to animations.

I have already mentioned it in a previous Devlog, but camera configuration works like layers do. A first layer determines the base configuration depending on the character played (Talas or Cobble). Then, depending on the position (standing, crouching, laying down, etc) a second layer will edit some of that configuration. If Cobble walks into a remote controlled toy car, another layer will edit the camera configuration to recenter the camera when the vehicle is moving, for example. This works the same way than with situational scripts.

Camera Config Data Asset.png

The artificial intelligence will also use these parameters to determine where it can look, and so will the animation script to interpet the animation depending on said parameters. I have talked about those when describing Camera Control and Aim Offset.

I have also redone every animation made for characters to look around using the AimOffset, for a total of 130 animation files, 9 from Aim Offset.

Talas Aim Offset

Each position will have its own Aim Offset, which the script animation will use when transitionning from one animation’s Aim Offset to the other, blending them together automatically.

Rig / Animations

I’ve made numerous small edits on rigs, and mostly added more controls that made it move slightly on its own, to give animations a more natural aspect.

VR Hands

While going through bug fixing, I refactored completely the way VR hands were implemented.

At first, hands were a component directly linked to the character’s actor. Now, hands are modular actors that can be added to a character or other actors depending of use. I have also splitted the code into multiple components used by the VR hands’ actor: finger tracking, teleportation, grabbing…

This offers me a whole lot more freedom when coding around VR hands.

New VR Hand Actor

On top of the VR hands’ actor, I am using another actor for cosmetics, used to display and animate hands. Useful to change the hands’ model depending on the character, their skins, and mods later.

I have added a small calibration system within the game so that hands are correctly located no matter the controllers or character used. I started by creating a reference model by using Unreal Engine’s sample VR hands. Then I used that reference model to calibrate hand position on a character’s hand, then in relation to the Open XR controler.

Calibration Character HandCalibration VR Open XR Device

Thanks to Open XR, I do not need to add another calibration layer depending on each controller type like before.

A little bit of maths and the hand is correctly positioned. This part isn’t finished yet, so I will talk more about it next month.

Game Master

Always trying to make the game modular, I moved the Game Master controller’s code in a separate module. I also added a small system to add scripted effects depending on tools used.

GVP Tools

The 3D cursor, Talas’ previewed movement, and now the preview of areas Talas can lean against are now managed by this sytem.

Talas Game Master Stand Again Wall Tool

In the meantime, I’ve fixed multiple bugs tied to the Game Master. I have also updated parameter replication and added new functions to avoid Server / Client communication saturation. I have also fixed item outlines that stopped working since 0.4.2

UI

I have spent some time on UI in general. Several bugs were fixed and I made the Game Master’s menu management more autonomous. Depending on selected items, UI will display their linked parameters and actions. If items are linked to the selection, then those items’ parameters and actions will be displayed in dependencies.

Example with Talas and his shoes

I have created a new menu to display the list of users in a separate tab. It could be fun to add some statistics, such as how many times one got crushed, swallowed, or died.

New Users Board Screen

I have updated tooltip and control designs.

Tooltip Overlay

I have used the same icons than those in action buttons.

Control Overlay

I also did some work on the chat menu by adding details to see the origin of a message. It is also now possible to copy and paste messages.

And finally, I’ve updated the design of every single widget used for game parameters.

Graphic Settings

Game network

This is more something internal to the game and I am not really sure how to explain it. However, I did work over how I manage the different files and interactions in multiplayer, between server and client.

Here is a small example if a client wants to send a message through chat :

  • During the message’s sending, the interface communicates it to the Player Stat’s client. If the message is checked, is of a valid length, and isn’t spammed too quickly, it will send a validation code with all the necessary values.
  • This message is then sent to the Player Stat on the server’s side, then checked again.
  • If it is accepted, it will be accounted for then sent to every other client.
  • The original client’s Player Stat will notify players and write the message in their Game Instance with the other messages.

Message Send Using Player State

It is a bit more complex than that in practice. There are several interactions similar to this. Working some on this allowed me to clean up the code, to refactor some parts of it, and fix some potential bugs.

Sub level

On sub-levels, I am now using the new instanced level feature. It is much better than the classic method that used level streaming.