YesNoOk
avatar

dettachable and multiple weapons (Read 1924 times)

Started by Bastard Mami, February 07, 2008, 08:51:50 pm
Share this topic:
dettachable and multiple weapons
#1  February 07, 2008, 08:51:50 pm
  • ******
  • [E]
    • Mexico
back story and explanation first.

i started working on iroha when the sprite set got released by mugenchina. i use some heavily standarized code for all my chars, so certain hacks won't do.

the mugen china set has got the sprites for iroha and the weapon separated. so, making iroha and the weapon separated seemed natural. realigning resulted to be a bitch, though. thanks to this approach, i modified my code standar to fit everithing in the 0 to 9,999 groups. and the weapon would use the 10,000 to 19,999 groups. then i made it so each animation element of the weapon would correspond to the same animation element of the charatcer, that way i would only use st-2 to align the weapon with a single sctrl. clsn1s and htidefs would go into the charatcer code.

this was good until i got the idea of having multiple weapons. in which case the clsns would go into the weapons, and same for the hitdefs, thus now forcing me to duplicate the character's code in the weapons (at least the hitdef parts). now it was two sets of animations for the character (armed and unarmed), and  one set of animations per weapon (obviously).

but then i decided that, different weapons should be handled at different speeds, thus, making it necesary to have an extra set of animations for the player for each weapon.

now, this became more and more complex, so i tought that maybe making the character a simple morphable character and using an external gfx editor to both merge the weapon and the charcters's sprites would be better, and the code would end up being much more simpler.

each aproach has got advantages and disadvantages, some that i may overlook, others that i cna consider, anyway i hope this is enough to get a topic started; mostly on opinion of the different aproaches to code characters withd etachable weapons.
Re: dettachable and multiple weapons
#2  February 09, 2008, 12:59:29 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
In the end, this becomes very much like the transformation debate. Using 5 transformations is pretty pointless and a pain in the butt to code. Not hard, just tedious. At what point does the benefit of the next detachable weapon, really match up to the effort involved. I'd be voting for about 2 weapons tops, then you get sick of it.

In some ways, you'd be better off making the character an explod or helper and having the weapons as the character proper (gethitsprites required stuff are the exception) But all the moves could be character based helpers.

That way for animation speedup and slow down you could base it on helperID and use changeanim to alter your animation speed without needing to reanimate everything. With 2 weapons tops, that only requires 1 set of changeanims per state rather than 2.

You would of course need to align the weapons to the character via onionskin just so you could use bindtoparent at 0,0 and ignore positioning in general.

Still lots of effort but sounds like a little less than what you're going through. More than 2 weapons, i think you're letting yourself in for a lot of work. If one of the weapons is particularly small, make it invisible for the no weapon stuff.

More thought... that's about the same as what you're doing, just on a different slant. I see effort >> effect there.



In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.
Re: dettachable and multiple weapons
#3  February 09, 2008, 01:42:58 pm
  • **
  • Call me Private42.
Have you saw my project :????
Re: dettachable and multiple weapons
#4  February 09, 2008, 05:09:34 pm
  • ******
  • [E]
    • Mexico
right now i am thinking on making it exactly as a transformation-mugen code wise, then use a good gfx tool like gfx gale, that supports layered animations to make the source files, perfectly aligned so i only load the sprites using the same axis in the sff creation tool...i can't see many cons on it (most likely i will only make two weapons, though).