Dev Roadmap #11: Rogue2D, Part 1 (Patreon)
Content
Introducing Rogue2D.
Let's start with what it's not:
- It's not a competitor for Live2D. It does a fraction of what Live2D does - the fraction that I care about. It is specialized for our usage and makes no promises to work outside of TNH. It is built off of Ren'Py.- It is not made for modders - it's a dev tool that can be used by modders. I've thought about the needs of modders extensively when creating it, but at the end of the day its purpose is to make my life easier and the game better.
Now that's out of the way, what is it??
Rogue2D is an animation engine, model format, and editor built out of Ren'Py. I have developed it end-to-end to address the issues outlined in my previous post and to serve as the foundation for all future TNH modeling and animation work. The result is something that reduces model production time by orders of magnitude, allows for easy model reproducibility and maintenance, enables whatever complex features I can think of, and facilitates end-user modding.
The best part? It's done. I am refining some advanced features still and likely will be tweaking for a long time, but the core functionality is ready and will be shipping in 0.9c.
Here is part one of a series on the features that I'm most excited about. I'm going to be glossing over technical details that I'm very excited about, so please feel free to pose any questions you have - you're most likely to get a response in dev-questions or q+a in the Discord.
1) Model format
The majority of model organization is described by a series of modular jsons, chosen for human readability and easy version tracking. An example:
```json// standing.rogue2d.json - a manifest ties the modules together{ "name": "standing", "canvas": { "width": 2500, "height": 5000, "origin": [0, 0] }, "modules": [ "art", "clothing/top_black_lowcut_top", "clothing/pants_black_tight_jeans", "clothing/footwear_black_strap_pumps", "arms", "faces", "states", ]}```
```json// clothing/footwear_black_strap_pumps.rogue2d.json - a module is just named groups of layers{ "module": "clothing/footwear_black_strap_pumps", "groups": [ { "name": "footwear_black_strap_pumps", "members": [ "footwear_black_strap_pumps_right_shadow", "footwear_black_strap_pumps_right", "footwear_black_strap_pumps_left_shadow", "footwear_black_strap_pumps_left" ] } ]}```
```json// arms.rogue2d.json - a group can also drive effects that reach across other groups{ "module": "arms", "groups": [ { "name": "left_arm_neutral", "members": ["left_arm_neutral_shadow", "left_arm_neutral"] }, { "name": "right_arm_neutral", "members": ["right_arm_neutral"] } ], "effects": { "right_arm_neutral": { "darken": { "clothing": ["bra_black_cami_tanktop_0_shadow"], "body": ["left_leg_shadow", "right_breast_shadow"] }, "squish": ["bra_black_cami_tanktop_0_squish", "pants_black_tight_jeans_0_squish"] } }}```
2) Model importing
The PSD-to-model pipeline is straightforward enough to script to fit your workflow. On my workflow, this turns an all-day affair that drains my joie de vivre into a 10 second process. Even with more advanced features requiring intense computation, I can import static versions of all game models to-date in an afternoon, and the results just work in-game.
Importantly, this workflow produces a deterministic model output, obviating the need to second-guess how Ron did things a year ago in a sleepless stupor.
A separate set of jsons provides override capability - what this means is that your hand-edited changes to either model organization or things like animation and physics are preserved across model import. Your work is safe.
And you can build complex logic into this workflow: I spent a ton of time working on polygon packing for the texture atlases, which lets me densely pack drawables at high resolution (see example). Translates to higher-resolution models for the same disk and VRAM usage.
3) Model editing
Editing all happens in the Ren'Py engine, so we can see exactly what a model will look like for a player and edit during relevant scenes. Here is an example of a preliminary interface I've set up for myself.
Both the model format and the editor support advanced features like the convergent deformer setup I described in my preamble. The same deformer can be applied to all layers touching a given body part even if they are in different part groups, so we can have our cake (control conceptually-linked model parts with simple toggles) and eat it too (maintain a minimal set of deformers and parameters).
4) Modding
Add-on modules are first-class citizens in this setup. You can add/overwrite custom textures, add your own effects or overwrite model logic, you can alter physics or animations, etc. - all in a non-destructive way that preserves the original model for easy reversal. You simply create an overrides or add-on subdirectory that contains modules that mirror the parent directory's organization:
```
standing/ the base model├── standing.rogue2d.json manifest (lists every module)├── art.rogue2d.json drawable information├── mesh.rogue2d.bin packed meshes├── orders.rogue2d.json draw order├── arms.rogue2d.json├── faces.rogue2d.json├── states.rogue2d.json├── atlas/ texture pages├── clothing/ one json per clothing item│ └── ...└── addons/ <- drop-in, mirrors the base └── black_cage_thong/ ├── art.rogue2d.json new art ├── mesh.rogue2d.bin ├── orders.rogue2d.json where the new layers sit in the stack ├── atlas/ ├── clothing/ │ └── underwear_black_cage_thong.rogue2d.json```
An `overrides/` folder works the same way, for non-destructive tweaks to the base model itself.
Additional helper scripts then help you to make sure your add-on interleaves properly with the base model.
I will provide barebone template PSDs and basic scripts to modders so that they can create these add-ons themselves. Models support unlimited add-ons that compose and merge gracefully.
Power to the fucking people.
I will be posting a sample model to the Discord.