General Gamplay


Due to the open-world style nature of Naja Medjai, multiple gameplay features were developed to support the players experience in the world to provide functionality and variation in the world. 


Respawn Points

Figure One: Respawn Point in game representation.

 

First, a Respawn Point system in the game was developed to simulate the “Soul-Like” inspiration of the game, whereby the use of the respawn points introduce a strategic decision for the player – do they restore their health to full, at the risk of all non-boss enemies previously defeated being respawned into the world for future combat? (Guzsvinecz and Szűcs, 2024). This provides tension and replay ability in the game world. 

The Respawn Points is linked to the save system in the game – both within a game session and between the connection of the player to a respawn points flags that point as the last point for which the player should appear upon game load. The last respawn point is saved via an ID generated from the Respawn Points positional location in the game world. 

Figure Two: Video demonstration of the Respawn Point functionality.


Collectable System

 

Figure Three: Collectable Item in game depiction.

 

A collectable system was developed to provide a sub-objective for the player when traversing the world, which was subsequently linked to the quest system for which players are to collect all items to allow progression to defeat the games enemy bosses. The collectables collected status are saved using positional ID data and a Boolean flag, to determine which points have already been collected or not on game load. 


Enemy Spawn Points

EnemySpawnPoints script was developed and attached to a prefab object throughout the games world which provides for lesser enemies to populate the game world. The EnemySpawnPoints script dynamically loads enemies in and out the game world based on player location for performance considerations, and allows enemies to engage, disengage and reset positions as one group based on player actions. These are also linked to the Respawn Points in the world, whereby player restoring health brings back all enemies in the EnemySpawnPoints. 

Care was made in controlling the boundaries at which enemies should spawn and ensuring that enemies only spawned on surfaces with valid permitted layers and ensuring that they only appeared where a given NavMesh surface could be located using RayCasts and NavMesh position sampling as provided through Unity API. (Unity Technologies, n.d.) 

The EnemySpawnPoints were a valued tool for the level designer to be able to swap in and out which enemies and the number of enemies that should be in each area, with custom values for how the enemies respond to the players location. 

Figure Four: Extract of the Inspector of the Enemy Spawn Area script, displaying the customization options available for a level designer.

 

Figure Five: Enemy Spawn Point Demonstration in scene view within Unity Engine.

 

Obstacle Spawn Points

Similar to the EnemySpawnPoints, the SpawnObject script also uses distance checks and surface validation to only spawn game objects within a provided distance of the player and ensuring the objects spawn where exactly intended. 


The purpose of the SpawnObject script was to provide within the world obstacles and damaging VFX effects, like the VFX effects used by the Enemy AI, to add a lively feel to the world and add danger and tension to player exploration. 

Figure Six: Demonstration of the SpawnObjects using a Lightning Strike prefab gameobject as the object to spawn.


Quest Guidance System



An in-game diegetic help system was developed via a spawning bird in the world that, upon player proximity, flies to players nearest priority destination. 

To support the design for this diegetic usage of player assistance, it was noted that players immersion can be increased through the lack of a HUD (Heads-Up Display) given the player still has access to information. (Rosyid, Pangestu and Akbar, 2021). 

Therefore, three scripts were developed; the ObjectiveGuideStart, ObjectiveLocation, and the BirdGuide. 

 

Figure Seven: The BirdGuide gameobject and the scripts inspector showcasing its exposed customised variables.

Figure Eight: The ObjectiveGuideStart gameobject and the scripts inspector showcasing its exposed customised variables.

Figure Nine: Extract of the inspector of the Objective Location allowing for a prioirty level to be set.

 

The ObjectiveGuideStart, once placed in the world by an SpawnObject script, would use a SphereCast to locate all ObjectiveLocation component containing objects within a provided distance. (Unity Technologies, n.d.). The ObjectiveLocations (which themselves are simple scripts containing a priority Enum), are then organised and sorted based on distance and priority of the location, with the closest highest priority location being stored. 

The ObjectiveGuideStart then tracks player distance and upon a given proximity, the script would spawn the game object containing the BirdGuide script. 

The BirdGuide is attached to the model of a bird which flies away once disturbed by the player. It “flies”, using a NavMeshAgent, to the nearest and highest priority ObjectiveLocation as passed to it from the ObjectiveGuideStart script. 

The feature was developed to be used by the developers responsible for Level Design and the Quest system, to allow for in-game player guidance which immerses the player into the world. 

 

Figure Ten: Showcase of the Diagetic Bird Guide in game.

 

Boss Zone Entrance Blocks 

The entrances to the arenas in which enemy boss fights took place were linked to several existing systems, and ensured that during enemy boss combat, the player was locked into the arena with the boss and that on defeat of the boss, the game progress was saved, new Respawn Points were enabled, the player progressed in unlocking skills, UI elements were correctly enabled and disabled along with Audio clips being changed, stopped and played. 

The simple feature of seemingly requiring just to track the linked enemy boss's status ended up be foundational to the function of the games progress for the player. 

Figure Eleven: Gameplay demonstration of the Combat Entrance blocking the player exit, starting combat for the assigned boss, and ending combat encounter along with modifying UI, sound and the available Respawn Point.


Player Mount

A player Mount was introduced as a prefab that can be spawned and ridden by the player by entering the newly created Player Mounted State. This provided the Player with a quicker form of movement and provided variation in gameplay. This was important due to the growing development of the game world and built upon the feedback regarding how players felt moving through the large world was slow. 

To introduce this mounted state to the player, it required modification to the Player Character which was the main responsibility for the other programming developer on the team. 

As the player used New Input System, a new input action map was created and allowed to be switched to and from when the player entered the Mounted State.  

More details in the key feature of its IK based legs can be found in the Technical Animation section. 

Figure Twelve: Demonstration of the Mounted State being entered into by the player.


References

Guzsvinecz, T. and Szűcs, J. (2024) ‘Game theory and strategic decision-making in the Dark Souls games’, in Game Theory – Computational Aspects and Applications. IntechOpen. Available at: http://dx.doi.org/10.5772/intechopen.1008456 (Accessed: 25 May 2025).  

Unity Technologies (n.d.) Physics.Raycast. Available at: https://docs.unity3d.com/6000.1/Documentation/ScriptReference/Physics.Raycast.html (Accessed: 25 May 2025). 

Unity Technologies (n.d.) AI.NavMesh.SamplePosition. Available at: https://docs.unity3d.com/6000.1/Documentation/ScriptReference/AI.NavMesh.SamplePosition.html (Accessed: 25 May 2025). 

Unity Technologies (n.d.) AI.NavMesh.Raycast. Available at: https://docs.unity3d.com/6000.1/Documentation/ScriptReference/AI.NavMesh.Raycast.html (Accessed: 25 May 2025). 

Rosyid, H.A., Pangestu, A.Y. and Akbar, M.I. (2021) ‘Can diegetic user interface improve immersion in role-playing games?’, 2021 7th International Conference on Electrical, Electronics and Information Engineering (ICEEIE), Malang, Indonesia, 2021, pp. 200–204. IEEE. doi: 10.1109/ICEEIE52663.2021.9616732. 

Unity Technologies (n.d.) Physics.SphereCast. Available at: https://docs.unity3d.com/6000.1/Documentation/ScriptReference/Physics.SphereCast.html (Accessed: 25 May 2025). 

Previous
Previous

Technical Animation

Next
Next

Combat System​