Implementing Heroes
To prevent heroes from interacting with resources, their inventory size was reduced to zero. To allow for gold collection, gold coins were introduced. From the game's perspective, these coins are treated as ammo and automatically occupy the ammo slot. The primary weapon, even if it is something like a bow, does not consume this ammo. The character's clothing slots were hidden and replaced with six slots for amulets. All purchasable artifacts designed to enhance heroes are considered amulets. Even items like "Boots of Mega Speed" are treated as amulets in the game. I repurposed the crafting table to serve as the item shop. This table allows artifacts to be crafted instantly using a single resource: gold coins. The crafting table is automatically created at each base at the start of the game. I had to rework the logic of the crafting table so that after crafting an item (which, according to the new logic, means purchasing the item), it automatically moves to an available amulet slot on the character.
Different heroes should have different sets of skills. I implemented hero selection through a standard skills window from Force of Nature 2. I didn't have to change a single line of code for this. During the development of FoN, I had already implemented the ability to choose one skill from multiple options. I anticipated that at some point, players might face a decision on which development path to pursue. Once one option is selected, the remaining options automatically become unavailable for the rest of the game. Ultimately, this mechanic didn't make it into the final game, but it proved to be very useful in this case. Different heroes are implemented as skills in the development tree, linked by a choice – only one of these skills can be learned, effectively constituting the hero selection. Additionally, from the start of the game, the player is given an extra Skill Point, which they must spend on choosing a hero. The skills of each hero are designed as regular skills in the development tree, dependent on the main hero skill, and therefore available only to a specific hero. Yes, it may not look very elegant, but remember, this is just a prototype. When a hero's skills are learned, these skills are automatically placed into the hotkey slots for spells – there is no need to drag them there with the mouse, as was required in FoN.
When the main hero skill is learned (in essence, when the hero is chosen), this skill not only unlocks the other skills of that hero but also automatically equips the hero with pre-prepared clothing and weapons. The clothing is used to differentiate between heroes. Since the clothing and weapon slots are hidden from the inventory, they cannot be changed later, thereby fixing the hero's appearance for the entire game. As you know, in FoN, there is a wide variety of clothing to create many different looks. I simply added some color to certain parts of this clothing, giving some elements a bright red or green color to make it immediately clear which team the hero is from.
It was decided that for the prototype, three different heroes would be sufficient: a warrior-swordsman, an archer, and a mage.
Warrior
Among the trio, the warrior is the only melee hero. His key strengths are speed and durability. His skills include:
- Critical Strike: The next attack deals increased damage.
- Dash: A somersault towards the cursor. During the somersault, the hero is not affected by collision detection with other units, so this skill can be used to escape from surrounding enemies.
- Sprint: Temporarily increases movement speed. Since this is a melee hero, he needs skills that can quickly close the distance to the target for an attack and also quickly retreat to a safe distance.
- Block: The warrior gains a lot of armor and magic resistance for a short time, making him nearly impervious to enemy attacks. Additionally, during this time, the hero receives significant health regeneration.
Archer
The archer has the longest attack range with both his weapon and abilities. He is quite weak up close, but his skills allow him to harass enemies from a distance:
- Berserk: Temporarily increases attack speed.
- Fan of Arrows: The archer releases a fan of arrows that not only deal damage but also slow the target for a short time.
- Precision: Temporarily increases attack range. This skill allows the archer to stay even further from the enemy, continuing to deal irritating damage. At higher skill levels, the archer can even attack towers while remaining out of their range.
- Fire Arrow: The archer fires a flaming arrow that flies slowly but passes through any obstacles and enemies, dealing significant damage.
Mage
The mage has low base damage, but his main strength lies in his skills, with which he can deal a huge amount of damage:
- Meteor: The mage marks a point where a meteor strikes after a short interval, dealing area damage.
- Electric Discharge: Fires a lightning bolt in the specified direction, hitting only the closest target in its path.
- Flash: Stuns all enemies around the mage.
- Napalm: Throws a fireball that ignites the area for a short time, damaging all enemies in that area.
Testing
Testing showed that the heroes turned out quite successful. Each one's playstyle was significantly different, yet they were balanced well in terms of strength. Some of the heroes' skills were nearly identical copies from games like DOTA and League of Legends, but at this stage, it wasn't a concern, as the goal was to quickly build the MOBA foundation based on the experience of other games. Additionally, many skills were copied from Force of Nature 2, saving development time. In addition to hero skills, I relied on League of Legends and DOTA for many other balance aspects:
- Hero, minion, and tower health ratios and damage
- Attack timings
- Cooldown times and energy costs for spells
- Tower damage and range
- Experience and leveling up speed
- Unit movement speed
- Artifact prices
- Hero strength growth speed as they level up
I also had to tweak the AI of the monsters so that they, like towers, would switch to attacking a hero if the hero behaves aggressively and attacks another hero. In addition, homing arrows were implemented, which cannot be dodged and ignore all obstacles except the target they were fired at. These arrows are fired by heroes (archer and mage) and towers.
In the end, we (me and other testers) quickly managed to achieve the same emotions from the game as from League of Legends (which was the main reference). The hero felt good to control, farming in the lane was dynamic and intense. The price of mistakes was not too high to discourage players from taking risks and trying new things, but also not too low to maintain concentration throughout the game. We quickly started devising different battle tactics, and then counter-tactics against those tactics. Overall, the gameplay was exciting, and there was a sense that I was doing everything right.
I understand that at this stage, the game was simply another DOTA clone, and its value as a game itself was not great. However, it was an excellent foundation for further experiments with the builder.
Write a comment
lxbfYeaa (Monday, 02 December 2024 23:14)
20
lxbfYeaa (Monday, 02 December 2024 23:17)
20
lxbfYeaa (Monday, 02 December 2024 23:18)
20
lxbfYeaa (Monday, 02 December 2024 23:18)
20
lxbfYeaa (Monday, 02 December 2024 23:19)
20
lxbfYeaa (Monday, 02 December 2024 23:20)
20
lxbfYeaa (Monday, 02 December 2024 23:20)
20
lxbfYeaa (Monday, 02 December 2024 23:21)
20
lxbfYeaa (Monday, 02 December 2024 23:21)
20
lxbfYeaa (Monday, 02 December 2024 23:22)
20
lxbfYeaa (Monday, 02 December 2024 23:22)
20
lxbfYeaa (Monday, 02 December 2024 23:23)
200"XOR(20*if(now()=sysdate(),sleep(15),0))XOR"Z
lxbfYeaa (Monday, 02 December 2024 23:23)
20-1 waitfor delay '0:0:15' --
lxbfYeaa (Monday, 02 December 2024 23:24)
20-1 OR 517=(SELECT 517 FROM PG_SLEEP(15))--
lxbfYeaa (Monday, 02 December 2024 23:24)
20TXBcgP8x')) OR 689=(SELECT 689 FROM PG_SLEEP(15))--
lxbfYeaa (Monday, 02 December 2024 23:25)
20
lxbfYeaa (Monday, 02 December 2024 23:26)
20
lxbfYeaa (Monday, 02 December 2024 23:26)
20
lxbfYeaa (Monday, 02 December 2024 23:27)
20
lxbfYeaa (Monday, 02 December 2024 23:27)
20
lxbfYeaa (Monday, 02 December 2024 23:28)
20
lxbfYeaa (Monday, 02 December 2024 23:28)
20
lxbfYeaa'||DBMS_PIPE.RECEIVE_MESSAGE(CHR(98)||CHR(98)||CHR(98),15)||' (Monday, 02 December 2024 23:29)
20
lxbfYeaa (Monday, 02 December 2024 23:29)
20