Dynamic Sprites

Anything QL Software or Programming Related.
User avatar
dilwyn
Mr QL
Posts: 2753
Joined: Wed Dec 01, 2010 10:39 pm

Dynamic Sprites

Post by dilwyn »

Anyone know of a QL sprite viewer that's able to display Dynamic Sprites (GD2 especially)?

Need something to test the output of my animated GIF viewer program. I appreciate I could quickly cobble together a simple menu in Easyptr and load the dynamic sprite as a pointer sprite to display that way, but why reinvent the wheel as square if someone's already invented a round one.

I've used Per's sprite viewer to go through it frame by frame, looks OK, but need some way to see that (a) the animation works, and (b) that the frame timings are working correctly.

(Many thanks to Per for his PIC/Sprite conversion routines and PIC compression - just need to test now if I've destroyed his code while integrating it into my program)


User avatar
pjw
QL Wafer Drive
Posts: 1286
Joined: Fri Jul 11, 2014 8:44 am
Location: Norway
Contact:

Re: Dynamic Sprites

Post by pjw »

Dilwyn,
I wrote something to display dynamic sprites using an asynchronous job, but it didnt work very well, so its in my pile of "try something else" abandoned projects. However, my sprite viewer, Sprv V0.07 (I believe that was the last released version?) can display dynamic sprites (up to 64x64 pixels) as pointer sprites: Just display the sprite and DO the down arrow. ESC to exit that mode. But perhaps you already tried that and it wasnt what you wanted..?


Per
dont be happy. worry
- ?
User avatar
dilwyn
Mr QL
Posts: 2753
Joined: Wed Dec 01, 2010 10:39 pm

Re: Dynamic Sprites

Post by dilwyn »

pjw wrote:Dilwyn,
I wrote something to display dynamic sprites using an asynchronous job, but it didnt work very well, so its in my pile of "try something else" abandoned projects. However, my sprite viewer, Sprv V0.07 (I believe that was the last released version?) can display dynamic sprites (up to 64x64 pixels) as pointer sprites: Just display the sprite and DO the down arrow. ESC to exit that mode. But perhaps you already tried that and it wasnt what you wanted..?
Ah, I was afraid of that - I had used it, but it just grunts and does nothing when I DO on the down arrow. That must mean that there is a fault with the sprites I generate. Although some of the animated GIFs I've been using are larger than 64x64 pixels (I forgot about that limit), so that may be the reason. I'll see if I can find smaller GIFs to try.


User avatar
dilwyn
Mr QL
Posts: 2753
Joined: Wed Dec 01, 2010 10:39 pm

Re: Dynamic Sprites

Post by dilwyn »

Yes, it does work for sprites up to that size :oops: silly me. Looks like the dynamic sprites are being generated correctly after all. Thanks Per.


User avatar
BSJR
Trump Card
Posts: 182
Joined: Sun Oct 18, 2015 12:53 pm
Location: Amsterdam
Contact:

Re: Dynamic Sprites

Post by BSJR »

dilwyn wrote:Yes, it does work for sprites up to that size :oops: silly me. Looks like the dynamic sprites are being generated correctly after all. Thanks Per.
Dilwyn,

If Sprv 0.07 is giving a problem you could try SprvAPM on my site which is an update from that.
I don't remember if I fixed any Dynamic issues then though.
And there is also SQRview, that too can step through Dynamic Sprites and show statistic on each one.
https://home.hccnet.nl/b.spelten/ql/index.html

BSJR


User avatar
dilwyn
Mr QL
Posts: 2753
Joined: Wed Dec 01, 2010 10:39 pm

Re: Dynamic Sprites

Post by dilwyn »

BSJR wrote:
dilwyn wrote:Yes, it does work for sprites up to that size :oops: silly me. Looks like the dynamic sprites are being generated correctly after all. Thanks Per.
Dilwyn,

If Sprv 0.07 is giving a problem you could try SprvAPM on my site which is an update from that.
I don't remember if I fixed any Dynamic issues then though.
And there is also SQRview, that too can step through Dynamic Sprites and show statistic on each one.
https://home.hccnet.nl/b.spelten/ql/index.html

BSJR
Thanks Bob. In fact, it was just the fact that I'd forgotten about the dynamic sprite size limit which Per mentioned - I "created" a problem where there was none.

In fact, playing around with chasing a non-existent bug gave me a few ideas for more facilities to add to the animated GIF viewer! I'm enjoying programming this little project.

But these programs on your site will still prove useful.


User avatar
dilwyn
Mr QL
Posts: 2753
Joined: Wed Dec 01, 2010 10:39 pm

Re: Dynamic Sprites

Post by dilwyn »

Been doing some more work on my Animated GIF viewer and converter program. Surprising how a gap of several weeks since I last touched it has made me forget my own code!

Been looking in the various QL reference guides about the size limits for a dynamic (animated) sprite for QDOS+pointer interface/wman and for SMSQ/E, trying to find if they had different limits on dynamic pointer sizes which can be used. If the info is there, I can't find it. Anyone happen to know? My program has its own animation routines for larger sprites, but it would be useful (for the documentation) to know how large a dynamic sprite QDOS and SMSQ/E can officially handle.

And while I'm at it, thanks again to David Westbury (for PHGTK) and Per Witte (for compression routines) which are used in my program to save reinventing the wheel.


User avatar
pjw
QL Wafer Drive
Posts: 1286
Joined: Fri Jul 11, 2014 8:44 am
Location: Norway
Contact:

Re: Dynamic Sprites

Post by pjw »

dilwyn wrote:<>
Been looking in the various QL reference guides about the size limits for a dynamic (animated) sprite for QDOS+pointer interface/wman and for SMSQ/E, trying to find if they had different limits on dynamic pointer sizes which can be used. If the info is there, I can't find it. Anyone happen to know? My program has its own animation routines for larger sprites, but it would be useful (for the documentation) to know how large a dynamic sprite QDOS and SMSQ/E can officially handle.<>
64x64 is the max size for "cursor" spites, and since those are the only ones the system animates it follows that that must be the max size for dynamic sprites.
Sounds like youre on to a fun project. I tried using a background job to animate larger sprites, but couldnt get it to work satisfactorily. It was jerky and unreliable. To be honest, I didnt try very hard, it was just a POC thing. Id be interested in how you solved it.


Per
dont be happy. worry
- ?
User avatar
dilwyn
Mr QL
Posts: 2753
Joined: Wed Dec 01, 2010 10:39 pm

Re: Dynamic Sprites

Post by dilwyn »

pjw wrote:
dilwyn wrote:<>
Been looking in the various QL reference guides about the size limits for a dynamic (animated) sprite for QDOS+pointer interface/wman and for SMSQ/E, trying to find if they had different limits on dynamic pointer sizes which can be used. If the info is there, I can't find it. Anyone happen to know? My program has its own animation routines for larger sprites, but it would be useful (for the documentation) to know how large a dynamic sprite QDOS and SMSQ/E can officially handle.<>
64x64 is the max size for "cursor" spites, and since those are the only ones the system animates it follows that that must be the max size for dynamic sprites.
Sounds like youre on to a fun project. I tried using a background job to animate larger sprites, but couldnt get it to work satisfactorily. It was jerky and unreliable. To be honest, I didnt try very hard, it was just a POC thing. Id be interested in how you solved it.
Ah, so the 64x64 is the same for both operating systems? Reason I ask is that I'm having problems with 64 x 64 sprites on QDOS and I don't know if I'm chasing a bug in my own code or not.

Since we previously discussed background animation and told me of your experiences, I haven't spent time trying to improve the animation at all, like you say it is jerky and unreliable and I don't think I'll be able to improve on that from compiled BASIC. At least it lets you view good enough animation to be able to view the GIF, you can animate or step through frame by frame, even extract single frames if you wish. It only converts to 8-bit and 16-bit colours, mode 4 and mode 8 seemed too much like hard work for the poor results I'd get. For graphics greater than 64x64 you can either scale the graphic size (if you wish to make a pointer dynamic sprite) or just convert in original size, in which case you have to use or write a dedicated viewer or animation routine such as the one which comes with my program, unfinished yet.

It sort of all works at the moment apart from the handling of transparent colour (which I'm working on atm) but needs a lot of code tidying to remove duplications etc. Here's some screen dumps as it stands atm:
animgif1.jpg
animgif2.jpg
animgif3.jpg


User avatar
pjw
QL Wafer Drive
Posts: 1286
Joined: Fri Jul 11, 2014 8:44 am
Location: Norway
Contact:

Re: Dynamic Sprites

Post by pjw »

Hi Dilwyn
Just saw your post. I should (post-)hasten to add that I was only thinking of SMSQ/E! Never occurred to me that youd be doing this for Qdos!

I dont know the limit for Qdos animated sprites! It could well be less than 64x64. Busy day today, but I can try to find out later.


Per
dont be happy. worry
- ?
Post Reply