We have briefly discussed camera during exploration in Update #12, now it’s time to discuss camera during combat.
Because exploration is done in real-time and combat is turn-based and because during combat the player is facing different challenges that during exploration, the camera control also needs to be a bit different.
In practice there are more things happening and it is even more important to clearly convey the information to the player.
Previously the camera would just automatically focus on the character who’s current turn it is. However this proved insufficient. Among others there were problems with AI controlled characters moving faster than the camera, resulting in empty, irrelevant space being shown, also monsters entering and leaving Fog Of War proved a bit of a challenge.
After a round of polish the camera behaves much better. The focusing logic has been improved, as well as it now follows the current character during their turn. All of this behaviour can be overridden immediately by the player if they choose to move the camera somewhere else. This combination of automatic behaviour with an easy way for the player to take over seems to work well so far.
Elemental Enigma is 2D isometric RPG with turn-based combat. After months of improvements to quests, rendering and other important systems it is finally time to have a look at combat.
Combat in Elemental Enigma is inspired by modern Shadowrun and XCOM games as well Disgea and Final Fantasy Tactics. Player controls a party of 1 to 4 characters and by using various skills and positioning tries to eliminate attacking monsters.
Skills that the player controlled characters have depend on their build, and unlike most games their build is directly tied to their personality.
Positioning is relevant, not only in regards to distance to enemies, but also certain objects offer cover while some locations might offer passive buffs. Also direction in which character is facing is important, as flanking enemies can provide significant bonuses to attack.
Combat is divided into rounds which are divided into turns. Each character gets one turn in a round, when they can perform a limited amount of actions. Order of characters in a round is randomised based on their Initiative stat. The higher a character’s Initiative, the earlier in the round they will be able to act.
Combat encounters are self contained. That means that health and magick points are restored at the end of combat, KO’ed characters are revived and most status effects are removed.
Over the course of development more details will be shared. Among others on how equipment impacts combat, what kind of skills might be available and more.
When making a PC game one of the trickier tasks is to determine the minimum and recommended system requirements for it. Not only the absurd amount of possible combinations of GPUs, CPUs, memory amount and OSs make this complicated, but also the developer needs to ask themselves: “What is the game supposed to look by default?”.
Even for indie games this is a relevant consideration. Too many games made by smaller teams, are developed on extremely powerful PCs without the time or budget to test and optimise for weaker platforms. This resulting in end users often finding themselves having quite an unpleasant experience.
On the other hand limiting oneself in regards to platform requires spending precious time on optimisations, or worse dropping more interesting features like more complicated AI, cool graphical effects or density of objects on screen.
For Elemental Enigma the goal, from the very beginning, was to run at a stable, locked 60 FPS even on integrated GPUs while never using no more than 3Gb of RAM+VRAM.
For a long time this was easily reached. However once more assets were being added, that target started to move away. After more recent set of optimisations mentioned in Update #9 the framerate of 60 FPS has been regained. Video Memory, however, still remained a problem.
Not anymore. After various experiments with texture compression and memory allocation optimisations, currently the game runs within 820 Mb in RAM and 530 Mb in VRAM. This will of course increase as more content is added, but currently is well within the target of combined 3 Gb. More work and optimisations are needed, and indeed planned, but at this point any changes should not be dramatic.
One of the biggest benefits of making a 2d game is that in regards to technical aspects there is one parameter that has to be monitored and kept in budget – video memory, as opposed to 3d games where polygon count, level of detail, draw distance, animation complexity, lighting complexity as well as video memory all have to be balanced.
One of the biggest problems with making a 2d game is that its video memory consumption can easily explode. All animations, objects, characters – everything that is visible on screen ultimately ends up in a texture atlas, with few ways to optimise them.
However regardless of difficulties, optimise we must.
One of the ways to do such optimisations is to look at animations of all characters and monsters and make sure they take as few frames as possible. However this has to be balanced with making sure they still look smooth.
After latest set of such optimisations a typical character animation atlas was reduced from over 7000 frames of animation to about 5000. During that process all animations were improved to look less jerky and have a unified look.
There will be more work needed, but at this point only smaller improvements and polish will be necessary.
All games utilise some sort of a camera to show the game to the player. Even though it is one of the most common aspect of games, it can still be a tricky problem to solve. Of course for some games it can be trickier than others. 3rd person 3D action games are probably the most notorious in this department, as the camera can get easily stuck in all types of geometry. 2D isometric games have less complicated problems to solve, but it doesn’t mean they are trivial.
Ultimately one has to remember that camera control (just like walking) is not a game mechanic. It’s something that just has to be there, for the player to be able to play. It has to be unobtrusive, easy to use and ideally not require player input at all. The challenge here lies in making it smart enough, so that the player doesn’t have to constantly be distracted by where the camera should be pointing, but without taking agency away from the player.
After recent round of polish, the camera in Elemental Enigma during exploration tries to anticipate where it should look, based on player input, but without taking away all control. Also additional ways to focus on party members have been added, so it’s easy to see the relevant character if they happen to be off-screen.