Level Design and Basic Battle System Devlog


This week I worked on fixing some of the minor bugs with the animations and worked on a basic design for the first section of the Palace, the Guardhouse. I also added more to the tileset and fixed some graphical issues with the importing of my pixel art as it was trying to condense and compress the images when the tiles are only 16x16 pixels. That's why some of the tiles seen in last weeks devlog were slightly brown and off colour, not the imposing and stone greys I wanted.

Map of the Guardhouse, dead ends and stairs may or may not lead to other parts of the Palace.





However the main thing I worked on the this week is the basic battle system.
After following some basic tutorials mainly the one from Brackeys (linked below), I modified the code to use arrays and lists of units (the enemies and player characters), with that I modifying the basic attack button script to take a new Skill Scriptable Object, this Scriptable Object would contain basic information about the attributes of the different skills, like the Name, Graphics, Magic Cost, Damage, Accuracy, Critical Hit Rate, any status effects that the skill would inflict and most importantly the targets of the skill. To keep it basic I only implemented single targeting and group targeting for both the player and enemy parties.

With that I was able to design some UI elements for the different buttons, icons and gauges that would be shown in battle (shown below).


All that was left to do was the implementation of the selecting of targets which was my main challenge this week as I had to position clickable buttons in a place on the screen relative to the position of the select-able unit.  But though numerous deep dives on the unity forums and documentation I was able to implement a basic system that I can adapt to the needs of the game.


While not as flashy as most modern RPGs (I don't even have any animations), the battle system works, with each battler having a defined skillset, different stats and other attributes like a primitive equipment system. All with a UI that I think is easily readable to most players with icons for the targets of the skill, the type of skill and a large icon showing the skills damage type, for when I implement different resistances.

Although despite this major success. I still have long way to go as I still have the item system to implement, the menu for when your in the dungeon, with the functions that would involve, like switching equipment, using items and the like. However, the main feature to implement in next week is  to combine both my dungeon exploration with the battle system as currently they are current two separate scenes in the same project.


Resources used for this weeks work:


https://discussions.unity.com/t/create-ui-health-markers-like-in-world-of-tanks/...
https://docs.unity3d.com/ScriptReference/GameObject.Find.html
https://discussions.unity.com/t/how-to-destroy-all-objects-from-a-list/810028
https://discussions.unity.com/t/how-to-implement-a-choose-target-system-turnbase...
https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.list-1?v...
https://docs.unity3d.com/6000.0/Documentation/Manual/class-scriptableobject.html

Leave a comment

Log in with itch.io to leave a comment.