PpdEditor v0.1.0 is released


PpdEditor is an editor for paperdoll, a 2d paper doll model. The goal of it is to make sharing paper dolls between different games easier.

Main Concepts

The paperdoll model consists of three parts: dollslot, and fragment.

Doll

Dolls are the fundamental parts of your model. Normally, they represent faces, bodies, or any other assembled objects in your projects. A doll contains multiple slots.

Slot

Slots are where your paper doll can have alternative styles. For example, in a doll that represents a human's face, they could be eyes, mouth, nose, and so on.

A slot can be placed in different positions inside the doll (eg. slot of eyes). Not all slots need to have images to be shown, they can be empty. For instance, an empty 'hair' slot means that the person is bald.

Each slot has several alternative images to display. they're called 'candidates'. And those candidates are all defined as fragments.

Fragment

Fragments are image assets that you can put into a slot as candidates. In paperdoll, all fragments are raster images. One fragment can be used in multiple slots.

There are two ways slots and their fragment candidates are connected.

  • Constrainted. The fragment acts like the background of the slot. It will fill the whole space of the slot and resizes if needed.
  • Non-constrainted. Slots and fragments are connected like mortises and tenons. There is an anchor point inside a slot. When a fragment is placed into a slot, the pivot point of that fragment will be placed in the same position as the anchor point. The fragment remains its original size and resizing will never happen.

Below is a brief chart showing the main concept of paperdoll.

Editor

The editor is an open-source and cross-platform software, written in Rust and powered by eframe.

The editor provides a built-in example, you can open it from the file menu.

Once you have your works done, you can save it as a ppd file.

Use Paperdoll in Your Game

paperdoll provides a Rust sdk for you. Here is a brief guide to load the paperdoll model and render it in your projects:

  1. Use paperdoll-tar to load a ppd file and get the PaperdollFactory struct.
  2. Listen to the user interactions in your game, then change the actived doll id and the fragment id to be displayed in a slot.
  3. Ask PaperdollFactory to render the paperdoll into pixels, eg. use PaperdollFactory::render_paperdoll.
  4. Render the returning pixels onto the screen.

Files

ppd-editor-windows-v0.1.0.msi 8.4 MB
Aug 10, 2023
ppd-editor-linux-v0.1.0.tar.gz 8.5 MB
Aug 10, 2023
ppd-viewer-linux-v0.1.0.tar.gz 7.7 MB
Aug 10, 2023
ppd-editor-macos11-v0.1.0.tar.gz 4.7 MB
Aug 10, 2023
ppd-editor-macos12-v0.1.0.tar.gz 4.6 MB
Aug 10, 2023
ppd-viewer-macos11-v0.1.0.tar.gz 4 MB
Aug 10, 2023
ppd-viewer-macos12-v0.1.0.tar.gz 4 MB
Aug 10, 2023

Get PpdEditor

Download NowName your own price

Leave a comment

Log in with itch.io to leave a comment.