Wednesday, May 17, 2023

Head-scratching time with Monster Spritesheets

So tonight was a bit of an evening of code that sat me right down and told me I'm a little fish in a damned big pond. I am still working on the code for monster encounters, focusing on trying to somehow refactor all the little things that are currently working in place-holders into something more cohesive and functional. At the same time, I'd ideally like to write the code in a way that is going to work nicely with the editor interface that I will have to write to create all the assets with.

So, I started looking through a number of sprite sheets that I have bought over time to use, saw that they are by many authors (there's not really a go-to artist that has ALL the stuff you want) which is fine, but that leads to inconsistencies in things. Obviously they are in different scales, different resolutions, but here's where it starts getting tricky. They're in different quantities of facings, often with different possible actions (and with different quantities of those even). So one model might have facings in eight directions, with three different attack animations, a walk, a run and a death animation. Cool. But the next author did his animations with four facings, one attack - but there's a special animation to fly - and it comes with a launch, then a looping fly, then a land animation. Oh, and there's an attack animation for flying attack - and an attack animation for landed attack.

You can see why I'm basically sitting in the corner of the shower weeping on this one. There's going to have to be a bunch of changes to the way the engine renders models to handle the different pixel sizes (which is the easy part) but I'd ideally like to have some sort of interface to be able to handle giving monsters multiple animations for different actions, potentially link each animation to a specific action (use this for spell-casting, these THREE for melee,  this for defending). Oh, and here's the kicker. The sprite-sheets are all in different formats, so.... I'd also like to build the editor interface in such a way that I can upload a full sprite-sheet, tell the interface what pixel size the sheet is in, then be able to input a facing, an action name and a animation frame count and have it build up not only a new sprite-sheet to use in the game itself, but also the associated metadata to build those objects in the app itself.

Good brain-make-thinkings and honestly, these sorts of things are half the reason I'm coding the damned thing in the first place, but yeah, tonight was a night I thought I'd have it easy and instead I got a bloody nose and little to show for it.

No comments:

Post a Comment

Teleports & Location-Swaps working

A rather productive Friday evening it has been. I've managed to expand the code that deals with special combat events, and successfully ...