Progress update- an engine for gettin' grabby (Patreon)
Content
Crazy week! Life in Europeland is lovely. My grasp of the local language is woeful though >.>'
I'm skipping stream today btw, sorry! I'm living on my laptop atm cause I haven't had a moment to get the desktop running. I just need a lil more time to be ready for the logistics of streaming again.
New peeps here should be aware that we're working on a major, long-term engine upgrade and the next build won't be out for a while!
What's being worked on?
So this time, I worked on the bounding box code a bunch, and my partner had a major health event that turned into a 36 hour hospital marathon (they're fine, don't worry).
Last week I mentioned I'd need to ramp up to normal work hours cause it's a busy time. I was right for unexpected reasons. Luckily this happened in a place with sane healthcare conditions. So yeah, it's all good!
Anyway...
Bounding boxes are how the game knows where you're clicking, and what's touching what. It's weirdly complex. The thing that's thrown me off is getting the bounds of toys partially inside a character to register mouse clicks.
Bounding boxes have turned out to be one of those annoying code problems. A severe case of me wanting to be finished with it before I'm actually finished with it. Mapping coordinates to different systems is not intuitive to me, and I pretty much stopped working on them the instant they were functional before. Lesson learned- you pay for that kind of behavior. Gotta see it through even if it's hard >.<
So now, I'm taking the time to fully work out exactly how the code around complex bounds situations (as with penetration) end up playing out. This is core to the way the player interacts with toys in the game and it needs to be done properly.
Technical stuff alert! This is a quick description of the meaty engine work. Feel free to skip ^^
This won't be super readable since it's made for me and not for presentation, but here's how the first big refactor looked:
Before:
(don't yell at me about my nonsense formatting)
Each area of the bounding boxes code developed somewhat organically, so everything twists in upon itself and was very confusing in the code. This needed multiple recursive calls (as in, the code runs itself over and over until it finishes) and looking at it was constantly confusing.
I knew it wasn't ideal, so I decided to try refactoring it. Instead of going in circles, I tried using a more solid approach of making a list of everything that needed to happen, and going through each item once.
After:
It turned out to be an actually very simple structure once untangled.
- end of technical stuffs -
It wasn't until I made these charts and started implementing the new structure that I realized the whole reason bounding boxes have been so annoying to work- the code was too confusing for my brain to want to think about. Solving even minor problems meant trying to make sense of the whole tangled mess, and progress was grinding to a halt.
So, yay! It's untangled. Now to address the other issues that were so hard to work through before.
What this means
Once done with this, I'll be able to finally start putting together the true gameplay loop. There's still plenty to do... but! This is the final core engine feature needed to be able to interact with this game without the debugger open.
It's exciting! Though honestly I feel a constant sense of dread while doing engine work. Like I made a shameful mistake and I solve it quickly before anyone sees me. I'm not really sure what this process looks like to y'all, whether it feels like an endless technical slog, or you can feel the progress. But engine work is the least visual, least exciting thing to hear about, I imagine. It feels icky to have to say "yeah I'm just working on clicking the mouse. Now gimme money." I understand why game studios tend to just go dark for a while when they're doing stuff like this.
For the future
I'd like to do a better job conveying where we are in the whole process, and how much closer each step is bringing us. I think that'll be my homework this week besides all the code and coffee.
If any of y'all have feedback on what would help with this, I'd love to hear it!
...and that's all for now!
This had been the most nuts few weeks of my life. I'm ecstatic, both personally since I'm now living with my very cute partner, and "professionally" since the passion for game dev has never been stronger in me.
Somehow, this absurd thing I'm calling my "job" that you peeps pay me for has funded the biggest and most exciting step of my life so far.
I can only say thank you, and keep working on paying back the good will y'all have shown me.
<3