Encounter system [Landinar devblog]
June 13, 2018By Ryanne
In Landinar: Into the Void we have created a vast open world for the player to explore. We filled it with space stations to visit, but there wasn’t much else to find in space. Our programmer Sipke shares how we started working on an encouter system to create a more lively world for the player.
Why we needed an encounter system
The game was lacking things to do in space. We started developing a system that would spawn random encounters along the way, much like the encounters we used in Convoy. An encounter in Landinar: Into the Void should basically create independent stories in space. This will hopefully encourage the player to explore sectors a bit more, a very important experience for the player in our opinion. Second to that, the encounters will make the sectors feel more alive.
The encounter system will do those things by creating minor conflicts between factions and spawning random enemies or neutral NPC ships that have a story to tell. For example, an NPC ship could be stranded and needs fuel or repair parts. Or a bunch of empire ships that will start hunting down some pirates in the sector. All these encounters are for the player to temper with.
All encounters will be generated at the same level as the sector it is spawned in. This will create more dangerous areas for the player, which he may not be ready for at the time. In theory the player can head to every sector from the beginning of the game. Just be careful.
Designing a system
There will be two spawning systems that will control different parts of the encounter system. Why two? One is needed to create things to find, like treasures. The other will give the player something to do when it gets a little boring in space.
The first is the static encounter spawner. This system will spawn up to a limited amount of encounters when the player enters a sector. The encounters spawn can contain some idle pirates, some random crates, a small story or even the start of a mission.
The second is the dynamic encounter spawner. This system will spawn more conflict-like encounters near the player when the players threat level is low. This will mostly contain the spawning of hostile ships for the player, but it can be a trader in need of help as well.
To balance the encounter system we came up with the following restrictions:
-
A encounter cannot spawn near another encounter or mission.
-
The dynamic encounters have a cooldown until the next encounter can be spawned.
These restrictions are necessary to keep the enemies from overwhelming the player or attacking when the player is docked at a station or doing a mission. As you may guess, we have had this happen once too many times while playing the game ourselves.
The product so far
We have currently implemented both the static and dynamic encounter system with a basic set of encounters. This way we can test how the system works and reacts. For now it includes the spawning of random enemies and crates in space. In the near future we want to add the possibility to add dialogues to the system so that we can create interesting stories and missions to find. Of course we are also working on other types of encounters, but we will keep those secret for now…