The Paper Pilot

Babble Buds

Source Code URealms Post

Babble buds is a free, open source virtual puppet show software. It is heavily based on the non-public software called “Puppet Pals”, used in URealms Live. The software is written in javascript using a rendering library called PIXI.js and distributed as an electron app.

Users can create puppets with different faces for different emotions, and then use the puppet on a stage where you and other users can each make your respective puppets move, change emotions, and “babble” at each other. The stage has a green screen feature and can be popped out, which gives the users tons of possibilities in terms of using the program for a role playing live stream, faux video chatting with friends, game development, or whatever else you want!

Credit to @TheGravyNator for the awesome puppet on display in the screenshot.

Networking

It can be a bit complicated to connect to other users (but no more than it would be for, say, a minecraft server), so here are some basic instructions on the various methods you can try:

  1. To connect to other instances on the same computer, leave the IP address set to “localhost” and just open the application a bunch of times, press “Host Server” on one of them, and “Connect to Server” on the rest.

  2. To connect over LAN (e.g. two people in the same house), have one person press “Host Server”, and find your local IP (generally in the format of 192.168.1.XXX). Other users put that IP in the “Server IP” field in project settings, and then press “Connect to Server”.

You have three options for connecting to people world wide:

  1. One user can port forward port 8080 (or whatever port they prefer, its configurable), press “Host Server”, find their global IP (google search “what’s my IP?” and google will tell you this), and the other users put that into the “Server IP” field.

  2. You can use hamachi, and have everyone connect to the same hamachi room. Then one user presses “Host Server”, and the others will plug in the IP address for that user, as given by hamachi, into the “Server IP” field, at which point they should be able to connect.

  3. If you have a server running somewhere (through AWS or Azure or something), on the github page there is a “server.js” file you can run that will host the server for you, and then people just connect to the IP of your server.

I realize some of that sounds complicated, but fortunately you only need to do most of it once. For example, after you’ve found the IP you need to use, that gets saved in the project file so you don’t need to find it again.

Hosting

Here are some rough instructions for setting up an AWS server to run babble buds. It could work on any server you have so long as you can open a port on it.

  1. Create an AWS instance running Ubuntu (just so you can use aptitude, you could also use a different distribution, if you know how to search for the needed packages in its respective package manager). If you’re using a server you’ve set up previously, then you can skip this step.

  2. Install node and the node package manager:

     sudo apt-get install nodejs npm
    

    If you’re not running ubuntu then that command will look different. There is probably a tutorial out there somewhere if you look up “How to install node and npm on ". The rest of the commands should work on any operating system, even Windows.

  3. Install the node packages listed in server.js:

     npm install fs-extra
     npm install socket.io
     npm install socket.io-stream
    

    I plan on making a package.json for the standalone server so that you’d just need to run “npm install” and it’d automatically install all 3 of those for you. It should be pointed out you don’t need to install http or path, as those are included in nodejs.

  4. In whatever form you choose, get the server.js file onto your server. You could do this over scp or by downloading it from github. You only need the server.js file!

  5. Start the server by running “node server.js”. I’d recommend doing this in a program called tmux or screen, as those will allow you to start the server, and exit out of the AWS instance without closing the server. The server will now be running, and all the users can just put in the IP address of your AWS server into Babble Buds and press “Connect to Server”. They will not need to deal with node or npm or anything else.

javascript pixi.js