Valhalla Legends Forums Archive | Visual Basic Programming | Diablo II Sprite Engine Help Please

AuthorMessageTime
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. :(:
[img]http://www.geocities.com/ringomail712/MepSucking.gif[/img]
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!
March 11, 2006, 8:07 PM
RealityRipple
....You mean Sprite?
March 12, 2006, 3:36 AM
Ringo
[quote author=RealityRipple link=topic=14493.msg148169#msg148169 date=1142134562]
....You mean Sprite?
[/quote]
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:
[img]http://www.battle.net/images/battle/diablo2exp/images/animations/bestiary/act3/mephisto.gif[/img]
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:
[code]
(MephiX - (MepWidth / 2))
[/code]
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.
March 12, 2006, 12:40 PM

Search