Alpha Devlog 4: New Puppets
Foundations:
If I had a nickel for every game I released, I'd have two nickels. Which isn't much, but it's strange that it happened twice. And to make sure it keeps happening, I'm trying to make as much things reusable as possible.
Ero Dungeons already took some parts (the character model setup, basic scripting, scene system, overworld movement, resource system, saving) from Ero Witches, which saved a lot of time. Ero Hunters is built on the code of Ero Dungeons (though a lot had to be scrapped), these are the foundations it's building upon:
Data Editor:
The data editor was added around Christmas last year. It makes it possible to edit the game's content in-game. It provides automatic validation: does this icon exist? is this script correctly written? did you make typos? and so on. For Ero Dungeons most of this is left unchanged. It makes prototyping extremely fast and painless.
I've added some improvements to automatically enrich the data from the editor into the game as well. For example, it turns the text "10" into the integer 10, and automatically groups stuff. Previously this was programmed manually in a 1000+ line file, which wasn't optimal.
Further, I've improved the visuals of the Data Editor. For example, it immediately parses the scripts to show what they will look like in tooltips. Now that tooltips have subtooltips and can be more convoluted this is a must.
Scripting:
Scripting has been fully reworked in Ero Dungeons 1.4 and it is great now! The changes are listed at https://erodungeons.itch.io/ero-dungeons-mods/devlog/776039/modding-guide-script...
Combat:
Combat was an absolute mess, and I expected that I'd have to rebuild everything from scratch. Fortunately, it was just an absolute mess, and cleaning it up was sufficient. It still took a while. I had to decouple the visual side of things from the code side, but improvements in moves and puppets also allowed for a lot of simplifications.
Scriptable Item System:
When the game needs to know the health of a player, it goes through every scriptable item of that player and looks at the effect it has on her health. This system is extremely robust and bugfree. I've used it since Ero Witches, and I'll keep using it here. The main thing I'm expanding it with is automated saving of items. Previously I had to program this manually. This wasn't just a lot of programming, it was also prone to bugs which could remain hidden for a long time.
Puppet Rework:
The biggest technical change in this game will be the Puppets. First some terminology: the small player sprites in the overworld are Small Puppets, the big ones in combat or in the menus are Medium Puppets.
Reason for change:
In Ero Dungeons these were handled completely in-engine, using Godot classes like Skeleton2D and Bone2D. Any changes to them had to be done in the Godot Engine. This meant that they couldn't be modded, but it also meant I couldn't easily change textures. Making changes to textures outside of the engine would break the Puppet inside the engine. As such, scaling, renaming, or moving, was impossible.
Most importantly, the rework allows for a faster workflow. Instead of relying on what the engine provides, I can set up shortcuts for common actions. I also use the Godot Skeleton system in a very limited way, this means I can significantly speed up the animation process by removing the steps that are always the same. For example, I always only move or rotate bones, and when I make a keyframe, I want to make a keyframe for all bones. This is a lot of clicks in Godot, but only one in the in-game Puppet editor.
Here's a video of a Ratkin in the new system: https://x.com/madodev18/status/1849350218044600443
What Changed:
Redraws:
I redrew the Medium Puppets (obviously), while keeping the Small one the same (though I did have to rename parts of it). The old chibi Puppets were a bit scuffed, they had a broken back and were hard to animate. The new Medium Puppets also have hands instead of potatoes, which became possible due to the "variants" discussed below.
Setting Bones and Layers:
Setting up the puppet is now extremely simple. Changing the order of drawn layers is also very easy. This speeds up the process significantly.
Stances:
Stances are different forms of the same Puppet, they may use some of the same textures, but have a different underlying bone structure. The main point is that the game should be able to switch between them. An example is the Small Puppet, which has a front, back, and side stance. They share some textures (the legs and arms for front and back are the same), but have a different underlying skeleton. However, they can't be different Puppets since the game has to be able to switch between them without lag. A similar use-case is kneeling. This had to be painstakingly done manually before.
Duplicates:
Most left and right arms are the same. It doesn't make sense to draw them twice. The game now allows specifying that something should be duplicated, cutting down the amount of things you need to draw. Of course, it would be silly if a character were forced to always carry two bows, so you can disable it for specific textures. This speeds up the drawing process.
Variants:
The problem with hands, and especially fingers, are that they tend to move. A hand pose that looks great as an idle will look horrible on a hip, or when holding a bow. That's where variants come in, these are alternatives of textures that are set by the animation. This way, a ratkin can use her claws when attacking, while returning to her hands-on-hip pose afterwards. Or a character can hold a bow without breaking her wrists.
Commands:
Godot allows animations to perform random methods. This is great, but quite a lot of clicking to set up. Commands automate this. An animation can, for example, have a command to switch hand variants at a point in time. It's a very versatile system, that will no doubt come in handy in the future.
Optimizations:
The old Puppets were slow. Whenever - for example - the game wanted to change the haircolor or a piece of equipment, the entire Puppet had to be removed and built from scratch by the engine. In combat this would lead to noticeable stutter. For curios like the Tavern, which equips a full bunny suit, this could even freeze the game for multiple seconds (each equip or unequip operation would cause a full rebuild).
Now, the game looks what actually changed for the puppet, and only changes that. It allows seamless attachment of equipment.
See an in-combat equipment attach in action here: https://x.com/madodev18/status/1849358154171126240
Ero Hunters
Catch, Breed, Conquer
More posts
- Version 0.0.3: Upgrades3 days ago
- Alpha Devlog 9: Some Streamlining10 days ago
- Alpha Roadmap16 days ago
- Alpha Devlog 8: Progress Report23 days ago
- Alpha Devlog 7: Overworld Mechanics30 days ago
- Alpha Devlog 6: Progress Report38 days ago
- Alpha Devlog 5: Some UI stuff51 days ago
- Alpha Devlog 3: Combat Changes65 days ago
- Alpha Devlog 2: Curios and Hair72 days ago
Leave a comment
Log in with itch.io to leave a comment.