QL Sprite Editor

Anything QL Software or Programming Related.
Derek_Stewart
Font of All Knowledge
Posts: 3970
Joined: Mon Dec 20, 2010 11:40 am
Location: Sunny Runcorn, Cheshire, UK

QL Sprite Editor

Post by Derek_Stewart »

What is the best Editor to create, modify GD2 Sprites?

Can I make a Chain Sprite that will have Sprite definitions for Mode 4, Mode 8, Aurora Mode, Mode 32, Mode 33, with a Sprite Editor?


Regards,

Derek
User avatar
NormanDunbar
Forum Moderator
Posts: 2274
Joined: Tue Dec 14, 2010 9:04 am
Location: Leeds, West Yorkshire, UK
Contact:

Re: QL Sprite Editor

Post by NormanDunbar »

I've not used it yet, but possibly, EasyPtr 4, from Marcel (kilgus.net), might be able to do this.

I'm not a great sprite user, even with the ancient versions of EasyPtr which I bought years ago, and I'm not near a computer, so I can't confirm.

HTH


Cheers,
Norm.


Why do they put lightning conductors on churches?
Author of Arduino Software Internals
Author of Arduino Interrupts

No longer on Twitter, find me on https://mastodon.scot/@NormanDunbar.
User avatar
pjw
QL Wafer Drive
Posts: 1313
Joined: Fri Jul 11, 2014 8:44 am
Location: Norway
Contact:

Re: QL Sprite Editor

Post by pjw »

Derek_Stewart wrote:What is the best Editor to create, modify GD2 Sprites?

Can I make a Chain Sprite that will have Sprite definitions for Mode 4, Mode 8, Aurora Mode, Mode 32, Mode 33, with a Sprite Editor?
The EasyPointer sprite editor only does QL mode sprites. There is a sprite editor for GD2 sprites out there (I think) but IIRC, it isnt finished and (I find it) hard to use. Better use Windows/Linux programs to create the sprites and convert them with Marcel's PNGconv (a Windows program) or Wolfgang's Sprites program (written in Java).

To make multimode chained sprites I find it best (it may also be the only way!) to convert the sprites to assembler and link them by hand. Its not hard once you know the format. To convert the sprites to assembler use the aforementioned GD2 sprite converters for the GD2 sprites and Easyasm from EasyPointer for the QL mode ones.


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

Re: QL Sprite Editor

Post by dilwyn »

Marcel's PNGconv for converting PNG graphics to QL sprites is at https://www.kilgus.net/smsqe/sprite-converter/

Wolfgang's Java sprite converter is at http://www.wlenerz.com/qlstuff/#ssprts

Various utilities including viewers and a couple of GD2 sprite editors (Eddi and Sprted) at http://www.dilwyn.me.uk/sprites/index.html

Some articles and example programs for chaining sprites on my GD2 documentation page at http://www.dilwyn.me.uk/docs/smsqegd2/index.html, and specifically there is Marcel's article about Sprites with some examples in SBASIC of joining sprites etc in the Sprites article http://www.dilwyn.me.uk/docs/smsqegd2/sprites.zip - same technique as I use to make the 'standard' sprites in my own GD2 program, where the 'X' (exit) icon, for example, displays slightly differently in high colour and in mode 4.

EDIT: left out the most important bit, a short SBASIC program by Wolfgang Lenerz showing how to join a mode 4 and higher colour sprite together to display the appropriate one for the current screen mode: http://www.dilwyn.me.uk/gd2/chainsprites.zip


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

Re: QL Sprite Editor

Post by dilwyn »

As it's only a small procedure, I thought I'd copy it here showing how relatively easy it is to create joined/chained sprites with a short SBASIC routine. Supply the filenames of the two sprites to be joined in the first two parameters to the procedure, and the third parameter is the filename to create the third or 'joined' sprite combining the first two. Well commented, but I suggest you read Wolfgang and Marcel's articles I referred to earlier in order to get a better understanding of the principles involved, and exactly what can be achieved by joining sprites in this manner, and above all the format and structure of these objects.

Code: Select all

