Developing Game Systems
Work is well underway on the tactical space strategy game I'm currently developing. In regards to the selection system from the previous post, I ran into another problem that I was thankfully able to solve due to some Unity community members. It turned out to be a bug in one of the later betas that I reported and which the Unity developers confirmed will be fixed. You can find an even better solution towards the end of the post: https://forum.unity.com/threads/rts-style-drag-selection-box.265739/
So far, I've got a multiple unit camera focusing system and control group selection system done. I've developed a custom projectile turret firing system with simultaneous or alternating fire with multiple barrels, but have yet to develop beam and missile turrets. There was a need to test out the effects of the projectiles, so I ended up coding an extensive damage system earlier than I thought I would. It contains energy shield, armor, hull, and systems damaging, as well as critical damage and penetration values. While almost finished with it, I got sidetracked by trying to develop a radar system for all units and weapon turrets. The image at the top of the post is a screenshot of a prototype radar using Unity's trigger colliders. Since I haven't even started on the visuals for the game, everything you see is just for prototyping only.
Originally I was going to use an asset called TriggerEventPro (previously called TargetPro, and is part of the Pool Target Constraint bundle) from Path-o-logical Games as a radar solution. I'm already using their Pool Manager system for projectiles, and they have great support. However, I decided to implement my own radar and target solution for a couple of reasons. First, I want to become a better programmer, and second, if there is any additional functionality I want to implement or need to fix some problems, it's much easier to do when looking at my own code.
Since I never learned programming formally in an institution, I find that I've been using many online resources like Stack Overflow, tutorial sites, Unity Answers, Unity's Scripting Reference, and books to learn more about various concepts. I usually try to find many different answers for one problem, and pick what looks to me like the best solution in terms of readability, performance, etc. I also buy cheap assets in the Unity Asset Store just to see how other programmers implement features, and then sometimes try to roll my own. Having these resources at my disposal, I was able to implement a radar system from scratch which can constantly sort targets by various means like nearest, farthest, closest or farthest from a destination, smallest to largest or vice versa. I've still yet to test the performance with many many spacecraft and turrets in the same scene, but I don't think it will have that much of an impact... we'll see.
Although I've always wanted to try programming, I honestly didn't think I'd be so engaged by it and having this much fun. Hours seem to pass by so quickly when I'm immersed in it. After seeing all these features in games for so many years, it's pretty rewarding to be able to create them myself.
My next things to do are to finish the subsystems functionality and crew experience that will affect the operating of the spacecraft in different ways. In addition, I'm creating a new spacecraft classification system which will be used internally in calculations and within the background lore for the game. The lore will be based on various traditions around the world, as well as some of the most ancient texts available to us. It's not just for this game, but for many potential games in the future. Thanks for reading!