Final Touches Devlog | Week 6


In this week I added the final touches to the game. :)

 

EndGame

This included the very important but somehow often forgotten endgame script. This would trigger the end of the game. Up until this point the game continued indefinitely. To alleviate this, logic was made that tracked the King’s Hp. Upon reaching zero an endgame screen would be loaded with data presenting who had won along with buttons to both return to title and rematch.


 

Start Game

I spent ages trying to design really intricate title screen art which was coherent with the game art, but somehow the moss just ended up looking like soggy lettuce which was less than desirable. Following this crushing defeat, I went for much simpler minimalistic design and I actually really like it. It conveys the rivalry of the two colours and instantly gives off a chess vibe.

Soggy Lettuce

 

Epic design

Feedback

Undoubtedly the largest requested addition from the feedback was the implementation of a system which visually shows the valid moves for a unit. Whilst this sounds relatively straight forward to implement, It’s not. The way I implemented the move system, a move is made and then the logic checks whether that one move is valid. This is not great for implementing a visualiser as I would have to do that check for all 49 pieces on the board every turn. Ideally, I would have an array of all the valid moves which I could output. Then when a move is made just check that it’s in the array. If you’ve been following these dev logs you’d know that I have already spent copious amounts of hours rewriting the move logic so I wouldn’t possibly do it again…..Unless... Alas, I love a good sexy code overhaul, so we rewriting this logic 3rd time.

So, when a unit is selected, Raycasts are sent with directions and length corresponding to the valid moves. Ie for a bishop four raycasts are sent at 45, 135, 225, 315 degrees with “infinite” length. The squares they collide with are put into a validMove array. This gets more complicated for some units and more logic is needed. After valid move array is obtained, highlight objects are instantiated on the valid squares. When a move is made, it is checked whether the target square is in the valid move array. This took hella long time to implement for all 12 pieces but was so worth it. The game flows so much better. 




GAME IS DONE YIIEEEW 

HOPE YOU ENJOY :D

Leave a comment

Log in with itch.io to leave a comment.