[img]https://i.imgur.com/IXRaooL.gif[/img] Hi-res: https://gfycat.com/scientificlightamericansaddlebred Hey there! We’re back from E3 and continuing our work on The Riftbreaker with full force. Every day the game looks and plays better. We can’t wait to show off what we’re working on. [img]https://clan.cloudflare.steamstatic.com/images//34659267/ed1e7c9e919b4f30b166e2c235d4de8b1af600f5.jpg[/img] If you’re aware of our previous project, X-Morph: Defense, you already know that we love tower defense games. A little bit of that love found its way into The Riftbreaker. We decided to give you the chance to choose from several types of defensive towers in order to protect your base. There are some well-known designs like artillery or flame towers as well as railgun towers or shock towers. There are many systems and solutions behind these seemingly simple structures. Over the course of the next few articles, we will try to show you exactly how they work. Resource requirements Each tower type has its own setup cost and the more advanced towers may even require rare elements like uranium or thorium to be built. In order for the defensive towers to operate, the player needs to supply them with resources. All the towers require a connection to the power grid and use up a little electricity as an upkeep cost. Some turrets use the energy to shoot, generating massive spikes in power consumption, while others use other kinds of ammunition. You will talk more about ammunition in future articles. [img]https://i.imgur.com/AA4sD2V.jpg[/img] [i]A well-developed base with a large number of defensive towers and multiple AI hubs (that's the building with green lights).[/i] One thing that all towers have in common is the requirement for AI processing power. The decisions and operations of automated buildings in The Riftbreaker are controlled by AI hubs. These buildings are essentially supercomputers carrying out all the necessary calculations and dispatching instructions to other structures around the base. Just as any highly efficient computer these buildings require a lot of energy to operate. Fortunately, a single AI hub can house multiple AI cores, and you can build them at a safe location away from the battlefield. Nevertheless, the more towers you want to build, the more AI hubs you will need to set up, and provide them with sufficient energy. Visual design Every basic defense tower in The Riftbreaker consists of two parts - the base and the turret. While turret shapes are unique, the base is exactly the same for each tower. That is a decision we made in order to allow players to fit any type of tower they would like to use into the wall structure, regardless of their placement. Since the basic building wall segment takes a 1x1 grid segment, basic defense towers also use a 1x1 grid segment. A consistent visual style makes it intuitive for players to pick up new tools and know exactly what to do with them right from the get-go. There will also be more advanced towers that occupy a larger space e.g. 2x2 or maybe even 3x3, however, we are still in the process of designing their functionality so we will get back to them at a later time. [img]https://i.imgur.com/c440R6a.jpg[/img] We have a special system in place to control the turret movement and behavior. The model’s designer creates a skeleton for each tower and specifies which elements of the weapon will be responsible for changing its orientation. We call those elements pitch, yaw and recoil bones. The pitch bone controls how much the turret can tilt up and down, while the yaw bone controls the side-to-side movement. The recoil bone, as the name implies, is responsible for controlling a guns blowback when it fires. With those in place, we can employ inverse kinematics (to put it simply, we tell the robot where to go, while it calculates how to do it by itself) to point the barrel in the right direction. [img]https://i.imgur.com/OTIojIH.jpg[/img] [i]The highlighted parts start glowing while shooting.[/i] The artist that is creating a tower’s design can also define its visual behavior while it is shooting. We do this by employing a custom light emission map that tells the engine which parts of the tower should be highlighted when the tower shoots. We can also individually control the color, “glow factor” and the time of the light emission. Behavior design The last thing we will touch on today is how the towers behave when they’re plugged in and operational. They can be either in the “searching” or in the “aiming” state. While searching, the turret will relentlessly sway from side to side trying to acquire a target. Once a target enters the tower’s sensor range the tower switches to the “aiming” state. Once activated, the tower’s barrel will follow the target until it enters it’s shooting range. [img]https://clan.cloudflare.steamstatic.com/images//34659267/6c95ce15022ec7dd962ab42a9e2cb2d1f7a75a01.jpg[/img] What is important to note here is that the sensors have a bigger range than the shooting range of the tower itself. It means that the tower will pick up the target even when it is impossible to shoot at it. It happens in order to waste no time for rotating the tower towards the target. Thanks to this mechanism the tower can start shooting as soon as a target enters its shooting range. These are some of the basic principles of how defense towers operate in The Riftbreaker. If you’d like to give us feedback on these, or if you have some cool ideas, join our Discord and let us know! www.discord.gg/exorstudios Other social media: www.facebook.com/exorstudios www.twitter.com/exorstudios www.mixer.com/exor_studios www.twitch.tv/exorstudios