Ben Gonshaw: Digital Media Theorist & Game Design Consultant | ||||||||
|
TRACK THE ACTION
24th Novenber 2004
The perfect 3rd person camera is a notoriously elusive beast. Most people have now settled for a view centric system, which means that the directional controls for the character swing around the analogue stick as the camera moves. The alternative, a character centric system, means that the player needs to be sure which way their character is facing at all times. It is not always intuitive: pressing ‘up’ to see the character move to the right can be disorienting.
From there many disagree. Do we set up fixed camera positions and move our camera smoothly between them? Perhaps we should track the character at all times, but from what height and angle? What do we do if the character is near a wall or in a tight space; move the camera to face them or go ‘into their head’? The main indicator that we have not conquered the problem is that most third person games give the player camera controls, so that they can sort out the shortcomings of the system themselves.
Neural nets are especially useful in environments where the data set or decision is unclear to the programmer. This is certainly true here, as rule based camera control systems have been far from perfect. Here is a neural net based scheme to solve two problems in one: showing the scene correctly and providing alternative schemes for players to choose from. The ideal result for the system is to create a camera that dynamically adapts to the game situation without confusing the player. The final, fully trained system should be able to cope with any part, of any level, of the game it has been trained on. Furthermore, it should be possible to train the camera to work in any other third person game.
The system works as follows:
The levels and controls are developed with a traditional camera. The game is tested and played through using two people, one controlling the character and the other controlling the camera. The entirety of the play session is recorded. Once the first pass is over, the player and cameraman watch the replay and tweak the camera as necessary until the player deems it is right. This data is used to train a neural net that controls the camera in-game, in real time.
The neural net needs several inputs: the position of the player character, opponent characters and projectiles are one aspect. The avatar’s position relative to walls is the other. The outputs of the network are the x, y, z, yaw, pitch and roll of the camera. Line of site to enemies is not necessarily an input, as the neural net may incorporate such instances emergently. Other inputs can be added as necessary and the network retrained. With clever save data structures, old datasets of playthroughs and camera movements can be reused to train the network anew.
3D space management is one thing, but another reason why a good camera system is so difficult to construct is that most gamers have their own personal preference about what cameras they like and dislike. If the same two people work up training material for the neural net, then this will result in a camera system that those two people will find works very well. However, others may not agree. A fresh network can be trained up using other pairs of people, to provide alternative camera schemes for the player to choose from.
Neural networks are a good solution to this fuzzy problem. Although it is not necessary to code difficult camera routines, training the network could take several weeks, and still result in some special case parts of a level where it cannot cope (although retraining can usually solve this). However, the resulting camera will be one that acts intuitively, adjusting itself as the player would have using their camera control buttons. The player is freed to play the game with a camera that reads their mind. Intelligent software is the way ahead as games become increasingly complex.
©2004-5 Ben Gonshaw All Images copyright of their respective holder, including (but not limited to) Sammy/SNK, Capcom, Marvel | About Me CV |