Zero to Hero - Development - New interaction system
I had to completely remake the way how main character interacts with environment. Old system was pretty straightforward - you aim the interactive object with your crosshair and press "Use" button. It was very simple and thus robust, but:
- items of natural real life scale appeared too small and thus difficult to target. It's because in third person perspective camera watches them from behind the player's shoulder and that's whole three meters. Making them larger helps in aiming but ruins the realism of scene.
- crosshair is at the center of the screen but camera itself is offset to one side for "over-the-shoulder" sight and that sometimes lead to situations where you have to shift your character sideways just to be able to target the "hotspot" of object. So there were times when you open door but need first step left or right before you'll be able to walk in. That was weird.
New system is much more sophisticated. It resembles what is seen in Resident Evil 2 Remake, but better in some aspects (of course :) ). First, all interactive items are marked so you don't need to look at each damn object in scene just to determine if you can use it or not. Marks appear at certain distance (configurable globally and individually for each item class, so for example, larger objects like doors may become marked earlier than smaller switches and keys) so you still need to explore surroundings to uncover all usable things. Marks are overlaid on top of scene so they are clearly visible but at the same time objects that are farther away have them more transparent and smaller so they don't clutter the view of scene. Only one object at the time is considered "selected" and it's mark is larger, opaque and of different color than others. This selection is performed considering relative orientation and distance between your character and all potential interaction possibilities so selection itself is more 'natural' - you just move and orient your character towards the object you intend to use and that's it. If object is selected, just press "Use" button and it fires - no need of accurate aiming anymore.
If some part of scene is cluttered with objects like the tabletop with dinnerware, papers etc then usable items may be additionally outlined to clarify selection (see it in video with desk lamps).
In video you can see how it works with doors and light switches, I didn't yet port all items to this new system. Drawers, shelves and boxes will be next.
Other advancements besides the interaction:
- character-specific posture, each girl will have her unique style of movement
- motion itself is a little more "female" but this still needs work
- footsteps and footprints (not seen here, I'll make special video about it as it will affect gameplay and about stealth in general), dependent of types of surfaces the character is walking on, her speed etc etc
- secondary dynamic motion of Ana's hair
- global illumination ambient lighting (need more work, especially when main lights are turned on and off)
This is my first attempt to capture video from my own game so quality and performance make not be the top :) but with time I'll improve. It also delayed the posts with stories but I just had to have it done right as this mechanics is at the core of everything.