Sunday, 24 February 2019


Sup, you beautiful bastards, hope you're having a disingenuous Sunday, my name's Chocko Ox and let's just jump into it.

For the first week since this time last year, I broke the chain, feels bad man, press F in the chat.

New job schedule and homework is kicking my ass, leaving very little time during the week for game development but I'm learning a ton about programming so I'm still feeling pretty accomplished at the end of the day.
Naturally what I really want to be doing is the game, so I get in what time I can. It's not forever, just another few weeks I think, then I should be through my training and I get my evenings back.

Either that, or until I learn how to write a program to round up fractions of a penny off the innotek account, then the embezzlement arc can begin.

If one more person points a fucking gun at me today I'm gonna go nuclear

Today I spent 5 straight hours refactoring the player side of the battle system, handling the menu states and transitioning between them, totally replaced the movement mechanic and reliance on creating new objects for targeting and move path drawing.
It was probably the oldest code I still had in place and it was a FUCKING MESS, it was the most embarrassing thing and I've been putting off rewriting it for way too long.
Really makes me feel like I've come along in the last year.

Anyway, there were a handful of issues that reared occasionally and rare as they were, they were all pretty bad and included:
>tiles being left behind in rare circumstances
>tiles not showing up in rare circumstances
>events (tiles) can't be deleted outright, only hidden away and marked for deletion next room change
>long, long battles could potentially create thousands of tiles, which is why you might not be able to save after the big fight in the demo, it gets straight-up rejected by the save system saying "nibba I ain't saving all that to JSON, you can fuck off"
>sometimes, very rarely when running heavy debug output, the player move wouldn't complete fully, so you'd spend 5 points to go 4 spaces or 1-space moves wouldn't occur at all

There are likely a bunch of other little knock-on effects, but this was the biggest thorn in my side for the last few months, and I'd put a lot of small fixes and fail-safes in place to minimize its impact, and for what, exactly? It was just dumb.
NOW, post-refactor, there is ONE tile. That's it, there's just one for the whole damn system, and it fucking flies, man.

I set up a little check on map load if this is the first time this room has been accessed before, and on the first entry, a battle tile is made and stored, invisible, off-screen in that room.
That's it, then, it just works happily after that and initializes itself like other objects, tells the battle system its ID, so if battle breaks out in that room, he's your guy.
A billion problems, checks and workarounds resolved in 5 hours. Now back to animating; shooting a torrent of jizz into this young lady or working on a scene I've had written for a week.
I don't quite know yet, but it'll be a nice evening, whatever.

This gif is for good boys who click below to donate energy. You no click, you no look!

Thanks for reading, bros, I hope you're doing well.