Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Slotted Palettes test and the PAL64 palette format
#5
(11-11-2022, 05:33 PM)megamarc Wrote: Hi!

Seems you've been busy playing with the palettes :-) thanks for sharing a video showing the process and result. May I upload it to Tilengine youtube channel with proper attribution to you?

I've been looking the documentation and source code of your PAL64 format. I didn't know Nim, but it's fairly straightforward to read. I have some questions:
  1. The type of palette and number of bytes are stored in offset bytes 8 and 9, after the yellow byte with the number of palettes? I can see it in source code, but the colored map states these bytes as generic "palette data" without specific meaning.
  2. inc index and index.inc are equivalent? Both forms are used in your source
  3. Why there's speciffic support for built-in NES palette? Wouldn't it be more general purpose to just let the user embed the palettes he/she wants, as the format already allows it? What is the use case for this specific feature?
Regards,

Hi! You are welcome to upload it! It would be a nice demo!
About your questions :
1) Whooops! I did a small error! effectively, the palette type is represented by the byte at Offset 8. The palette data starts at 9. I'll update the data map.

2) Yeah, they are equivalent. By the way, the keyword "discard" means you don't want to use the value returned by a function.

3) At the begining, I didn't intended to allow the user to use another palette than NES palettes. I implemented this feature because there isn't an unique NES palette. But I noticed there isn't any checks that verify if the palette the user is loading is a NES palette. So it was a kind of bug, but I decided to turn it into a feature. I also wanted to implement more palettes such as Commodore 64 palette, Amstrad CPC and so on, but it's useless with this feature, since the user can load an arbitrary color up to 256 colors. It's less efforts for me, more flexibility for the user, so it's Win-Win. I can probably rename "NES" to "Custom" so it reflects the feature in a better way. The NES palette is just the default palette if nothing is loaded or if the user don't want to load the custom palette.

Edit : I fixed the picture of the map. By the way, I also have 2 suggestions : Getters to get X pos and Y pos of a layer, and getter to get a palette from one of the 8 global palettes (like TLN_Palette myPal = TLN_GetGlobalPal(palId)).
Also, I learned some time ago you are working on a Javascript port of Tilengine. How is it going? I think I can open a lot of opportunites for the web!
Reply


Messages In This Thread
RE: Slotted Palettes test and the PAL64 palette format - by System64 - 11-11-2022, 07:54 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)