[SOLVED]Complex, multi part sprite animation

This forum is currently in read-only mode.
From the Asset Store
3 pixel charaters with over 8 animations each + animations with a gun
  • Hey guys me again

    This time i need an adive/tutorial/hints about complex sprite animating.

    Animated sprites are made by frames. Each frame consist of a whole picture with changing elements. But sometimes not the whole sprite changes from frame to frame.

    Imagine a police car sprite from topdown view. The only thing that actualy changes is the light on top.

    So what i need to figure out is a to have a sprite + microsprites. So they are being aminated independently from each other. So for example if i want i can turn animation of the lights, or flame from wheelr or laserz - or whatever.

    Now howcan i manage this?

    The only way i know as for now is to create a seperate sprite and via events set its X/Y to image point and run on "always". But now i think about 100 of such sprites and so much X/Y being conctantly adjucted would propably tire the CPU and would trash the event sheet.

    Any idea of more elegent solution? to link that sprite animation?

  • I'm not sure if the bone behaviour does rotation properly, but it is worth a try. Setting the X and Y of each object will probably run faster than 100 objects linked up by the bone behaviour though

    You could try creating families of similar sprites and then put them in containers, they will then link up to their correct main body and it will reduce the amount of events you need to write. The end result will still be those sprites being processed in large amounts, but Construct can probably handle it without dropping (m)any FPS.

  • oh really? hmm. thought Beh's are executed faster then events. what a shame

    Some nice tut on this method with fammilies would be greatly aprreciated.

    Oh and it bother me - its quite plain to link sprites via X/Y event if they are pre-made.

    But what about the one that are spawned, created?

    Think: monster spawner. each monster is made out of 3 individualy animated sprites that creates the whole. But they are being spawned from sprite X - the spawner.

    Making the spawner create new monsters sounds very easy. But to make him spawn them in couples of 3, when each should be attached in a precise manner to each other... thats beyond my knowledge. and then, if i would use X/Y event tracing - how i am supposed to make it trace each new psanwed mosnters and their elements?

    i mean okey:

    if always -> set Mob Tail X, Y on image point "tail start" of Mob Main body

    but then if i spawn lets say 10 of them each will get glued to one mobs, em i right?

    UPDATE:

    ive managed to get a grip of the fammilies linking method but for some reason i simply cant set the angle of the sub-sprite which is odd.

    When i try to

    if always -> set angle Family_sub.angle to Family_main.angle

    it just doesnt work. I mean, the second family is not even there to pick or click. and if i type the expresion by hand it says that there no such expresion.

    http://dl.dropbox.com/u/15566547/turnleftright.cap

    UPDATE2:

    oh okey now it works. instead of using family angle i just used sprites angle

    http://dl.dropbox.com/u/15566547/turnleftright%202.cap

    Works like a charm. Thank you Jay

  • Heh, no problem, I'm just happy it works!

    Thanks for sharing your solution though, hopefully other people who have the same problem can learn from the cap

    Families can sometimes have bugs though, so keep backups incase you stumble onto something that breaks your cap!

  • [quote:1sv71nl7]Families can sometimes have bugs though, so keep backups incase you stumble onto something that breaks your cap!

    now you scared me

    ._.

  • yeah, be carful with families. Few days ago I deleted one object (who belong to a family) and few hours later I got an error massage trying to save my cap...

    Just always remember to save before you add, remove or do something with families.

  • Events with families work pretty fine though, it's just whenever you change private variables, behaviours, or actual objects. That's when you need to be careful.

  • Events with families work pretty fine though, it's just whenever you change private variables, behaviours, or actual objects. That's when you need to be careful.

    hmm. this is troubling.

    PV - you mean PV's of the whole family or just its members?

    Beh's - do you mean like turning beh's off or like for example: changing 8dir beh speed?

    Object - whta sort of changes can be classified as this? i mean is frame/animation changes safe?

    on example:

    I have lots of enemy mobs. Many mobs are made out of couple of sprites linked togather. All of them have also PV's for their ammo, HP, alertness and many others. They also are all animated and have some custome animations displayed under precise circumstances like death, running away, agressive, shooting etc.

  • > Events with families work pretty fine though, it's just whenever you change private variables, behaviours, or actual objects. That's when you need to be careful.

    >

    hmm. this is troubling.

    PV - you mean PV's of the whole family or just its members?

    Beh's - do you mean like turning beh's off or like for example: changing 8dir beh speed?

    Object - whta sort of changes can be classified as this? i mean is frame/animation changes safe?

    on example:

    I have lots of enemy mobs. Many mobs are made out of couple of sprites linked togather. All of them have also PV's for their ammo, HP, alertness and many others. They also are all animated and have some custome animations displayed under precise circumstances like death, running away, agressive, shooting etc.

    By change, I mean (sometimes) adding or (mostly) removing them. Changing their values, graphics, animations, and settings is fine. Just plan ahead so that you don't need to add/remove things to the families too often, as it doesn't go smoothly every time.

    Sorry for the confusion

  • oooh. Okey so removing/adding family members is dangerous. em i correct?

    thats so sad

    i wonder when(IF!) itll get fixed. Sounds like a major kick in the balls if you dont backup your caps that offten.

    Hell! i am scared that i might one day forget to do backup and ill loss days of hard work

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • oooh. Okey so removing/adding family members is dangerous. em i correct?

    thats so sad

    i wonder when(IF!) itll get fixed. Sounds like a major kick in the balls if you dont backup your caps that offten.

    Hell! i am scared that i might one day forget to do backup and ill loss days of hard work

    Well, families have been improving with each new release, so it's probably not as bad anymore. But yeah, always stay on the safe side.

  • Hello, do you still have your solution?, I need to make something like this too

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)