I need a swordfighting style engine. I got some theories on how to do it, ie. making the animations and the swords seperate and having the sword animate according to to the sprite animation and the hot spot of sword being on the action point of the sprite... but, it's very tedious, and in my experience with clicking, it'll be extremely buggy.
I've heard a few swordfighting/beat-em-up engines out there... so, does anyone have any links to one or any ideas? Thanks.
Disclaimer: Any sarcasm in my posts will not be mentioned as that would ruin the purpose. It is assumed that the reader is intelligent enough to tell the difference between what is sarcasm and what is not.
I did that once, it works much better for keeping animation levels down...
I lsot the engine....so i don't got anything...just more or less telling you it's a better idea then adding the sword into the characters animation.
It also allows you do to some neat tricks with a sword.
thinking is like pong, it's easy, but you miss sometimes.
But then when you jump, the sword and character are not in sinc right? That's always been the problem I've had. I suggest drawing the sword into the animation, but also having the sword be a seperate object that is INVISIBLE. Then test collisions with the seperate object ones, but keep the sprites looking nice by drawing the sword in... although I'm no expert on this at all.
n/a
Assault Andy Administrator
I make other people create vaporware
Registered 29/07/2002
Points 5686
10th March, 2005 at 01:22:13 -
If the game was beat em up and not sword vs. sword, then couldn't you just put an invisible detector on the action point of the sword. And then put the action point of the sword on the tip?
Don't use a built in movement if you can help it. The built in movement engines move faster than the events, so an 'Always' event won't actually keep up with it, making it appear to not quite keep in sync with the character.
If you are using a built in movement, create an invisible object to have the character's movement, and then the graphic for the character with no movement. Then add an "Always: Set character graphic to 0,0 from invisible movement object", then "Always: Set sword to 0,0 from character graphic (action point)".
This way both the sword and the character will have their position's set at the same time, so if they can't quite catch up to the movement object, neither of them will, so they'll always appear to be in the same position. Providing the movement object isn't ultra fast, the lag between then won't be enough to affect gameplay.
In my Zelda engine I've used a separate object for both the sword and the shield, and you'd believe they were actually part of the sprite, but the advantage is that, as well as combat being much easier to do with the separate sword object, you can have multiple different swords and shields, and mix and match them without having to have a thousand different sprites of the main character.
OK, so how do you stick both the sword and a shield, or two swords, or two fists, etc onto a character?
Hmm... AA's idea about putting that invisible detector's OK, and the invisible sword idea looks nicer too... but the main problem I'm having here is trying to minimize the work I need to do to get the sword in that guy's hand and have it sync with the movement. Do I really have to animate the sword and guy-with-sword seperately and join the two parts together, or is there an easier way? And what about that shield, and having attacks bounce off blocks, etc...
Swordfighting engines are hell. Along with physics, conversation, XYZ movement engines, text-based engines, etc . No wonder there's so many 2D platform games and top-down shooters in the community...
Disclaimer: Any sarcasm in my posts will not be mentioned as that would ruin the purpose. It is assumed that the reader is intelligent enough to tell the difference between what is sarcasm and what is not.
a good idea to make it not to stiff is to have the sword separatly, and make the main character jump a bit forward to make it look like he really swings it, just move the hot spot a few pixels forward in a few animation frames. about the hot-spot to action-point method, make the action-point go around the main character in a half-circle path when swinging, then just make the sword always face away from him.
Always
-look in direction of []
-set direction to (direction of [sword])+16
What you do to get it in sync good, is to draw the animation as the character with the sword at first. Then just cut out the sword part and make it a new object with the same animation speeed as the "attack" animation of the character.
Keep the same picture dimentions for the sword animations as the character, and put the hot spots in the same place as the character as well.
Then
"always"
-set position of (sword) to 0,0 of (character)
I really wouldn't recommend built-in movement for something like this. Custom movement not only gives you greater control (assuming you know what you're doing), but would also eliminates the problem of the sword not always following the character precisely.
However...even then, it's a recipe for a major headache. The animations in TGF/MMF don't always play at the exact same speed, and you'd have to do a lot of trial and error until the character animation and the sword positioning matches. Therefore...I'd recommend making the character and the sword as one object, then copying and pasting it so you have two. Blank out the character in one of the objects and blank out the sword in the other (using the transparent colour). You can now use the two objects for attacking and player collisions, assuming you set the animations for both to play at once.
EDIT - Which is pretty much what Rydin said. Nevermind.
Built-in movement sucks. Mainly because you don't have control over something fully. Gives plenty of space for bugs that you don't see.
Rydin:
That was my original idea, but well, if you have a dozen animations for a thrusting attack, that would be times 2 (for sword) for left/right. And then if you have a few other more attacking/blocking animations with a dozen movements each, it'll be even worse doubling it all.
However, I thought of making sword at action point, not hot spot, so I offer thee a dozen event lines of thanks for pointing out that I could just make the hot spot the same .
Now, my real problem would be blocking. How to make it attack and block smoothly, rather than have the attacking character's attack animation just set to bounce off when the attack is blocked? I don't think even the 3D Prince of Persia series managed to pull it off right, and it kinda makes the game look cheap .
I want a nice looking sword/staff fight. Is that too much to ask?
Swordfighting engines be only one of the few Hells of Click Engines. There be many more, and I must succeed the trials of each in order to create the Ultimate Game! I hope it gets more hype that ED .
Disclaimer: Any sarcasm in my posts will not be mentioned as that would ruin the purpose. It is assumed that the reader is intelligent enough to tell the difference between what is sarcasm and what is not.
I'm working on a custom engine right now that I call the lallapalooza, and it's almost done. This is a platform engine that is going to support double jump, and is going to be featured in my game Bastians Tale. Unless of course Baka is going to program me one tommarow. Anyways, I am putting an action point at the tip of the sword, and for the shield, I'm going to have a point that will stay permanently in one place. Truth be told, if you keep the sheild in relatively the same place all the time, you don't need the shield's detector to move.
I couldnt be bothered to read this whole thread, so this may have already been said. Put the sword in the animations, but have an action point invisible hit detector.