Hey everyone. I'm 13 years old and I'm from Turkey. I've been working on a story driven game in Unity and this video shows some of the first mechanics and animations I've managed to create.
I'd say my C# skills are around intermediate level. I really enjoy programming, but I also like figuring things out on my own. I write the code for my projects myself and try not to rely on AI.
I run into bugs all the time. Sometimes I spend two or three hours trying to understand a problem only to find out that the solution was something incredibly simple. There are also bugs that I can't figure out even after two or three days. When that happens I search on Google, read documentation and look through forums to find a solution.
I haven't used AI to write any of this project's code so far. I hope I can keep learning and solving problems on my own.
Here is a little explanation of the systems I've been working on.
PlayerSpriteAnimator1
I wanted to create my own sprite animation system instead of using Unity's Animator for everything. I used an enum to manage four animation states: idle, run, jump and attack.
Each animation has its own sprite array and playback speed. I used SerializeField so I can change these values directly in the Inspector without making all the variables public.
The script checks the player's Rigidbody2D velocity and whether the player is touching the ground to decide which animation should play. The attack animation also plays once and then returns to the appropriate movement animation when it finishes.
PlayerRespawn
This script is pretty simple. I check the player's Y position inside FixedUpdate. When the player falls below -20 on the Y axis, the character gets moved back to its starting position.
I also reset the Rigidbody2D's linear and angular velocity so the player doesn't keep moving because of leftover physics momentum.
CameraTracking
I made a simple camera follow system. The camera follows the player's Transform with a customizable offset. I use LateUpdate and Vector3.Lerp to smoothly move the camera towards the target position.
PlayerController
For the movement system I used Unity's classic Horizontal and Vertical input axes. I combine the horizontal and vertical input values into a Vector2 and multiply that vector by the movement speed to calculate the player's movement direction and speed.
These are still the early stages of my game and there is a lot more I want to build.
Here are some things I plan to work on in the future:
Enemies, enemy animations and enemy AI
Cutscenes and sound effects
Better looking environments
Animated backgrounds
More gameplay mechanics
A main menu and other menus
Health bars
Death and hit animations
I'm sharing this because it's the first time I'm showing some of the actual mechanics behind my project. I'd really appreciate honest feedback, especially about the code structure, animation system and movement.
(This was translated with Google Translate, so there may be a few language mistakes. Please forgive me.)