More little bits & pieces done today..
Firstly, I’ve implemented proper black borders around the screen if they are required. This is to erase the overdraw caused by the cloud drawing, which can move into the border area due to the way they are animated. So, in a widescreen display black borders are drawn to the left and right, and if in a portrait display (or a screen mode where the ratio is not 4:3) then borders are drawn top and bottom. I tested it in a variety of windowed sizes and it works fine for me, and it should hopefully make the game playable for more people with widescreen monitors. Smaller screensizes do make the small font look much worse though!
I’ve also implemented some code which at the start of a spell selection phase, goes through a human wizards spells and checks each one to see if it is castable or not (any space, or targets available). If not then it is shown with a red border and moving over it with the mouse shows a Can’t Cast message in red at the bottom. It is of course not selectable. This helps the player at a glance to not look at spells which can’t be cast. As you can tell I’m hugely in favour of these kind of UI designs which reduce time and save the player unnecessary work!
Following on from that, the game will now also show a green border (for one turn only) around new bonus spells found from magic woods. I did something similar in Chaos Funk and this does help show the new spell..
I’ve implemented a proper spell casting check for the AI wizards too, so now no spell that can’t be cast should be selected. This was much easier than would have been possible in Chaos Funk due to the design of Chaos Groove. Something I’m going to touch on in a later post.
Oh, I also added a AI check to make pieces that can be ‘ridden’ be cast closest to the wizard. This is to stop spells like Magic Castles being cast close to the enemy like shadow woods or walls would be. Using the ‘rideable’ stat lets me avoid hard-coding things like this for specific spells, something I’m trying to avoid at all costs.
Finally, I’ve fixed a few bugs with the AI, and made the vertical spacing between the text at the bottom shorter, so it now lines up with the brief spell description as drawn using PTK’s multiline text function.
There is still some errors when highlighting the current wizards creatures. This is made more difficult because I’m trying to set the highlights intelligently in case working out the path-finding each frame kills the framerate on slower PC’s. It shouldn’t do really, but I’m trying to make the game work well on many different kind of PC’s.
I’ve still get a few bits to do before being able to do a new demo. I’ll try to do one soon, but I’m not going to promise a date!