• Welcome to Valhalla Legends Archive.
 

Diablo II Sprite Engine Help Please

Started by Ringo, March 11, 2006, 02:07 PM

Previous topic - Next topic

Ringo

Iv been trying to put a kind of sprite engine together for D2 sprites, but some of them are in multiple parts and need to be put together.
Im not 100% sure how D2 goes about doing this, but im guessing it has somthing to do with the .cof file that go with the .dcc/.dc6 files for a set action (like attack method 2 for example)
Iv uploaded some source code of what im trying to do, and was hopeing somone could figger out away to compute the exact location of where the arms are spose to be drawn.
The .cof file (for the attack method 2, that i used in that source code) can be downloaded here.
So far, iv got it looking ok, but on some frames it doesnt line up to well. Like below, you can see mephisto's right arm is not visible like it is ment to be, and rather than having the effect of the right arm being drawn over the body, it miss's the gap. :(:

There is still a few more things to go on this as well, but i just used the body and arms for testing, otherwise i will just have the same problem with the next thing that needs to be drawn (like some effects) and i dont wanna have to hard code extra offsets for 1000's of images :P

Thanks in advance to anyone who can help!

RealityRipple


Ringo

Quote from: RealityRipple on March 11, 2006, 09:36 PM
....You mean Sprite?
Ye.. Typo, fixed etc :).
But i really need help with the offsets and how there used, rather than my spelling, but thanks anyway ;)
Anyways heres the gif on bnets site of the action i used:

So should give a good idea what the final product is ment to look like.
Iv been able to smooth mephi out by just centering the image:

(MephiX - (MepWidth / 2))

And the same with the arms, but the arms are still way off target, and i cant seem to figger away to incluse the offsets to line them up :(
Any ideas anyone?

Aside, the OffSets.frag's are offsets read directly from the dc6 file's, if anyone was wundering.