spacebruce.netlify.app

/notes/cute2D/

Notes
← Previous Format video for twitter
→ NextMahou Shoujo game design doc
Tagsnotes gamedev programming cute2D live2D
Posted2021-07-09
Updated2021-07-19

Cute2D (Live2D clone)


I dunno how Live2D works as I've never tried it or really looked at it in detail, but I'm gonna give this a shot anyway.

Dev thread link
Git link : soon™

Thinking out loud #

Needs #

Easy way to assemble faces (Specific bone types? Big friendly presets?)
Simple animation system
Different tween types
Tween between animation states (Standing -> walking -> jumping), dynamically figuring out limb positions
Bone/Parameter deformable surfaces (bounce, bounce!)
Easy bone info polling from outside skeleton.
De/Serialisable to a (borderline) human readable file (XML?)
also have a compressed/"compiled" binary file type for fast/cached loading
Multiple independent animation sequences (Face / Body / something).

wants #

Inverse kinematics for positioning limbs
low-ish resource usage (Build/cache vertex batch on update, submit on draw?)
GPU skinning (Complicated! But Possible?!)
Special effect bones/surfaces/emitters
Runtime bone adding/deleting without breaking anything
angle constraints
scripting language for taking inputs and applying to skeleton (eyeslook(x,y) -> transfomation chain)

Tentative Design #

Hierachy: Skeleton - Bone - Surface
Skeleton - Host for character data, bones, animation state, etc
Bones - the "shape" of the character. Big list of [length, angle] pairs, basically...
Surface - the "skin" of the character. Tethered to a bone, deformed to fit.
Parameters - transform bones from inputs... maybe have some sort of basic scripting/expression language for applying transformations...

Tentative Breakdown #

enum Cute2DBoneType
{
	Angle, Length,
}

Skeletal system #

classDiagram
class Cute2DCharacter{
	Bones
}
class Cute2DBone{
	Name
	Length
	AngleBase
}
class Cute2DSurface{
	xxx
}

Animation system #

classDiagram
class Cute2DAnimationSequence{
	Points : List(Cute2DAnimationPoint)
}
class Cute2DAnimationPoint{
	Position : Float
	Length : Float
}
class Cute2DAnimationBone {
	BoneName : String
	Type : Cute2DBoneType
}

Surfaces #

enum Cute2DSurfaceType
{
	Fixed,		//Connected to a bone, follows it exactly
	Stretch,	//Connected to multiple bones, stretched between them like a noodle 
}
classDiagram
class Cute2DSurface{
	Cute2DSurfaceType : Type
}

Parameters #