Godot: It's all about that _draw() · 9:46pm March 19th
No idea why I'm posting this, I guess it's the need to share even when no one is going to read it
So, yeah, I went back the past days to Godot, with a main discovery of drawing things there for yourself. Of course, drawing almost entirely with code the entire screen is a long and tiring work, but I kind of like it. Add to that the addition of learning how to define global classes and using OOP stuff and now I got a set of heroes as circles drawn on a map moving around. Neat stuff, at least for me. And anyone going "OOP is bad" can cry about it, I like it
Well, one challenge today was "fixing" the view on a specific hero and let everything else move around it. Got it to work rather quickly, and then came drawing the corners of the bad.
You see, I have a map, and then I have a region where the map is shown. But the map is big, so it doesn't fit entirely inside the region. Well, here comed the part that took so much time: Only draw the corners of the map when it's visible. Was kind of hard, especially with all these cases and when and how to cut and how to make it all dependant towards the chosen fixed hero, but at the end it works. Rather straightforward, the hard part was figuring out how exactly and not make it a four-dimensional abomination that Discord would be proud of
But still, it is fun. Part of coding is to write a code once and then make it that you can change the hard numbers all you want and it all still works. And it does: I can resize the map all I want, and either the whole map border is visible, or just a corner or even just a line.
And also I learned how to implement a dictionary. It's needed for the idea I'm doing, or else one would always have to write the commands out fully what you want to do. And the shortcuts one would use are customisable! Yay!
Anyway, it's all more a setting up of the mechanics, and I'm still not sure how big I want everything to be or if I'm even going to finish it at all or stop it at one point. At the end, it's for me much more a process of learning, even if it's just the basics of programming etc.
But if I ever get to finish it, it might become a sequel of a fic that needs one