And just like that, a year passes. Regardless, work has resumed on the box game. In the following gif you will see the automatic creation of new boards of squares. Right now it's running off of a timer, but eventually this will be the result of a successful mouse-over of the green victory box. I still need to have the boxes spread out from their starting point, and I still need to make the last set of boxes visually move backward, out of play. I hope you see the vision starting to come together, though!
There is a sizeable amount of hard-coded nonsense starting to grow. I took care of a bit by making some const variables, but there is definitely more to do. I wasn't going to let my coding standards keep me from making measureable progress, though. Step one is make it work, and step two is make it pretty. Now that I'm done with some step one, however, it'll be time for a bit of step two in my next update.
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.