Debugging Hexagonal Grid and Time Management


Author: Armando J. Cardoso 

Posted on 11/16/2023

Hello all name's AJ lets jump into this weeks blog. 

Overview:

So this week I had 2 new issues occur and of course 1 of them was the simplest of fixes and I did not see for the longest. So this week was prototype build week and I have been task with ensuring combat and the grid are operational and properly functioning as well as managing the production of the game. But enough overview lets jump in to it.

Problem 1 

When working on the grid as a team we ran into an issue where the grid was not finding the most optimal path and I know it the code was right especially since I triple checked it. So to give you a back story the grid is a hexagonal grid and what that means is when the grid has to find its neighbors you have to make sure you set and the correct positionings for each tile. For instance, if you are on a 3x3 grid and you are on the the center tile aka (1,1) you have 6 neighbors meaning you have 6 tiles that surround your current tile. Now if you are the corner tile aka (0,0) you would only have 2 neighbors. So now that you know the basics in how neighbors work, our problem occurred when the grid kept printing out the wrong neighbors for every tile other tile. Originally I thought it was the adding of and subtraction of the X and Y positions for each tile but after going through it that wasn't the issue.  What the solution was is something you never would have thought it to be.

Solution 1

So after a whole weekend spent on the bug my group and I had just about give-in up and thought maybe we should just remove the grid entirely. So prior to giving up I seek out help from the our mentor's aka professors and we spent 4 hours going line by line and they agreed that the math was correct and found it odd that the grid would RETURN earlier that expected.... SEE THE KEY WORD.... We had a return call stopping the whole functionality to operate correctly. It would return prior to getting the right solution always making it seem the math was wrong but it wasn't. I heard a saying when I first started coding... that saying was and I quote "Coding is 95% DEBUGGING 5% actual coding" and let me tell you that is so true.

Problem 2

For the 2nd issue it was more of a team struggle and that is Time management. This i knew as the project lead would be a factor at some point and I am glad it occurred earlier rather than later in the project. Since we are all remote, not all of of share the same time zones, and we all have other jobs this was going to be rather difficult and frustrating. It sucks we can't all work at together at the same time because lots of work gets loss in translation. But here is how I fixed that...

Solution 2 

First let me tell you it is hard to get everyone on at the same time, but man is it worth it. So the way I get everyone on at the same time is by setting a 1 hour meeting that is good for everyone at the same time everyday. For us that meeting is after our jobs or right before we leave for work. And in this hour their is no tom foolery, strictly business. Our meet ups have to be because we don't have a lot of time to talk to one another resulting in people's ideas not fully being implemented or that the idea was changed to something else entirely. In the end we all want the same thing. That is an EPIC game. So to solve this issue was to have strong strategy meetings and ensure the majority of the team can attend.

Get Quest for Dominion

Leave a comment

Log in with itch.io to leave a comment.