So, my code work has been continuing - and I'm coming into a weekend, where I generally get a lot more game code written up and the code is currently promising in a great way.
I've done a ground-up rewrite of the code that handles monsters or encounters BEFORE you get into combat with them - so basically when they are still wandering about in real time on the screen, possibly attacking you, or minding their own business, whatever the case may be.
The original issue that was on my fix-list for ages was that these things were basically not linked to the world - but rather pretended to be linked to the world via the an offset to the player. That worked. Kinda. Until it really didn't. As the game does more and more, it became more and more obvious, that sometimes, there was a frame rendered to the world BEFORE the offset was updated after you moved. Then, it was immediately updated - which means that the monsters basically skipped up and down a section of world. Non-programmer version? Monsters looked janky AF as you moved about.
So, I'd had a rewrite on my plan for ages, and I've been chipping away at it for a few evenings now. First, I broke everything on purpose as I changed the way the code handles movement of creatures and how they are treated in the world. Then I started updating the rendering subsystem to pick up these new things and render them into the correct place in the world. Finally, I've also been working on a bit of code that was long missing - monsters didn't DO anything to you until you got into combat with them. They looked like they were attacking you, they muscled up into your face - but they weren't actually doing anything. Well, now, they do. Like they were always meant to. You have a mage there very annoyed about your intrusion? He's going to be casting the spells he knows at your party. You have a goblin warrior who yo9u've stumbled upon? Yup, loads of sword swings coming your way. When this happens, you have the option of initiating full combat, or, you can try to leg it weathering the blows until they stop attacking.
But the good news, is that those things now work. There's still a bunch to do, but that's a great start leading into the weekend.
No comments:
Post a Comment