This week has been spent implementing game configuration options, as well as the front splash menu.
The village featured on the first mission (Moscow Defense) has been chosen as the backdrop.
This week has been spent implementing game configuration options, as well as the front splash menu.
The village featured on the first mission (Moscow Defense) has been chosen as the backdrop.
The Red Front is quickly verging upon the first Beta version. For the game, this means that the bulk of the games base features have been implemented.
The base features consist of the games systems (AI, Weapons, Upgrades, Weather, Cash, Mutations etc) have been implemented and are working as intended. The art style has been chosen, sounds are being implemented, bugs are being fixed and optimisations are being put in place.
As The Red Front nears the first Beta version. It presents a great time to reflect upon the development process which has lead up to this point.
This blog post provides a history of how this project was started, the prior development prototypes and shows how all of the past projects have contributed to the current.
The weather has once again taken a turn for the worse on The Red Front. There is now far more unpredictability in the weather cycles, it may storm one day, then rain or even snow the next. The storms have been growing in intensity with heavy rain and lots of lightning. Could this be foreboding at something evil to occur?
The soviet engineers have been working hard on the commanders tank HUD, displaying the most accurate information possible in a presentable way.
We will be continuing to implement more HUD features to give the commander the edge on the battlefield.
There are four new weather systems in The Red Front, the weather will be randomly chosen when you start a new level. The most common weather type is a normal sunny day. There is also rain, snow and a storm.
The storm may be hinting at something evil stirring on The Red Front, so stay alert to find why it is occuring.
When the tank commander has a shield up, any damage taken from an enemy will create a distortion effect on the commanders shield. This creates another visual queue for the commander to gauge their health.
The UI has begun to receive updates, the newer UI is far more sleek and informative. There will be additional features to the in game HUD added over the future.
The Red Front will now support the most common screen resolutions, the camera has been clamped to remain within the game world and will now overshoot the boundaries of the map. This helps prevent immersion-breaking game play and help the commander focus more upon the battlefield
Multiple bug fixes have also been made in the game, these vary from Soldier AI (stopping suicidal rocket infantry units) to fixing minor issues such as sprite lighting effects.
Watch the below video for a display of the latest updates!
I’ve had some requests to create some tutorials showing how The Red Fronts back-end works. In a way of giving back to the game development community, I’ve decided to create some basic tutorial series that will be regularly updated.
Through these series you will get a look “under the hood” of the game and see how some of the code works. Those interested may choose to follow along with the development.
This tutorial is based off the player-controlled tank for The Red Front which is currently in development.
Arcade-Action games are a very popular Genre. By following this tutorial you’ll learn how to create a playable tank, make its turret rotate and follow the mouse. In a later tutorial, you will learn how to make the tank move and make it shoot.
You will need to create some basic art, one for the “body” of the tank and one for the “turret” of the tank. These two parts will move independently to each other so will be drawn in two segments.
This tutorial has been written for beginners and assumes basic knowledge of Unity and C# programming.
The tank we are building will comprise of two separate game objects. One object for the “body” of the tank and one game object for the tank turret. The turret will move independently to the tank body and will be set up to track the player mouse.
The basic setup required for this is as follows:
Following this, you will have the following hierarchy structure and objects created.
Note: If you have any issues with the turret appearing behind the tank body, select the TankTurret object and set the “order in layer” to 1.
The following stage will add a new C# script to the turret object which will cause the turret to track the player cursor.
public int rotationOffset = 0; // This will offset the rotation of the object as it tracks the mouse. This is required to correctly set rotation values
void FixedUpdate() {
Vector3 difference = Camera.main.ScreenToWorldPoint (Input.mousePosition) - transform.position; // This will calculate the distance between the mouse in the game and the position of the tank turret
difference.Normalize (); // This returns simplified values which makes it easier to work with
float angle = Mathf.Atan2(difference.y, difference.x) * Mathf.Rad2Deg; // This calculates the angle between the mouse and the turret by using the values derives from the difference calculation.
transform.rotation = Quaternion.RotateTowards (transform.rotation, Quaternion.Euler (0f, 0f, angle + rotationOffset), 200 * Time.deltaTime); // This will rotate the turret towards the calculated angle over time. Tweaking the multiplication value will state how quickly or slowly it will rotate.
}
You have now created your tank, created a moving turret and have it correctly following the mouse.
There may be some additional questions, so I have created a few example questions below:
If you would like your turret to rotate around a different central point, select the art piece that you have and click “sprite editor”. The central circle is the sprites rotation point, drag this to your desired location and hit “apply”. Everything else will magically just work!
This tutorial series is being written by the developer of “The Red Front”, these tutorials are aimed at new unity users who are interested in getting involved in Game Development. These tutorials are real-world examples based off methods that are currently used in The Red Front. Visit us at www.theredfront.com