It sure doesn't take long to start refactoring code. Step one was getting it to show up on the screen, and step two was to immediately reorganize the code that I just wrote. I'm now able to create a board (set of blocks) of any positive, odd-numbered size, e.g. 3,3, 7,5, 193,167, and so on.
Not only is it helpful to make the code easier to understand & edit, it was *necessary*. I needed to have a way to build multiple boards, as each time you mouse over the winning block a new board is built. I'll hold off on posting a screenshot at this stage because it'll all make sense once I program it. ;)
Hello, and welcome to my first update on "The Box Game" (working title). It's been at least a decade since I last worked on this project, and that's mostly because it was one of the few projects I could consider *complete* from my directx days. I'm reprogramming it in the browser in 3D for all to enjoy... ...and so you don't have to download an .exe file from a website you've never heard of!
How about a couple gifs to get us started?
That first gif shows my initial work getting the project up and running. I added a 3d library, generated a grid of boxes, and used a tweening library to move the camera into place. Not all of this is intended to make it to release, but it's enough to get the general idea on the screen.
The second gif shows a quick addition of mouseover detection. I turn the boxes red whenever they're hovered over. If you open up the console, you'll see a "You Win!" message to go along with it. ;)
Going forward, my next steps are likely going to include generating the grid of boxes in a single point. From they're they'll expand outward into their grid. I'll need to make that section of code repeatable so that once you mouse over the green box it generates a new grid from that box's coordinates. The ever-repeating grids will eventually become more and more filled with white boxes, making it harder and harder to find the green one.