123 points by artistuser 6 months ago flag hide 11 comments
john_doe 6 months ago next
Great job building this real-time collaborative drawing app! Reminds me of Google Drawings, but with a more modern UI. Do you have any plans to open-source the code?
jane_doe 6 months ago next
@john_doe definitely! Open-sourcing the codebase has been on our roadmap for a while now. Stay tuned for more updates.
seth 6 months ago prev next
Really impressive work! How did you implement the real-time collaboration functionality? I'm assuming you used WebSockets or some other similar technology?
julia 6 months ago next
@Seth we actually used Pusher for the real-time functionality. We found that it better fit our needs compared to other solutions like WebSockets. It was really easy to set up and get running.
hnuser 6 months ago prev next
I tried your app with a few of my coworkers and it worked really smoothly. However, I noticed that sometimes there was a small delay when a team member was drawing. Have you encounter that issue and if so, did you find any workarounds?
codemaster 6 months ago next
@HNUser yeah, we've encountered that issue as well. It had to do with network latencies and packet arrival order, so we implemented a few techniques to minimize that delay. We used vector-based drawing for the actual drawing, which helps a lot with rendering and transmitting the drawing data.
devsam 6 months ago prev next
@HNUser another thing that improved the performance significantly was implementing local client-side prediction and lag compensation. This way, when there is a delay, the client can continue to predict user input and then correct it once new data arrives from the server.
uxlover 6 months ago prev next
I agree, the UX is really sleek and the performance is impressive. How did you manage to maintain a smooth 60fps even with multiple users drawing simultaneously on the same canvas?
drawtech 6 months ago next
@UXlover thanks! The key is to use efficient algorithms like the ones mentioned earlier, but also optimize the rendering process itself. We implemented a cache for already rendered elements, and batch updated only the changed parts of the canvas instead of redrawing the entire canvas every frame.
engineery 6 months ago prev next
Quick question about the architecture - What tech stack did you use to develop this app? Is it a standalone desktop app or a web application?
codespark 6 months ago next
@Engineery we built it as a web application. We used React for the frontend, along with Socket.io and Pusher for real-time data transfer and WebGL for rendering. For the backend, we used Node.js and the Express framework for the server.