Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

2D All the way! / Animated Sprites

Author
Message
warzog
21
Years of Service
User Offline
Joined: 13th Oct 2002
Location: United States
Posted: 14th Oct 2002 22:44
In DB v1.13, there was no command for animated sprites, so I made a subroutine that would do that for me.

My Sprite images contained 8 still frames in the 8 primary directions, and 8x 10-frame animations.

In DBPro I've created animated sprites, and I am having problems with the Play Sprite command.

Whenever I run say Play Sprite 1,70,80,80 it runs the entire set, up to frame 80, and then repeats the 70-80 animation.

And if I try to change the animation to say, 30-40, it keeps playing the original animation.

So, what am I missing?
warzog
21
Years of Service
User Offline
Joined: 13th Oct 2002
Location: United States
Posted: 14th Oct 2002 23:15
I almost forgot...
In DB v1.13 the transparency color was a really wide range of near 0 black.
It took quite a while, but I ended up making a pure black mask to get rid of all of the extranious colors.
Using them in DBPro, I'm getting a halo of spots that should be transparent.
Any way to fix that?
Shadow Robert
21
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 15th Oct 2002 03:10
in db the setup is RGB(0-10,0-10,0-10) = transparency %
so if you had RGB(9,9,9) that pixel would be semi-transparent, form of basic alpha mapping ... becuase if just one value was under 10 it would be setup as the transparency rate.

in dbpro i believe they actually use alphamaps now no?
well anyways the simplest way to play a sprite is your own function like...



as the for the transparency... use bitmaps or truevision targa as jpg and other compressed formats tend to ruin colours and blend them - which could be the blame for your dotty transparency.

Holy jumping mother of god NOOOO!!!...
Richard Davey
Retired Moderator
21
Years of Service
User Offline
Joined: 30th Apr 2002
Location: On the Jupiter Probe
Posted: 15th Oct 2002 03:33
Silly question warzog - but you are using the "create animated sprite" command before the "play sprite" one aren't you?

Cheers,

Rich

"Gentlemen, we are about to short-circuit the Universe!"
DB Team / Atari ST / DarkForge / Retro Gaming
warzog
21
Years of Service
User Offline
Joined: 13th Oct 2002
Location: United States
Posted: 15th Oct 2002 04:43
Yes, I used the "create animated sprit" command before the "play sprite" command.

I've been using PNG for my animations.
I just did a test with TGA, and while a bit better, it's nowhere near as clear as in DB.

I created my own function in DB v1.13, and it worked quite well.
However, it slows the program up when I have more than one animated sprite onscreen at a time.
Besides, the create animated sprite, and play sprite, in DBPro do the same things-well, they're supposed too!
warzog
21
Years of Service
User Offline
Joined: 13th Oct 2002
Location: United States
Posted: 15th Oct 2002 10:30
The annoying part, to me, is that:

1)instead of just playing the Start Frame to End Frame, it plays frame 1 through End Frame and then repeats the sequence you wanted to begin with.

2)you can't switch which animation sequence you want to view.

The way it works now is fine for things like the asteroid field demo, but for moving characters around, it sounds like it should work, but it doesn't.
Milamber
21
Years of Service
User Offline
Joined: 27th Sep 2002
Location: Australia
Posted: 16th Oct 2002 08:50
A lot of bugs still, but they're being worked on. Patch 2 should be coming out soon, and from what I've heard, all the rotating/turning objects should work fine. Not sure what the other things are that are fixed by patch 2, but there is a list over at the RGT site I believe.

System Specs: AMD Athlon 1700+ XP, GA-7VRX motherboard, 128MB DDR RAM, GeForce2 MX400 64MB VRAM
Shadow Robert
21
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 16th Oct 2002 09:00
warzog... use my function - its a simple temp measure, you can even combine it with a memblock and blend the frames to make it smoother - simple place each frame in an array, and call on it and blend using a %mask for the time.



Holy jumping mother of god NOOOO!!!...
warzog
21
Years of Service
User Offline
Joined: 13th Oct 2002
Location: United States
Posted: 16th Oct 2002 11:11
Raven Vegeta:
Thanx, but if you saw what I'm doing, you'd understand why this is important to me.
I have over 168 animation pages.
Each page is like the one I described above.
I have the main character, her 38 sisters, townsfolk, monsters, bad guys, etc.
Which animated sprites are on what tiles, and what locations are going to be in arrays.
Since I've been working on this game for two years, I can wait a while longer.
While temporary measures are great for testing ideas, they won't work in a finished product.
I have nearly $3000.00 into this project, so I'm taking my time.
Thanx anyway!
The Darthster
21
Years of Service
User Offline
Joined: 25th Sep 2002
Location: United Kingdom
Posted: 19th Oct 2002 01:13
Simply use the 'set sprite frame' command to set the current frame to the start frame you want, then it should work perfectly, looping from the start to the end frame. I had this problem with model animation a while back.
warzog
21
Years of Service
User Offline
Joined: 13th Oct 2002
Location: United States
Posted: 20th Oct 2002 06:51
Interesting affects, but not quite right.

If I place the "Set Sprite Frame" command before the "IF THEN" statement, or at the end of the "IF THEN" statement that calls the "Play Sprite" command, I get a single non-animated sprite.

And the single frame, non-animated sprite changes directions, as it's supposed to, as it moves about the screen. So I know the rest of the program is working right!

If I use a seperate "IF THEN" statement to control the "Set Sprite Frame" command, it plays the 2nd animation almost all of the time. Once in a while, it'll play the first animation, but only for a few seconds, and then it goes back to the second animation.
Richard Davey
Retired Moderator
21
Years of Service
User Offline
Joined: 30th Apr 2002
Location: On the Jupiter Probe
Posted: 21st Oct 2002 19:29
Every time you call the "set sprite frame" command it'll reset the animation for you. Just add in some simple logic to check if it should call "set sprite frame" or not. I.e. if the sprite is already moving in that direction then you don't need to reset the frames, just keep on animating it.

Cheers,

Rich

"Gentlemen, we are about to short-circuit the Universe!"
DB Team / Atari ST / DarkForge / Retro Gaming
warzog
21
Years of Service
User Offline
Joined: 13th Oct 2002
Location: United States
Posted: 22nd Oct 2002 10:19
That's what I did:
"If I use a seperate "IF THEN" statement to control the "Set Sprite Frame" command, it plays the 2nd animation almost all of the time. Once in a while, it'll play the first animation, but only for a few seconds, and then it goes back to the second animation."

I'm wondering, could it be that the 90 frames are to much?
Maybe I'll try cutting it down to 9 sprites with 10 frames each?

Of course, if I can convert my DBv1.13 program, I know THAT works!
warzog
21
Years of Service
User Offline
Joined: 13th Oct 2002
Location: United States
Posted: 22nd Oct 2002 12:03
No I can't!
After I ran patch 2, I tried to convert my DBv1.13 to DBP.
After about 9 or 10 page faults, I started gettin weird patterns all over the screen, and had to restart DBP.
When I went to work on the DBP version, the infamous CD NOT FOUND bug reared it's head, and I had to restart DBP again.