100 DEFine PROCedure ChainSprites (file_in1$,file_in2$,file_out$)
110   REMark ***** chains two sprites creating a new one
120   REMark ***** Procedure by W. Lenerz
130   LOCal pointer, chan%,total,memory,mem_used,mem_used2
140   chan% = FOP_IN(file_in1$) : REMark open first file
150   IF chan% < 0 THEN RETurn : REMark oops, can't open it
160   mem_used = FLEN(#chan%) : REMark get  length of file close#char%
170   mem_used = mem_used+(mem_used && 1) : REMark make even
180   chan% = FOP_IN(file_in2$) : REMark open second file
190   IF chan% < 0 THEN RETurn : REMark oops, can't open it
200   mem_used2 = FLEN(#chan%) : REMark length of file
210   CLOSE #chan%
220   mem_used2 = mem_used2 + (mem_used2 && 1) : REMark make even
230   memory = ALCHP(mem_used + mem_used2) : REMark reserve enough memory for 2 sprites
240   LBYTES file_in1$,memory : REMark load first sprite into it
250   LBYTES file_in2$,memory + mem_used : REMark load second sprite
260   pointer = memory + 20: REMark pointer to next sprite goes in here
270   POKE_L pointer,memory + mem_used - pointer : REMark set pointer now
280   SBYTES file_out$,memory,mem_used + mem_used2 : REMark save the new chained sprite
290 END DEFine ChainSprites


Derek_Stewart
Font of All Knowledge
Posts: 3970
Joined: Mon Dec 20, 2010 11:40 am
Location: Sunny Runcorn, Cheshire, UK

Re: QL Sprite Editor

Post by Derek_Stewart »

Hi Dilwyn,

Yes I seen all the software that is featured on your web site, read the Sprite articles and used Wolfgang's Sprite converter.

The link to pngconvert is dead, fortunately I have copy of it. Works quite well converting PNG files to Mode 4, Aurora, Mode32, Mode64.

No Mode33, so not much use for use on the Q68, Q40, Q60

I was disappointed to see that Easysprite can only handle Mode 4 / 8 Sprites, no Hicolour Sprite editing.

Looks like Duncan Nether it's Edicon programme maybe the only new software to handle this type of Sprite.


Regards,

Derek
duncan
ROM Dongle
Posts: 49
Joined: Tue Aug 15, 2017 5:08 pm

Re: QL Sprite Editor

Post by duncan »

Hi Derek,

I have found that with changes that, I guess Marcel Kilgus has made to smsq/e, mode 32 sprites display just fine on mode 33 screens, and possible Aurora mode which essentially mode 32 sprites a universal format except for mode 4 of course.

I have been working on an update to EddIcon and while its not completely finished as there is bug in transferring colours to the working palette I could upload it here if there is any interest. The changes from the version on Dilwyn's site are saving sprites in mode 32, mode 64 and mode 4 or as a mode 4 basic listing. Sprites can be saved compressed or not. The editor now has 3 screen sizes to allow its use on small high colour screens. Colours can be imported from QCP colour editor as well.

Cheers


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

Re: QL Sprite Editor

Post by dilwyn »

Derek_Stewart wrote: The link to pngconvert is dead, fortunately I have copy of it. Works quite well converting PNG files to Mode 4, Aurora, Mode32, Mode64.
Ah, thanks for telling me about that. As Marcel forbids redistributing of PngConv, only allowing linking to its page on his site from other sites, looks like I missed that link when he changed his site around a while back. Luckily, the link to it from the other page worked OK. Anyway, fixed that link now.

PngConv is a fantastic little program for converting PNG sprites from Windoze to QL. PNG graphics allow alpha blending (semi-transparent) sprites, or convert as bitmasks or solid, and can convert this alpha blend mask into the QL sprites, so that you can get QL sprites with transparency too. Most Windoze graphics programs will convert to and from PNG (e.g. Irfan View) so you can convert sprites from just about any sources that Windoze can handle. This is how I converted many of the gd2 sprites for use with programs like Q-Dock. It can batch convert files, so no need to go through files one at a time. It can RLE (run length encode) compress the QL sprites, and can output the sprite as a binary or as assembler.

Once you've converted a good number of sprites, you'll need a viewer - plenty available, including my own SPRV 'grid view' multiple sprite viewer - download from Q-Dock page at http://www.dilwyn.me.uk/qdock/index.html

IIRC, there is a degree of automatic conversion when printing sprites in the high colour modes in GD2. So mode 32 and 33 sprites should work OK either way around. Can't remember for sure about 256 colour sprites, although I *think* they also display OK in mode 32 and 33. Same applies to the mode 64 sprites, although no mode 64 display hardware exists yet AFAIK.

Can be a bit hard to get your head around the sheer number of options in these QL sprites, but you can achieve an amazing amount thanks to the thought that the programmers put into these.

Screen dump from SPRV viewer:
icons.png
sprv.png


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

Re: QL Sprite Editor

Post by pjw »

dilwyn wrote:<>
Once you've converted a good number of sprites, you'll need a viewer - plenty available, including my own SPRV 'grid view' multiple sprite viewer - download from Q-Dock page at http://www.dilwyn.me.uk/qdock/index.html
To avoid confusion, I should point out that there is an earlier program called Sprv out there. It is part of a suit: Msprv (multi sprite viewer, which does similar work to Dilwyn's SPRV) and Sprv, which views single sprites in more detail.

While they can work with sprites of all modes, the programs only run under GD2.

Both are being updated at present, based on my better understanding than in 2004 of sprites, blobs, and patterns. I cant say when they will be ready, except "real soon now!".

The current version, however, is available from Knoware.no


Per
dont be happy. worry
- ?
Derek_Stewart
Font of All Knowledge
Posts: 3970
Joined: Mon Dec 20, 2010 11:40 am
Location: Sunny Runcorn, Cheshire, UK

Re: QL Sprite Editor

Post by Derek_Stewart »

Hi,

Thank you for the information, I have sorted out my problem.

I converted some PNG sprites from a PC based Sprite animation system: DragonBones

The convertion worked, but I could not display or edit the converted sprite files.

It turns out I forgot to check the size of the PNG file, which was 940x460 pixels, so the PNGconvert programme converted the PNG file to SPR file with a file size of 940x460, too large for the SMSQ/E window.

So I used The GIMP to reduce the scaling to 100x46 pixels, converting to SPR file and displyed perfectly with the Easyptr SPRW command.

I may of been missing the simple thing at the start i.e. the resolution of the Graphics file. But this oversight caused me to read more technical information on Sprites.
Last edited by Derek_Stewart on Thu Mar 07, 2024 9:15 am, edited 1 time in total.


Regards,

Derek
Post Reply