Oh wow, I had no idea I posted this over a year ago. Time flies.
Zeran's Folly is still in development. Here are some updates from last time:
In game, you can switch between the four different characters at save points or by using a special item. You can see it here as sort of a proof of concept:
To switch the textures, I mark the player object as invisible, replace all the textures in a separate thread, then make the object visible again. It's not the most efficient if you want to swap characters a lot but it works. It'd be better to use a pointer and keep the textures around instead of reloading them all the time whenever you switch characters.
However, I'll have to update this approach as I've been using
Spine to replace my sprite sheet characters with dynamic models. Here's a demonstration between the two types (the smoother one is the Spine model):
Code-wise, Spine is kind of a pain in the ass to use with SFML because Spine's API uses C structuring instead of C++ so there are no classes. Instead, it's a bunch of spClass_Function(args) calls which all return pointers. But, once I got it figured out, it worked well. Visual Studio's Intellisense/autocomplete is a godsend for APIs.
One reason I switched to Spine from sprite sheets was the ability to have custom skins without having to generate an entire new set of sheets. It's not a big thing but I love having alternate outfits for my characters! Here are some examples:
Lone:
Lydia:
Abby's new model with an alternate outfit:
The different skins all use the same underlying structure so there's no need to make new animations or anything. Pretty sweet!
Finally, here's a concept for the Tomb of Kings, a new area in the works:
I've been putting together a Level Art Generator that uses sfVertex shapes and custom shaders to draw the background art. This particular scheme isn't done yet--the concept serves as the guide to what steps will be needed to make it happen. For example, these would be the steps for this scene:
- Draw the stepping stones for the walkable path
- Draw the base rock texture on a different renderTexture
- Outline the rock texture using a shader that draws and antialiases a black outline
- Draw the reddish-orange highlight around the rock edges using a shader to find the edges
- "Light" the rock texture using a shader that determines the pixel's distance from a zero-alpha pixel. The further away, the darker it is.