Skip to content

jazinheira/pixeLoot

Repository files navigation

-----------  --------  ---      --- ------------ ----           --------     --------   ------------ 
************ ********   ***    ***  ************ ****          **********   **********  ************ 
---      ---   ----      ---  ---   ----         ----         ----    ---- ----    ---- ------------ 
************   ****       ******    ************ ****         ***      *** ***      ***     ****     
-----------    ----       ------    ------------ ----         ---      --- ---      ---     ----     
****           ****      ***  ***   ****         ************ ****    **** ****    ****     ****     
----         --------   ---    ---  ------------ ------------  ----------   ----------      ----     
****         ********  ***      *** ************ ************   ********     ********       ****     
                                                                                                     


Search with loot(uint256 id) to try to loot a specific pxL. Each pxL has a unique color and there are only 512! There is currently no use for them, but perhaps a future alchemist will find a way to transmute the pxL or imbue other loot with its color properties...


What is this?

pixeLoot is a small experiment to write an NFT project that is self contained on the blockchain. It was inspired by Loot (for Adventurers) and the other related projects that sprang up around the same time.

Why?

One major weakness with most image-based NFTs is that the on-chain data is only a link to an image that has to be hosted somewhere, by someone, going into the future. That image data can be modified - I've seen many point at unsecured URLs and not include any hash of the expected data - or eventually just lost. This negates much of the decentralization and persistence that makes NFTs an interesting solution in the first place, not to mention being a security risk. I asked myself if it were possible to include that image data in the NFT itself.

The original idea was to embed a GIF into the NFT - just a single pixel in order to save on expensive on-chain data costs and complexity. The NFTs would have different colors that would be able to be generated by the smart contract. After a lot of research and testing, I found that GIF standards were less well documented than I'd like and it was hard to get the color consistent across browsers and applications; rather than this becoming a research project into reverse engineering how GIFs work, I opted to generate SVGs instead.

About

An exploration of using on-chain image generation for NFTs.

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages