DAAD Adventure Writer and ZX Next

Do you live and breathe hexadecimal? Do you like speaking to hardware directly?

Moderator: Programming Moderators

User avatar
Uto
Posts: 57
Joined: Tue May 30, 2017 9:33 am

Re: DAAD Adventure Writer and ZX Next

Post by Uto » Tue Sep 17, 2019 7:57 am

it's actually not sure there is nothing below, cause the author may not take care of deleting text when the previous location has no picture, but what it's sure is what is down there is worthless, so what I can do is make sure there is nothing below (fill the ULA zone below the Layer2 picture with the transparent color.

Also, it's not sure the color below would be black, cause just as in Quill or PAW, the author can choose paper color (99% choose black but there are a few ones using other colors, such as CRL's Wolfman).

The clipping approach has an issue: if the game have some rooms without picture, then the whole screen is used for text, and my code won't be called so I cannot remove the clipping area in ULA layer, what would lead to see half screen in black.


I think I will apply all approachs:

1) Make the converter save the transparency color in a file, so the converter itslef looks for a color that is not used
2) If the converter is unable to find a color that is not used, then make sure the transparent color is the oriignal ULA color that is less used in the picture, and paint the ULA zone below in that color.

On the other hand, I will let the file have a transparency on/on flag, so if transparency is on then the EXTERN will not try to avoid transparency, so a skilled user can still use transparency for his own purposes (i.e. making 256x192 with a frame around the text zone, and letting the text zone be transparent except for that frame.

Thanks again all for advices, it's making all this much easier :-)
Last edited by Uto on Tue Sep 17, 2019 9:39 am, edited 2 times in total.

User avatar
Uto
Posts: 57
Joined: Tue May 30, 2017 9:33 am

Re: DAAD Adventure Writer and ZX Next

Post by Uto » Tue Sep 17, 2019 8:09 am

Just to make sure: what is considered "transparent" is the color itself, not the palette entry, isn't it?

So if I set the transparent color to 0x00 and then the palette has 5 entries with value 00, all pixels using any of those 5 palette entries index will be transparent, won't them?

Alcoholics Anonymous
Posts: 513
Joined: Mon May 29, 2017 7:00 pm

Re: DAAD Adventure Writer and ZX Next

Post by Alcoholics Anonymous » Tue Sep 17, 2019 5:03 pm

The clipping approach has an issue: if the game have some rooms without picture, then the whole screen is used for text, and my code won't be called so I cannot remove the clipping area in ULA layer, what would lead to see half screen in black.
So you can't clip the ula below the layer 2 area when drawing the picture and then unclip the ula area when the layer 2 picture is removed?
Uto wrote:
Tue Sep 17, 2019 8:09 am
So if I set the transparent color to 0x00 and then the palette has 5 entries with value 00, all pixels using any of those 5 palette entries index will be transparent, won't them?
Yes that's right. The transparency test is against the top 8 bits of the final colour. Any 9th bit - the last blue bit - does not figure into it.

User avatar
Uto
Posts: 57
Joined: Tue May 30, 2017 9:33 am

Re: DAAD Adventure Writer and ZX Next

Post by Uto » Tue Sep 17, 2019 8:15 pm

Alcoholics Anonymous wrote:
Tue Sep 17, 2019 5:03 pm
So you can't clip the ula below the layer 2 area when drawing the picture and then unclip the ula area when the layer 2 picture is removed?
In fact I've realized that unlike with other machines, with the way I paint the pictures in the Next (using another layer), the picture won't be erased when entering a location without picture. That means I have to think about providing a method to disable the picture the author can use, of maybe... maybe just disable layer2 when I'm requested to load a picture that does not exists.

Anyway, regarding transparency, I have already made the following:

- The picture file will have a byte specifying the transparency color. The global transparency value will be always set to that byte, but if the color is 0x00 then I will also fill the ULA area below with black pixels. So it won't be possible to use pure black as transparent color, but any other color could be used as transparent if the author wants. That way unskilled authors can just set to 0, and skilled ones can decide whether to use transparency or not.

- The tool to convert image file will have an option that maybe the trasparency color or "auto". If autor, the converter will determine which color is used the most in that picture and use it as transaparent. The reason behind that is I believe most authors will use that jus to make a frame around the text, so there will be a lot of pixels of a specific color over the text area, with a high chance of being the most repeated color. Then the author just has to make sure the transparent area is not pure black.
Uto wrote:
Tue Sep 17, 2019 8:09 am
So if I set the transparent color to 0x00 and then the palette has 5 entries with value 00, all pixels using any of those 5 palette entries index will be transparent, won't them?
Yes, I notice when testing, it actually works already. Look at the example below (although it's a crappy frame and I didn't set the text window to be properly placed, but you can see the area within the crappy frame is transparent and you can see the text below :-)
Attachments
screnshot2.png
screnshot2.png (43.43 KiB) Viewed 1163 times

User avatar
Uto
Posts: 57
Joined: Tue May 30, 2017 9:33 am

Re: DAAD Adventure Writer and ZX Next

Post by Uto » Wed Sep 18, 2019 6:47 am

Well guys, job done, extension for Next is already published and documented:

https://twitter.com/uto_dev/status/1174 ... 68544?s=20

Thank you very much for help!

Ped7g
Posts: 111
Joined: Mon Jul 16, 2018 7:11 pm

Re: DAAD Adventure Writer and ZX Next

Post by Ped7g » Wed Sep 18, 2019 7:13 am

Nice work! :)

Stefan123
Posts: 102
Joined: Mon Jun 05, 2017 9:38 pm

Re: DAAD Adventure Writer and ZX Next

Post by Stefan123 » Wed Sep 18, 2019 7:12 pm

Muy Bien! :)

User avatar
Timbucus
Posts: 230
Joined: Tue May 30, 2017 7:43 pm

Re: DAAD Adventure Writer and ZX Next

Post by Timbucus » Fri Sep 27, 2019 7:54 pm

Just like to say well done and thanks for keeping this system relevant and the Next supported! Wish I had more time to play.
I'm Infinite Imaginations when not in work... PAWS for thought.

User avatar
Uto
Posts: 57
Joined: Tue May 30, 2017 9:33 am

Re: DAAD Adventure Writer and ZX Next

Post by Uto » Sun Oct 27, 2019 11:17 am

Timbucus wrote:
Fri Sep 27, 2019 7:54 pm
Just like to say well done and thanks for keeping this system relevant and the Next supported! Wish I had more time to play.
Thank you Tim.

User avatar
Uto
Posts: 57
Joined: Tue May 30, 2017 9:33 am

Re: DAAD Adventure Writer and ZX Next

Post by Uto » Sun Oct 27, 2019 11:24 am

I also can confirm now that using combined forces of las release of my new DAAD compiler, and the last update of Maluva extension for DAAD, you can now not only use raster images for DAAD games in ZX Spectrum Next, but also benefit from the new improvement: messages in disk.

That means that although the original interpreter for DAAD was done for the Spectrum 48K, you can now create adventures whose messages are saved in disk instead of RAM,meaning you can create much longer adventures while you have a machine with enough storage.

For the time being I'm supporting that feature for the following targets:

- Spectrum +3 (using floppies or +3e disks)
- Spectrum with DivIDE or DivMMC, or any clone including such feature (i.e. ZX-Uno)
- Spectrum Next

I'll also be working in the messages-in-disk feature for C64, CPC and MSX targets (supported by DAAD).

Post Reply