I already talked about how I would have structured the classes for the management of enemies, now I started to implement the first one by inserting the basic movements.
Different from the player, we must carefully manage the behavior of the enemies because we must ensure that no ambiguous behavior occurs or that damage the gameplay.
It is necessary to recognize and manage all the possible states that an enemy can have but it is a concept that I will continue during the creation of other enemies.
When you decide to make a game, some elements are bound to be repeated. It doesn’t make sense to rewrite the same parts of code in different scripts. A good idea is to group them according to common factors.
In my case, I’ve examined the enemies of the project I’m working on. All enemies will need a variable for life, one for speed and one for the reward they give after their defeat. …
I start again from where I stopped yesterday, after the movement animations today it’s time for the attack animation and its particle effect.
The procedure is the same as yesterday’s article, the only difference is the Sword Arc animation that being another sprite that requires inserting a new variable in the code to manage it and work on the timing of the animations because they work well together.
2D animations, my player needs to move like a real person not more like a cube skating on surfaces.
With sprites, animations have a few basic steps.
We must use a sprite sheet and we must make sure that its subdivision is correct. To do this we just open the sprite editor and go to modify the division into cells so that it is homogeneous.
We have introduced the discourse of Tiles and Palette today instead I have worked on how to make an animated tile.
First, you have to add a package called “2D-extras” that is recoverable among the repo of Unity Technologies on Github at this link.
Depending on the version of Unity that is used, you should choose the correct branch and follow the detailed instructions provided in the repo. Otherwise, you risk easily find compilation errors that will block everything.
Let’s start with the new project and begin by introducing a new element of Unity, what is the Tilemap and how to use it.
The Tilemap component is a system that stores and manages Tile Assets for the creation of 2D layers. It transfers the necessary information from the Tiles placed on it to other related components such as the Tilemap Renderer and the 2D Tilemap Collider.
To create a Tilemap, automatically the Grid component is generated, and it works as a grid where you place your tiles for the creation of the layer.
I'm now in the fourth course of my program with GameDevHQ, things are starting to get serious and more and more interesting.
The next challenge is to create a game for mobile devices, it’s not the first time I realize a game for smartphones, but this will not be a game jam and I will have the time to manage all the details that concern this kind of development.
What to say is that I’m always very excited to start a new project. I have already prepared all my repo and my working layout. I can’t wait to start.
I’m finishing the elements of my project and this will allow me to start developing the draft of a level, my qualities of Level Designer are still very basic I want to develop a scene that can show what I have done rather than the level itself.
To create the modules I created prefabs that can be used regardless of their position.
The new mini update, this time is about the game camera, I decided to use the Cinemachine inside the package manager of Unity.
This tool is phenomenal, it is not the first time I use it but also this time I was amazed by its simplicity.
Just add it from the Package Manager and generate a Virtual Camera to be already halfway through the work.
In my case, I have already chosen to create a 2D Virtual Camera since I’m creating a 2.5D game.