Anarchid Posted February 12, 2013 Report Share Posted February 12, 2013 After some lurking in #0ad-dev, i've finally decided on actually starting a forum topic to discuss "howto" approaches to a game mechanic that i wanna use for my own little hobby project.Here's my noobish technical idea on what i want to do:What i want is: an ability to attach an Entity A's Actor as a prop to Entity B's Actor, so that they are animated in sync. Bonus points if attachment is adjustable as per it's completeness (so either snap-to-prop-point without inheriting transform, or different animation name for "prop" actor to be allowed bitmask-style) - and then animate the conjoined entity seamlessly.Since i think the information flow between Simulation and Rendering is allowed to only be one-way, i cannot achieve this by simply snapping one entity to a specific position in the game world, so some way to tell the rendering to animate the models in this way is required?And here's what i want to do actually:1) Grab Attacks. Imagine a vampire capturing its victim in stranglehold and then slowly extinguishing its life unless killed - all the while they both struggle in sync. (this is where the noobtech suggestion of "separate animstates" is relevant, so that vampire plays "grabbing" animation and victim plays "grabbed".2) Tank Turrets. Imagine the "carrier" unit having its own rotation, while the Turret is both separately targetable and destroyable, as well as able to pick its own targets. This is where snap-without-transform noobtech idea is relevant, because turret should have at least one axis of freedom.There are likely ways to implement this that are completely different to my noobtech approach - and i'll gladly hear them out (as well as pointers of how to implement my approach if it's actually the only/the optimal one) Quote Link to comment Share on other sites More sharing options...
zoot Posted February 12, 2013 Report Share Posted February 12, 2013 As far as syncing animations goes, there is some kind of support for that in the Visual component:ICmpVisual::SetAnimationSyncOffsetICmpVisual::SetAnimationSyncRepeatI have not used those functions before, but I imagine you could send a message from the "vampire" entity to the "victim" entity to tell it at which point in time the animations should be synced against. Quote Link to comment Share on other sites More sharing options...
Anarchid Posted February 12, 2013 Author Report Share Posted February 12, 2013 Just to bump a bit: Did i say tanks? Did i say tanks? Ignore that boring modern crap.Here's something vanilla 0ad could definitely use: chariots that don't snap the whole cart-horse assembly towards enemy when shooting, but instead only let the guys turn. Quote Link to comment Share on other sites More sharing options...
Lion.Kanzen Posted February 12, 2013 Report Share Posted February 12, 2013 (edited) Just to bump a bit: Did i say tanks? Did i say tanks? Ignore that boring modern crap.Here's something vanilla 0ad could definitely use: chariots that don't snap the whole cart-horse assembly towards enemy when shooting, but instead only let the guys turn. Persian Chariots or Archer cavalry, i dont know XD Edited February 12, 2013 by Lion.Kanzen Quote Link to comment Share on other sites More sharing options...
Anarchid Posted February 12, 2013 Author Report Share Posted February 12, 2013 Persian Chariots or Archer cavalry, i dont know XDExacty. Except not turning the entire cart, horse, and people towards the enemy, and only turning the shooty bits, thus allowing shoot-on-the-move. Quote Link to comment Share on other sites More sharing options...
Lion.Kanzen Posted February 12, 2013 Report Share Posted February 12, 2013 Exacty. Except not turning the entire cart, horse, and people towards the enemy, and only turning the shooty bits, thus allowing shoot-on-the-move. and mauryan chariots?, triremes? Quote Link to comment Share on other sites More sharing options...
Anarchid Posted February 12, 2013 Author Report Share Posted February 12, 2013 (edited) You can do anything at zombocom, anything at all! Now, let's power down the derailgun Edited February 12, 2013 by Anarchid Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.