Adam's Lair Forum

game development and casual madness
It is currently 2020/02/25, 05:11

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Scml4Duality
PostPosted: 2015/05/16, 17:38 
Newbie
Newbie

Joined: 2015/05/12, 19:18
Posts: 5
Role: Hobbyist
Quote:
Meanwhile, just mentioning here since it's not worth it's own thread yet since it's just few empty classes and lines of code, I'm trying to implement a Spriter integration to Duality engine: https://github.com/Trebgarta/Scml4Duality


Just putting this here to ask my questions. I've got some architecture ideas but nothing much.

I'm thinking about having a modular solution for animations. Using different humanoids and equipments with same animation data.

As far as I could figure out, this is the XML output format of Spriter:

<SpriterData>
-Folder(s)
---File(s)
-Entity
---Object(s)
---Animations
-----Mainline
-------Keys
---------Bonerefs
---------Objectrefs
-----Timelines
-------Keys
---------Bones
</SpriterData>

Reference, Example

From what I've seen of skoggy's Spine plugin, he directly rendered the skeletal mesh to the screen. Should I design this the same way, as a renderer?

I thought about having Sprites as limbs, and translating them as the XML commanded. For each "object" Spriter had, there would be a limb. Would that be suitable? That would mean ignoring files and folders, and having resource references instead, since SpriterData wouldn't render stuff, but instead transform them.

Each limb having a different transform and rigidbody may be costy, but would be more modifyable I think. Also, since animations would translate the entire limb (a gameobject) rigidbodies would be simulated more correctly.

What are your thoughts about this? Also, what is a rigidbody joint, and does it conenct two different rigidbodies?


Top
 Profile  
 
 Post subject: Re: Scml4Duality
PostPosted: 2015/05/16, 17:50 
Site Admin
Site Admin
User avatar

Joined: 2013/05/11, 22:30
Posts: 2073
Location: Germany
Role: Professional
Just weighing in here to comment on this in particular:

Trebgarta wrote:
Each limb having a different transform and rigidbody may be costy, but would be more modifyable I think. Also, since animations would translate the entire limb (a gameobject) rigidbodies would be simulated more correctly.


I'd strongly advise against modeling the system in a way that each animation bone / limb is a separate object in Duality. As you mentioned, it would be more costly, but it would actually be much more costly when having more complex animations - both in terms of simulation and rendering.

A single renderer Component that draws everything at once will not only be easier to handle editor- and game-wise, but also be much more performant, because it can submit all of its vertices at once, rather than split into a lot of sprites. Also, having a RigidBody for each bone / limb would very likely just get in the way of the animation and not provide a lot of value. If you're animating a character, the usual practice is to simply have a single capsule-like RigidBody at its center and that's it - and usually, no-one even notices. :)

Trebgarta wrote:
What are your thoughts about this? Also, what is a rigidbody joint, and does it conenct two different rigidbodies?


Yes. That's exactly what it does ^^

_________________
Blog | GitHub | Twitter (@Adams_Lair)


Top
 Profile  
 
 Post subject: Re: Scml4Duality
PostPosted: 2015/05/17, 14:00 
Newbie
Newbie

Joined: 2015/05/12, 19:18
Posts: 5
Role: Hobbyist
Thanks for your opinion Adam, another idea:

ScmlObject will report what to draw to the engine as one whole. Meanwhile, it will also send some transforms, bone locations, to attach other objects to as children: A picked up object attached to hand bone, clothings attached to body bone etc. Thing is, Spriter can do this with character maps, but I don't want to rely on that too much apart from animations, and be able to edit stuff more frequently.

Also attach some rigid bodies to those transforms too, as shields that collide with projectiles beforehand, that can be put up or down, or a head rigidbody determining headshots more precisely since it follows the head bone.

Anyway, instead of writing everything from scratch, I'm going to modify and adapt terinfire's library, redone the git repo for this. It was the only API that didn't rely on anything else (e.g. XNA or Unity)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group