Collaborative Pixel Art Editor with CRDTs

Summary of my bookmarked links from Oct 10th, 2023


  • Building a Collaborative Pixel Art Editor with CRDTs

    In this blog post, the author explores the concept of CRDTs (Conflict-Free Replicated Data Types) and demonstrates their implementation in a collaborative pixel art editor. The post begins by introducing the CRDT concept and the types implemented (Last Write Wins Register and Last Write Wins Map). The author then proceeds to explain how these CRDTs are used to build the pixel art editor, emphasizing JavaScript and graphics programming. The post assumes minimal prior knowledge of CRDTs and TypeScript. It covers the implementation details of the CRDT, including handling coordinates, keys, and merging states. Additionally, the blog provides details on setting up the user interface with HTML, CSS, and JavaScript for two editors. It concludes with an overview of the PixelEditor class, detailing its constructor, color handling, event handling, and pixel drawing logic. The post offers a comprehensive guide to using CRDTs in building collaborative applications.