Inspiration 🤩

The first hint of the idea for this project came to me when I saw the Break Solana dapp. It was really impressive to see how fast Solana was and I knew this would enable use cases that were previously impossible in the blockchain space. I discussed this with my friends and family, one thing led to another and at some point we started talking about painting on the blockchain. I knew there was something there and I immediately jumped at the idea and started researching and hacking stuff together and the end result is Solpixels :)

What it does 🤔

Solpixels is all about painting color pixels on a big canvas with other players. Each pixel is stored directly on the Solana blockchain forever! ...or at least until someone else paints over it 🤷

It's as simple as that, but it's also sort of a twist on the idea of NFTs - there's no one owner / creator of the artwork, but instead it's a collaboratively created piece that's constantly changing and evolving. Assuming anyone actually likes the idea enough to out something there, that is.

How I built it 👷

The heart of Solpixels is a single Solana program filled to the brim with color data for each pixel on the canvas. The data limit of a single account is 10MB and 1 byte can store color data for 2 pixels (4 bits per pixel), so that works out to around 20 million pixels for everyone to paint to literally any of the 16 colors that I picked.

The UI is based on the Pixelcanvas* (a non-blockchain project) codebase which I repurposed to work with Solana, modernized it and also gave it a personal touch :)

*I have no affiliation with Pixelcanvas but wanted to give a shout out to them because I (obviously) really like what they're doing and their work saved me a lot of time. So, cheers for that! 🍻

Challenges I ran into 🤯

It was interesting to learn some of the constraints of the Solana blockchain, like the 10MB per account storage limit. Of course, I could've just used more accounts, but another limitation is that you need a whopping 71 SOL 🤑 to make that 10MB account rent exempt, so I had to draw the line somewhere :) There were also other things I considered, like 1 account per pixel but keeping track of all the changes in all those accounts and showing them in real time in the UI just seemed like too much. Maybe in some future version 🤔

Accomplishments that I'm proud of 🥳

I'm really happy that I made my crazy idea work and I completed the project! It was great fun figuring out all the problems, small and big and I hope you will have fun playing with Solpixels :)

What I learned 🧑‍🎓

Making Solpixels was a great experience and it made me even more certain that we haven't yet fully tapped into the potential of high TPS, low latency blockchains like Solana and I can't wait to see what crazy ideas other people will have :)

What's next for Solpixels 📈

I'm excited to see what the Solana community thinks about Solpixels! I have a long list of ideas about what I can do next with the project and I'm looking forward to implementing them :)

+ 35 more
Share this project:

Updates