I'm polishing my two-handed axe by adding some custom graphics,
I have a few separate bitmaps (axe icon, dungeon view, and fly forward, backward and sideways).
Now that I've managed to get the "invisible color" to work, I want to get the flying animation to work, but I have no idea how to do that...
(fixed) Trouble getting dsb_animate to work..
Moderator: Sophia
Forum rules
Please read the Forum rules and policies before posting. You may
to help finance the hosting costs of this forum.
Please read the Forum rules and policies before posting. You may

- Sophia
- Concise and Honest
- Posts: 4307
- Joined: Thu Sep 12, 2002 9:50 pm
- Location: Nowhere in particular
- Contact:
dsb_animate requires that all frames of animation be put together in a sort of "strip," so if your axe has four frames of animation, they should all be in a row.
Then you can do dsb_animate(your_bitmap, 4, delay). Since you've specified 4 frames, then dsb_animate will divide your image into four sections of equal width and show each section in turn, forming the animation.
At the present time, DSB doesn't support making animations from separate images. (though this can change if there is demand for it, of course)
Does this help?
Then you can do dsb_animate(your_bitmap, 4, delay). Since you've specified 4 frames, then dsb_animate will divide your image into four sections of equal width and show each section in turn, forming the animation.
At the present time, DSB doesn't support making animations from separate images. (though this can change if there is demand for it, of course)
Does this help?
Hmm, the animation works almost fine, but it seems the frames cutting is not what I expect :
My axe is on a bitmap of 272 pixel width (4x68)
I copy pasted the four views with the same width, but it seems that in game the frames are overlapping (the edge of another appears at some animation steps) though on the bitmap they are not ! So I suppose the engine takes larger cuts than exact ones, and it might be because of the distance-scaling algorithm.
My axe is on a bitmap of 272 pixel width (4x68)
I copy pasted the four views with the same width, but it seems that in game the frames are overlapping (the edge of another appears at some animation steps) though on the bitmap they are not ! So I suppose the engine takes larger cuts than exact ones, and it might be because of the distance-scaling algorithm.
What Is Your Quest ?
- Sophia
- Concise and Honest
- Posts: 4307
- Joined: Thu Sep 12, 2002 9:50 pm
- Location: Nowhere in particular
- Contact:
Ok, as we talked about in flashchat, the problem was that the slices were too small, because of rounding errors.
You'll still get them if the original bitmap isn't divisible by the number of frames, but I've changed to algorithm to cut the bitmap and then scale it, rather than trying to cut a scaled bitmap.
If that doesn't make any sense, don't worry about it. The short answer is that I fixed the problem you were observing.
You'll still get them if the original bitmap isn't divisible by the number of frames, but I've changed to algorithm to cut the bitmap and then scale it, rather than trying to cut a scaled bitmap.
If that doesn't make any sense, don't worry about it. The short answer is that I fixed the problem you were observing.
