Posted October 24, 2021 by HairyElephant
#arcade #devtober #madewithunity #platformer #runner #jumping #2021 #unity #indie #devlog
Wow, there was no devlog for about 2 weeks. We were a little delayed on the way. A lot of work and outside activity. We decided to get together the most important thing and today touch on the technical part of our game a little.
(if you haven't read, we recommend that you look to be in the subject):
The game path generation system has been redesigned. If earlier the track was assembled by connecting previously created prefabs, now the generation is split into separate composite modules:
This implementation made it possible to make the generation customizable, due to the fact that the chances of spawning of obstacles, turns and stairs were taken out.
The spawn probability works by accumulating a given chance, checking it in the Gaussian distribution and discharging it when an event occurs.
We also decided to add a couple of parameters to the generation:
offset for deletion, that is, which platform should be removed before the player's position in order to clear the storage space for subsequent platforms. Thus, an optimal solution for storing and working with platform data has been implemented.
An additional module was also written for the camera so that it moves along the track depending on the position of the player.
Previously, the camera would only follow the player
The module made it possible to make the picture more pleasant and stabilized. Now the camera looks better when turning, climbing, descending and falling of the player (loss situation)
The player will now aim towards the center of the track if he is running parallel to it. The player's speed increases depending on the path traveled.
We are testing with the dependency algorithm, but so far none of the tests have passed enough tests to decide which one we will use in the game.
Points are counted from the distance traveled. Multipliers will be added for these points in the future (a codebase has already been created for this)
Abstract scripts have been created to implement obstacles. On their basis, several test obstacles have been made so far:
Obstacles are made of several types:
Obstacles that the player can bump into, deflect the player's motion vector in a random direction, if he runs parallel to the path, or deflects it at an even greater angle from the current motion vector.
We decided to update our panels. Our 3D artist created them from scratch and they seemed more pleasant to us. We also removed the environment from the panels, simply because otherwise the player would collide with them and fall into a death trap and could not get out.
We will add a dynamic environment that will haunt the player, and constantly remind of himself.
How do we do it? See the next devlog
The connections between generation, player and game logic are completely isolated, so the number of bugs or game breakdowns is minimized. It allows you to change these modules more flexibly and faster. Based on this, defeat / restart / exit are implemented. Moreover, as a result of refactoring, fps increased from ~ 400-500 to ~ 600-700 in the unit editor.