Sneeze-FinalDocumentation

I spent my time catching up on past projects, and I worked on the telematic project and created a drawing website that has rooms. These rooms would be used as prompts for people around the world to draw together from a Twitter bot account that would present a new prompt everyday. The Twitter account is @CollabDrawABCs and you can view it here. Also, here is my blog post about the deliverable.

The way I achieved merging a drawing app with an app that has rooms was by looking at template code. I used the Persistent drawing app code as well as the Piano rooms code as the basis of my project.

I had some trouble in the beginning for going about merging rooms into the drawing app because the drawing app used a database to store the drawings. This made creating rooms different from the Piano rooms code, and made me understand lowdb and socket.io better.

I initially thought about having a roomID be passed as arguments into functions for the server to understand and have the server store the data separately, but that ended up not working. After doing a couple of other approaches, I finally understood what needed to be done to get this functioning.  

This is where packages to the server get packaged. Each package has a roomID in the array and gets serialized and unserialized together with the line data and color data. This package then gets stored in the database by the server.

This is on the client end. It receives a package and removes the last two elements which are room and color before creating the lines.

These are the two main things I changed. There were other things that needed tweaking like drawings that are not stored and are being drawn live and changing clients to store roomID as well.

I also created a twitter bot to tweet out prompts each day. I used cheapbotsdonequick, which basically handles everything for me.

It uses Tracery which basically allows you to replace a variable in a base line of text with random other pieces of text. After that I set it to tweet once everyday.