I tried several dozen things to try and get Play Sprite to work.
Well... It doesn't!!!
So, I installed a counter, and a time-delay, and now I'm using Set Sprite Frame!!!
The Create Animated Sprite command works great!!!
The Set Sprite Frame works great!!!
But the Play Sprite command is messed up!!!
(Which may be in part from my 1051x1351 pixel, 90 frame, images)
Anywho...
I've got it working...
But now I gotta find a way to clean up the sprites!
I still got those nasty looking spots around the figures, that should be transparent. (They're the same exact color as the pixels that actually are transparent!)
warzog
21
Years of Service
User Offline
Joined: 13th Oct 2002
Location: United States
Posted: 22nd Oct 2002 12:08
BTW-my Avatar was picked because it shows my age.
indi
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 23rd Oct 2002 15:59
what 2d programs are u using to change the areas to flat raw colour.
did u change the file formats at all and did u pass through a lossy file format to get to the final result.?

What settings is the project set in? 16 bits?

is there any dithering settings when applying colour you could switch off.




if u get stuck..

could u post one keyframe series to me so i can have a look
at the colours in the alpha field.

send more file formats of the same 1 image sequence
the more the merrier for me find a solution
and any u made up to a final result.

indi_frost@yahoo.com.au

Ill post back via email if I see anything weird if u like.

http://www.lunarpixel.com/ is my new site
warzog
21
Years of Service
User Offline
Joined: 13th Oct 2002
Location: United States
Posted: 23rd Oct 2002 18:10
I did the animations using Poser 4.
It allows you to create people, clothe them, and animate them.
I assemble the 88 frames into my animation pages using a program I wrote in DBv1.13
Then I overlay a black mask MS Paint (bmp) format, and use PSP7 to convert to PNG format.
But I have the problem(s) even using the original BMP's.
warzog
21
Years of Service
User Offline
Joined: 13th Oct 2002
Location: United States
Posted: 23rd Oct 2002 18:34
I am stuck!
And I sent you the program(s) DB and DBP, along with a set of graphics.
Personally, I don't think Play Animation can handle animations the size I'm using.
Either that, or my computer needs to be R&R'd!
Thanx Indi!
warzog
21
Years of Service
User Offline
Joined: 13th Oct 2002
Location: United States
Posted: 26th Oct 2002 09:08
VINDICATION!!!!

Indi verified that:
1)Play Sprite is messed up!
2)Sprite graphics quality in DBPro is messed up!!

No cure, yet, but vindication will do for now!
indi
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 29th Oct 2002 02:59
it looks unreal in DB113 and omg thats pixelated currently in DBP

http://www.lunarpixel.com/ is my new site
pathfinder
21
Years of Service
User Offline
Joined: 5th Sep 2002
Location:
Posted: 29th Oct 2002 15:37
hey warzog got any links for screenshots, love to see them

warzog
21
Years of Service
User Offline
Joined: 13th Oct 2002
Location: United States
Posted: 29th Oct 2002 20:20
I wish I did, but I don't have anywhere to post them.
If you'd like, I could email you some.
warzog
21
Years of Service
User Offline
Joined: 13th Oct 2002
Location: United States
Posted: 26th Nov 2002 11:39
I just downloaded, and installed Patch 3.
It solved the Play Animation problems, and it helped the pixelation a little, but I still have some pixels around the character.
Van B
Moderator
21
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 26th Nov 2002 16:25
In your art package (I use PSP), replace your perfect black r0 g0 b0 with a colour your not using, a nice luminous green, something that will show black spots clearly. Now you have to tidy up your sprites, using the luminous green colour as your transparent colour, and r0g0b8 as your new black. Now once you've tidied up the sprites and all the transparent areas are represented by the luminous green, replace that green with perfect black again.

Works for me .


Van-B
P.S. If your heart is set on using 256 colour bitmaps to save memory, always include the windows colours, otherwise you might not get a perfect black in the pallete.
warzog
21
Years of Service
User Offline
Joined: 13th Oct 2002
Location: United States
Posted: 24th Jan 2003 14:42
I made masks, the images have been "tidied" up.
If I change the background to any other color, you'll only see that color and my characters.
I even tried changing the background color of my sprites to 0,255,0, and the transparency color to 0,255,0 in the program.
I STILL get the halo of BLACK spots, along with some non-transparent pixels of my character disappear too.
warzog
21
Years of Service
User Offline
Joined: 13th Oct 2002
Location: United States
Posted: 28th Jan 2003 11:25
Since everyone claims that I'm Full Of ..it!
I did a few experiments...
Just for ..its and grins, I replaced my mouse pointer image, with the character's image page.
There's absolutely no black spots!
That means that the "Create Animated Sprite" command is adding them itself!

Login to post a reply

Server time is: 2024-04-25 00:06:40
Your offset time is: 2024-04-25 00:06:40