Jump to content

Simulating sword slash with tween or animating + update coords


jaru
 Share

Recommended Posts

Hey Folks,

I have been playing around with phaser for some time making simple stuff. But for my new project I would like to try to make a Fighter game.

I would like to make a character that is capable of attacking and has fairly good hit collision with other entities in game.
Since this is more of a theory question. I will try to explain my approach.

The character is group. Made with 3 parts. Body(sprite), arm(sprite), sword(sprite, for example 20x80, angle: -90).

Now I would like to make the sword angle to go down from 90 to 0, aka simulating an attack. I get that I could just change the angle.

But I also would like to smoothen the animation with the arm moving and the sword moving( to make it look like slashing ).

This is kinda the setup in my mind. Now I would like to know what physic to use( planing to use arcade for simplicity sake ), Should I do this with tween? Or should I update the rotation and play animation?

idk. if this is important, but the attack should also be I guess timed, so that you can't just hold the key and keep on slashing, but it deals damage, per attack (animation that would be like 0.3s long)

Is there a better solution, approach that I could check out? 

p.s. I know this might seem like a mess post, i was trying to brainstorm and get some advice/ theory on how to handle such a thing. Would like to think that someone has already made this sort of game.

Cheers,

Jaru

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...