Very nice video! Some uses for the second screen palette need to be planned from the beginning to work indeed. One use that doesn't require planning is for example if you want to add splitscreen to your game. To prevent the screen palette to affect the other player's screen (in a fade out/in) just use pal 2 in the second half! Also, it's interesting to note that in the classic Sonic games, the UI changed colors underwater with the screen palette :)
I haven't ever coded in pico-8 but I still watch your videos, you make it very interesting and I'm amazed at what the community comes up by manipulating memory on a virtual console!
Sooo... I know this is a year old or so, but you could have a "conveyor belt" effect for the background colours, where you perform a left shift operator on the bit mask and once the bit mask is full of ones, you clear it and move the positions of all the colours in the secondary palette up by one place, giving it a nice flowing effect. This is awesome!! I was not convinced beforehand, but I am gonna go get Pico 8 now
That bonevolt example is so cool, it really reminds me of like ZX Spectrum workarounds where sometimes multiple things would need to share colours briefly.
found this thing on a forum dive a little while back, but it's nice to see a comprehensive explanation. I'll have to keep this in mind if I ever need any of these effects
34:12 But how do you manipulate the width of each band on the gradient effect? By default doesn't it just render them all equal distance across the length of the entire screen?
So. I have some questions for you. #1 How long have you been using PICO-8? #2 What was the first game you made in PICO-8? #3 What was your first programming language? #4 What was the first game you ever made?
#1 Since Summer 2018 #2 Breakout #3 BASIC on the Atari 130XE #4 A text-based submarine simulator. You typed commands and the submarine would either dive or ascend to the surface. That's all there was. There was no gameplay to speak of. It was amazing.
The rotate screen thing is cool but I just assumed you'd made one palette with half the normal and half the default colours, and another palette with the other halves, and switched halfway down the display.
@@LazyDevs oh yeah, it's not a general solution, I'm just set up by years of nes videos to look for a programming trickery answer before a secret perform feature 🙂
I always look forward to your videos mate. I don't know why but I was convinced you were in Japan rather than China lol. I just got an RG351P which apparently can run Pico 8 natively and is (I feel) a much better alternative to the Gameshell, the GPi and the (RIP) PocketCHIP. Any thoughts on this device? Cheers!
I want to do a video on the Anbernic devices. I have the RG350M and I might pull the trigger on the upcoming RG351M - basically the same as RG351P but with wifi. I'm also waiting for the next update of the Pico-8 emulator.
@@LazyDevs if you don't mind me asking where I can find a tutorial on it. And I'm willing to accept that I can't share it on splore since the larger projects I'm wanting to make just some interesting designs.
I don't know much about Pico-8 but i think i can give it a try but i got question, can i use this update60 function the way that one frame i clear screen and using main palette, and for second frame i don't clear the screen and then using only second (secret) palette? So i can draw 2 sets of sprites with totally different colours? Then i can keep my game logic running on every second frame so besides using update60 it will really run at 30fps with 32 colours split by 16 on each frame?
No that won't work becasue changing the Screen Palette will retroactively change the color of the contents of the screen. This is the difference between Screen Palette and Draw Palette.
Pretty much! Bonevolt on the BBS (i.e. Lexaloffle's website forum) initially shared some ideas for colorizing different sections of the screen with different palettes. But then Zep suddenly showed up with a code snippet that uses the hidden secondary-palette feature that was sitting right within PICO-8, and is capable of supporting most of the ideas Bone had given in his post. Oh, and the gradient mode was also discovered when we were experimenting poking different values into 0x5F5F (we haven't found any other modes besides the 2 that have already been documented so far). Zep's snippet: www.lexaloffle.com/bbs/?pid=78509#p
Oof. Yeah I guess in that they are all retro systems. But the specs are different. NES has way more colors to chose from but also restricted in the ammount you can use per sprite. ST is a full home computer vastly more capable than Pico-8, not only in terms of color selection. This is literally the first time I heard of ESPboy - seems like a more modern DYI platform, not really the same ballpark as the other two. It does have the same resolution but for the life of me I cannot find any information on the color capabilities. As for Sound, it’s dificult to really compare the specs. There aren’t any good objective metrics to do meanigful comparissons. Not sure why you singled out the WonderSwan but even the original GameBoy outperforms Pico-8 in many ways.
@@LazyDevs The Nintendo Game Boy has 2 pulse channels, 1 PCM wave channel and one noise channel, while the Bandai WonderSwan has 4 PCM wave channels which can be programmed to be anything, including noise. The Pico-8 also has 4 channels all with programmable waveforms. The Pico-8 sound chip just sounds like a WonderSwan. As for the ESPboy, there's a function called "setpalette" which allows the system to alter the palette with any colour in any slot, making it similar to the Atari ST in that regard, because they both only display 16 colours at once.
@@mypkamax I am familiar with the WonderSwan. Although I have never coded for it. I see why you picked it. WonderSwan's PCM capabilities aren't really the same as Pico-8's "Custom Instruments". WonderSwan allows you to customize sound at waveform level. Pico-8 Custom Instruments don't have that resolution. They are short sound effects that consist of the same 8 base waveforms in the end. It's true that the GameBoy is more restrictive in some ways. But also had at least one true PCM channel and some other bells and whistles. I suggested it mainly because just subjectively it tends to SOUND similarly to Pico-8. And really this should be the takeaway here. Pico-8's restrictions are not driven by any hardware. They are chosen by Zep, the developer. They tend to be a lot easier to use and more flexible than actual retro hardware while looking intentionally constrained. So we might never actually find a shoe that fits. The goals of Pico-8 and actual retro hardware are just inherently different.
In the future I want to make a game that completely defies expectations for pico 8... higher res, 32 colors, good graphics... at maybe the expense of framerate lol Maybe I can find some clever way of manipulating this stuff. Building my arsenal per say. I can already think of trading out some colors for secondary display pallette gradient stuffs.
Rather amazing that the dev of Pico8 even did this to his virtual machine. But then again I wonder why he even bothered to have an alternate palette? I mean part of the charm of this machine is the strict definition of the "hardware", and this sort of waters it out being not quite a Pico8 again? Sure its cool for those seeking that extra challenge and want higher color fidelity. Again, odd he even bothered to add this kind of feature.
I used the gradient effect to make a rainbow cursor in the editor (⚠Warning⚠ : This also changes the code editor) function _init() for i=0,15 do pal(i,i+128,2) end end function _update() poke(0x5f5f,0x30+1) memset(0x5f70,0b10101010,17) poke(0x5f2e,135) --poke(0x5f2c,135) end function _draw() cls() map() spr(1,60,60) end
This isn't 8 bit at all. I loved Pico 8 for the idea of being 8 bit. But they have destroyed of with these 16bit ideas. You had it right, then you renewed it. Your first fault was adding reverb. That didn't happen until the 16snes nes. Do you even 8bit bro?
This is entirely consistent with the design, specifications and feel of 8bit systems. For instance, the NES could display up to 13 different background colours, and 12 sprite colours, giving a total maximum of 25 unique colours on-screen. But through Color Emphasis bits and clever PPU tricks you could theoretically push the system to achieve up to 512 colors. Pico-8 is still simpler and more restrained compared to that. Chill.
Very nice video! Some uses for the second screen palette need to be planned from the beginning to work indeed. One use that doesn't require planning is for example if you want to add splitscreen to your game. To prevent the screen palette to affect the other player's screen (in a fade out/in) just use pal 2 in the second half! Also, it's interesting to note that in the classic Sonic games, the UI changed colors underwater with the screen palette :)
This is so intresting to see how Zep hide lot of things in PICO-8. I remember when someone discover this on Twitter this were insance
I haven't ever coded in pico-8 but I still watch your videos, you make it very interesting and I'm amazed at what the community comes up by manipulating memory on a virtual console!
Sooo... I know this is a year old or so, but you could have a "conveyor belt" effect for the background colours, where you perform a left shift operator on the bit mask and once the bit mask is full of ones, you clear it and move the positions of all the colours in the secondary palette up by one place, giving it a nice flowing effect. This is awesome!! I was not convinced beforehand, but I am gonna go get Pico 8 now
Ooh ! That's a great idea!
That bonevolt example is so cool, it really reminds me of like ZX Spectrum workarounds where sometimes multiple things would need to share colours briefly.
Kinda similar to TIC-80's scanline palette swap trick. Albeit that allows you to swap it for any color.
found this thing on a forum dive a little while back, but it's nice to see a comprehensive explanation. I'll have to keep this in mind if I ever need any of these effects
Your videos are just like gems. Its rare to come by one, but if you do its a real treasure. Happy 2021
Last time I was this early I was still coding Breakout
34:12 But how do you manipulate the width of each band on the gradient effect? By default doesn't it just render them all equal distance across the length of the entire screen?
Using the bitmask you can tweak the width of the bands. Explained at 27:44
So. I have some questions for you.
#1 How long have you been using PICO-8?
#2 What was the first game you made in PICO-8?
#3 What was your first programming language?
#4 What was the first game you ever made?
#1 Since Summer 2018
#2 Breakout
#3 BASIC on the Atari 130XE
#4 A text-based submarine simulator. You typed commands and the submarine would either dive or ascend to the surface. That's all there was. There was no gameplay to speak of. It was amazing.
@@LazyDevs Wow!
I made a 16 level greyscale display mode....
Great video! These features are so cool, I hope to see more games using them!
LOL, that intro. XD
18:32 Did you know about the ..= operator?
The color values are constantly being set to specific values. I don't know why.
The rotate screen thing is cool but I just assumed you'd made one palette with half the normal and half the default colours, and another palette with the other halves, and switched halfway down the display.
Yeah but that won't work if there is more than 16 colors in a line
@@LazyDevs oh yeah, it's not a general solution, I'm just set up by years of nes videos to look for a programming trickery answer before a secret perform feature 🙂
I always look forward to your videos mate. I don't know why but I was convinced you were in Japan rather than China lol. I just got an RG351P which apparently can run Pico 8 natively and is (I feel) a much better alternative to the Gameshell, the GPi and the (RIP) PocketCHIP. Any thoughts on this device? Cheers!
I want to do a video on the Anbernic devices. I have the RG350M and I might pull the trigger on the upcoming RG351M - basically the same as RG351P but with wifi. I'm also waiting for the next update of the Pico-8 emulator.
Do you have a tutorial for bank switching, or some form of it. Because I want to create larger projects.
It's called multicart. I don't have a tutorial, sorry. I avoid it since you can't have those projects hosted on Splore.
@@LazyDevs if you don't mind me asking where I can find a tutorial on it. And I'm willing to accept that I can't share it on splore since the larger projects I'm wanting to make just some interesting designs.
I don't know much about Pico-8 but i think i can give it a try but i got question, can i use this update60 function the way that one frame i clear screen and using main palette, and for second frame i don't clear the screen and then using only second (secret) palette? So i can draw 2 sets of sprites with totally different colours? Then i can keep my game logic running on every second frame so besides using update60 it will really run at 30fps with 32 colours split by 16 on each frame?
No that won't work becasue changing the Screen Palette will retroactively change the color of the contents of the screen. This is the difference between Screen Palette and Draw Palette.
Is there like a timestamp for the minute of this that actually matters so I dont have to watch half an hour to see how to get alternate colors?
This is the "32 colors at the same time" video. The alternate colors video is here:
ua-cam.com/video/AsVzk6kCAJY/v-deo.html
So this was always possible, but nobody knew these bits anything until someone asked about if you could do this effect?
Pretty much!
Bonevolt on the BBS (i.e. Lexaloffle's website forum) initially shared some ideas for colorizing different sections of the screen with different palettes. But then Zep suddenly showed up with a code snippet that uses the hidden secondary-palette feature that was sitting right within PICO-8, and is capable of supporting most of the ideas Bone had given in his post. Oh, and the gradient mode was also discovered when we were experimenting poking different values into 0x5F5F (we haven't found any other modes besides the 2 that have already been documented so far).
Zep's snippet: www.lexaloffle.com/bbs/?pid=78509#p
Pico-8's similarities to other systems:
Colour: NES, Atari ST, ESPBoy,
Sound: Bandai WonderSwan
Oof. Yeah I guess in that they are all retro systems. But the specs are different. NES has way more colors to chose from but also restricted in the ammount you can use per sprite. ST is a full home computer vastly more capable than Pico-8, not only in terms of color selection.
This is literally the first time I heard of ESPboy - seems like a more modern DYI platform, not really the same ballpark as the other two. It does have the same resolution but for the life of me I cannot find any information on the color capabilities.
As for Sound, it’s dificult to really compare the specs. There aren’t any good objective metrics to do meanigful comparissons. Not sure why you singled out the WonderSwan but even the original GameBoy outperforms Pico-8 in many ways.
@@LazyDevs The Nintendo Game Boy has 2 pulse channels, 1 PCM wave channel and one noise channel, while the Bandai WonderSwan has 4 PCM wave channels which can be programmed to be anything, including noise. The Pico-8 also has 4 channels all with programmable waveforms.
The Pico-8 sound chip just sounds like a WonderSwan.
As for the ESPboy, there's a function called "setpalette" which allows the system to alter the palette with any colour in any slot, making it similar to the Atari ST in that regard, because they both only display 16 colours at once.
@@LazyDevs You've heard about the Bandai WonderSwan?
@@mypkamax I am familiar with the WonderSwan. Although I have never coded for it.
I see why you picked it. WonderSwan's PCM capabilities aren't really the same as Pico-8's "Custom Instruments". WonderSwan allows you to customize sound at waveform level. Pico-8 Custom Instruments don't have that resolution. They are short sound effects that consist of the same 8 base waveforms in the end.
It's true that the GameBoy is more restrictive in some ways. But also had at least one true PCM channel and some other bells and whistles. I suggested it mainly because just subjectively it tends to SOUND similarly to Pico-8.
And really this should be the takeaway here. Pico-8's restrictions are not driven by any hardware. They are chosen by Zep, the developer. They tend to be a lot easier to use and more flexible than actual retro hardware while looking intentionally constrained. So we might never actually find a shoe that fits. The goals of Pico-8 and actual retro hardware are just inherently different.
Sound is more in line with a lite sid chip. Doesn't have all the filters, but its getting there.
Like switching palette on atari st?
What if there was a way to have basically a single pixel by turning the alternate palette on and off really fast and with the right timings?
Not sure what you have in mind. Can you elaborate?
@@LazyDevs Honestly I can't even remember. It's been a couple days lol
In the future I want to make a game that completely defies expectations for pico 8... higher res, 32 colors, good graphics... at maybe the expense of framerate lol
Maybe I can find some clever way of manipulating this stuff. Building my arsenal per say.
I can already think of trading out some colors for secondary display pallette gradient stuffs.
That's a fun thing to try!
We now have Picotron
Rather amazing that the dev of Pico8 even did this to his virtual machine. But then again I wonder why he even bothered to have an alternate palette? I mean part of the charm of this machine is the strict definition of the "hardware", and this sort of waters it out being not quite a Pico8 again? Sure its cool for those seeking that extra challenge and want higher color fidelity. Again, odd he even bothered to add this kind of feature.
I think I heard there were similar "hidden" features in some old hardware. So there is some precedence.
Quality intro and content 😘👌
so it is like appliying shaders?
Shaders are its own thing
I used the gradient effect to make a rainbow cursor in the editor (⚠Warning⚠ : This also changes the code editor) function _init()
for i=0,15 do
pal(i,i+128,2)
end
end
function _update()
poke(0x5f5f,0x30+1)
memset(0x5f70,0b10101010,17)
poke(0x5f2e,135)
--poke(0x5f2c,135)
end
function _draw()
cls()
map()
spr(1,60,60)
end
Ha, that's a good idea. The code doesn't work for me. I get a rainbow background but the cursor stays white.
It would be cool if dithering could be a thing.
What kind of dithering? Pixel dithering or temporal?
@@mypkamax uhh, I think pixel dithering
@@lorddorogoth Isn't it already?
@@mypkamax I meant dithering between the all the 32 colors rather than only being able to access the second color palette in bands.
Current version has a lot of bugs. Don't know why he's waiting so long to update.
Plz make Godot Tutorials , i learnt PICO-8 only from your breakout tutorials, only you explain things better :)
how to print text in Russian ?
That'll be tough. Cyrillic characters are not part of ASCII.
Get a Russian sprite sheet.
64 colors
This isn't 8 bit at all. I loved Pico 8 for the idea of being 8 bit. But they have destroyed of with these 16bit ideas. You had it right, then you renewed it. Your first fault was adding reverb. That didn't happen until the 16snes nes. Do you even 8bit bro?
This is entirely consistent with the design, specifications and feel of 8bit systems. For instance, the NES could display up to 13 different background colours, and 12 sprite colours, giving a total maximum of 25 unique colours on-screen. But through Color Emphasis bits and clever PPU tricks you could theoretically push the system to achieve up to 512 colors. Pico-8 is still simpler and more restrained compared to that. Chill.