Top-Down Zelda Sword Arc

0 favourites
  • 11 posts
From the Asset Store
Set of tiles to create a map for top-down games with island theme
  • i.imgur.com/hfTeRBM.jpg

    That's what I have right now. I'm trying to have the sword arc 1/4 of the way around the player on click, with a cooldown so only one sword is created at a time. Haven't gotten it to work yet.

  • You may be overthinking it - try this https://www.dropbox.com/s/urj0lhkonwuix ... .capx?dl=0

    Cooldown system can be added separately, but in the example the sword sprite simply cannot be spawned if one already exists.

  • i.imgur.com/tFTwdN2.png

    I made a "lazy" version, but it looks horrible. There has to be a better way than this.

  • I have no idea what you want it to look like.

    Generally if you want it to look good, as in traditional animation, the entire swing should be drawn out frame by frame and collision boxes applied per frame as an animation, rather than moving and rotating a static sprite.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I have a method that may work for you, but it uses an entire animation (player, sword, and all) instead of pinning a sword sprite to the player and uses a player line of sight as replacement for collision boxes, just so you know.

  • Yeah I agree, but I couldn't figure out how to implement what I have now using that scheme. Right now I'm just redrawing it, but it should move naturally instead. I can't figure out how to get it to do that.

  • I want this to be multiplayer eventually, so I actually like that idea better. I'm all ears. This was just the "quick and dirty" way. Eventually players will be able to switch weapons and hands(reversing arc of sword) and use different weapons like 2-handers (a much wider arc).

  • I can't post URLS yet, but I did upload the version I have to the arcade. I can't see it under my profile yet, but it's there.

    here is the link if you can see it, if not I guess I'll just have to wait till I have enough rep.

    scirra.com/arcade/role-play ... ject-11263

  • Break up the http://www and the rest of the link to post long URLs without rep.

  • s c i r ra. co m/ a r c ad e /r ol e- pl ay i ng -g a mes/ new -p ro je ct -11 301

  • I understand now, so the events were to set an offset for the sword.

    To do so simply, you can just make a portion of your sword sprite transparent and set the origin a little farther away. Here it is in my example (still just a line though). https://www.dropbox.com/s/m1ogx3npzi13q ... .capx?dl=0

    If you look at the sprite in the image editor, notice that the origin point is in the transparent area and the the collision box is bound to the red "sword".

    But again, the key to making a fantastic animation is to actually animate it (either the player and weapon together, or weapon alone, it is up to you). Having the player and weapon sprites separate has its advantages, such as when you have a lot of weapons and don't want to draw the player for each weapon combination. The weapon itself can be animated on its own too though.

    If you're interested in art and animation, this is one of my favorite videos regarding animation techniques.

    Subscribe to Construct videos now

    And here is a reference for Zelda. https://s-media-cache-ak0.pinimg.com/or ... 1d7372.png

    While the Zelda style is still relatively simple, you can see that the sword swing isn't just a stick, they add swing lines to represent motion. Also, the animation of Link himself adds weight and substance to the sword swing as well. In Zelda, they use a single animation for both the character and weapon, as Link swings that single weapon as his attack 90% of the time.

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