Alright, so, today I wanted to mess around with something a little different. I’ve been playing a ton of League of Legends lately, but I got this itch to see if I could recreate a super basic version of it, you know, just for fun. Not the whole game, obviously, but like, the core idea of two characters duking it out on a single lane.
Getting Started
First off, I needed to pick a game engine. I went with Unity because I’ve tinkered with it before and it felt pretty approachable. Plus, there’s a mountain of tutorials out there if I got stuck. I installed the latest version, fired it up, and started a new 2D project. I named it “NotLeague” because, well, it’s not League of Legends, but it kinda is.
Creating the Basics
Next up, I made a simple background. Just a green rectangle to act as the “lane.” Nothing fancy, just something to show where the action’s gonna happen. Then I needed some characters. I grabbed some free pixel art sprites online – a little blue dude and a little red dude. I imported these into Unity and dragged them onto the scene. I set them up on opposite ends of the green rectangle. These little guys were gonna be my champions.
Adding Some Movement
Now for some basic movement. I wrote a simple C# script in Unity to make these guys move. For the blue guy, I used the arrow keys. Left arrow to move left, right arrow to move right. I did the same for the red guy but with WASD keys. I attached these scripts to each character, hit play, and bam! They were moving. It felt pretty awesome to see them sliding around, even if it was just basic left and right movement.
Implementing Basic Attacks
- Attack Script: I then wrote another script to handle attacks. I figured the easiest way to start was with a basic melee attack. When I pressed the space bar, I wanted the blue guy to do a little punch animation. I found a punching animation in my sprite sheet and set it up to play when the space bar was pressed.
- Collision Detection: Next, I added some colliders to the characters so Unity could detect when they were hitting each other. I used simple box colliders. I tweaked the attack script to check if the attacking character’s collider overlapped with the other character’s collider. If they did, I logged a “hit” to the console.
- Health System: To make it more like a game, I gave each character a health variable. I initialized it to 100. In the attack script, when a hit was detected, I subtracted 10 from the health of the character that got hit.
The First “Kill”
I played around with it, moving the characters and making them attack each other. Eventually, I got the red guy’s health down to zero. It felt surprisingly satisfying to see that happen, even though it was just a number going down. I added a little * to the console that said, “Red player defeated!” when the health hit zero. That was my first “kill” in my super simple NotLeague.
Adding More Features (and Bugs)
I got a bit carried away and started adding more stuff. I tried to implement a basic ranged attack, like a fireball. This took way longer than I expected. I messed around with instantiating projectiles and making them move across the screen. I ran into a bunch of bugs where the fireballs would go through the characters or just disappear randomly. It was frustrating, but I learned a lot about how Unity handles projectiles.
Where I Left Off
After a few days of on-and-off tinkering, I had a very, very rough prototype. Two characters could move, do a basic melee attack, and even shoot a wonky fireball. It was nowhere near a complete game, but it was a start. I felt like I had a better understanding of how these kinds of games are made. It’s a ton of work, even for the simplest features.
So, yeah, that’s my little adventure into making a League of Legends-inspired thing. It was more about the journey and learning than actually making a full game. I might revisit this project later, or I might just move on to something else. Who knows? But either way, it was a fun ride.