03-26-2023, 10:12 AM
(03-24-2023, 11:14 PM)madscijr Wrote:(02-26-2023, 10:56 PM)RokCoder Wrote: The ZIP file contains scramble.bas along with a subfolder called assets which contains all the sound effects, graphics, etc.
For Scramble, I started playing with decomposing "sprite-sheet.png", breaking it out into layers in paint.net, to change some colors.
As fun as Scramble can be, I was never a big fan of the colors - like those ugly purple and green explosions - yuck! LoL.
Looking at the sprite sheet, I have a question:
Have a great weekend!
The game uses a palettised screen mode so that I could use simple palette switching in a similar way to how I assume the original arcade game did. All the grey sprites in the sprite sheet are the ones that are affected by the palette switching - landscapes, certain enemies, etc. SUB ExtractPalettes pulls the colours from that small area of palettes.
Code: (Select All)
SUB ExtractPalettes
DIM i%, x%, y%
_SOURCE spriteSheet&
i% = 0
FOR y% = 1 TO 4
FOR x% = 0 TO 7
pal&(INT(i% / 4), i% MOD 4) = _PALETTECOLOR(POINT(127 + x% * 4, 97 + y% * 4), spriteSheet&)
i% = i% + 1
NEXT x%
NEXT y%
i% = 0
FOR x% = 0 TO 3
gPal%(i%) = POINT(127 + x% * 4, 97)
i% = i% + 1
NEXT x%
END SUB
Essentially, the pal& array is filled with the target colour indexess for eight different palette types (with there being four dynamically set palette entries for each). The gPal& array is simply the source palette index entries that are modified.
You should be able to make the entire game more pleasing to your eye simply by tweaking those target colours in the sprite sheet!