Drag the background!

Search source code (of Worlds)

Search JavaScript code of all Worlds for: AB socket


The San Andreas ...
1047 runs ♦ 0 likes
By Effa  
Created: 1 Dec 2022
Modified: 17 Sep 2023
AB.socketStart ( password );
function cj() { changeBox(2); AB.socketOut (2); }
function bigsmoke() { changeBox(3); AB.socketOut (3); }
function ryder() { changeBox(4); AB.socketOut (4); }
function sweet() { changeBox(5); AB.socketOut (5); }
Cook A Long
301 runs ♦ 1 like
By Joseph Adeosun  
Created: 3 Dec 2022
Modified: 17 Sep 2023
Attempted port of "Chicken Alfredo Cooking Game" by Emily Cerequas and Jenny Kowalski. https://q...
AB.socketStart();
AB.socketOut ( data ); // server gets this, and sends the data to all clients running this World
// --- re-define AB socket handler functions -------------------------------------
// When someone else enters text, server will trigger AB.socketIn.
AB.socketIn = function(data)
Websocket buttons
234 runs ♦ 0 likes
By Starter user  
Created: 29 Feb 2020
Modified: 17 Sep 2023
Demo of Ancient Brain Websockets functionality. Run on multiple devices. Simple page uses button...
AB.socketStart();
AB.socketOut ( data ); // server gets this, and sends the data to all clients running this World
AB.socketIn = function(data)
Password Websock...
85 runs ♦ 0 likes
By Starter user  
Created: 14 Nov 2022
Modified: 17 Sep 2023
Password version of "Websockets boxes"
AB.socketStart ( password );
function baby() { changeBox(5); AB.socketOut (5); }
function skull() { changeBox(6); AB.socketOut (6); }
AB.socketIn = function(n) // incoming data on socket, i.e. clicks of other player
Find Woody's Hat
613 runs ♦ 1 like
By Benjamin Olojo  
Created: 4 Dec 2022
Modified: 11 Sep 2024
Clone of "Capture the Hat" by Tuomas Bazzan
// use AB library for WebSocket Communication
AB.socketOut(hats); // send update for number of hats caught to the other user's world
AB.socketUserlist = function ( array ){
AB.socketIn = function ( data ){
AB.socketOut("captured"); // the user running the game has been captured, alert other user
Run Run Run!
5771 runs ♦ 3 likes
By Duarte Martinho  
Created: 15 Nov 2022
Modified: 17 Sep 2023
CA318 Project by Duarte Martinho and Rion Xheladini. Modified port of "Crossy Road" by Hunor Mar...
AB.socketStart(); // Calls the socket start function
AB.socketOut({
AB.socketUserlist = function (e) { // Function to handle socket user list
host = AB.socket.id; // Sets the host to the socket id
AB.socketIn = function (element) {
Chess
5904 runs ♦ 2 likes
By Eoin Daly  
Created: 19 Oct 2022
Modified: 17 Sep 2023
A game of chess by the beach, on a beautiful day
AB.socketStart();
if ( AB.socket )
if (AB.socket.connected)
AB.socketOut (data); // Sends the data to the other clients.
AB.socketUserlist = function(userList)
Lego
544 runs ♦ 0 likes
By Michael Walsh  
Created: 14 Nov 2022
Modified: 1 Oct 2023
Clone of "webgl_interactive_voxelpainter" by threejs.org porting project
Object.defineProperty(AB, "socket", {
Object.defineProperty(AB, "socket", { value: v });
AB.socketOut ({
AB.socketOut ({
AB.socketOut ({
Wordle 3D v1
693 runs ♦ 2 likes
By Jed Hazaymeh  
Created: 1 Dec 2022
Modified: 17 Sep 2023
3D remake of the popular word puzzle game!
AB.socketOut({
AB.socketStart();
AB.socketIn = function ({ id, payload }) {
AB.socketUserlist = function (users) {
Competitive Hangman
440 runs ♦ 2 likes
By David Jusev  
Created: 5 Dec 2022
Modified: 17 Sep 2023
Play hangman against friends. Multi-user port of https://codingartistweb.com/2022/05/hangman-gam...
AB.socketStart();
AB.socketOut ( data );
AB.socketIn = function(data)
AB.socketUserlist = function ( a )
AB.socketOut ( data ); // server gets this, and sends the data to all clients running this World
Dragon Ball Meng...
979 runs ♦ 0 likes
By MENGTE ZHU  
Created: 14 Nov 2022
Modified: 22 Jan 2024
AB.socketStart();
function Goku() { changeBall(7); AB.socketOut (7); }
function Vegeta() { changeBall(8); AB.socketOut (8); }
function Gohan() { changeBall(9); AB.socketOut (9); }
function Piccolo() { changeBall(10); AB.socketOut (10); }
Websocket chat
1076 runs ♦ 0 likes
By Starter user  
Created: 29 Feb 2020
Modified: 17 Sep 2023
Demo of Ancient Brain Websockets functionality. Run on multiple devices. Chat from one to the other.
AB.socketStart();
AB.socketOut ( data ); // server gets this, and sends the data to all clients running this World
// --- re-define AB socket handler functions -------------------------------------
// When someone else enters text, server will trigger AB.socketIn.
AB.socketIn = function(data)
3D Platform Game
260 runs ♦ 0 likes
By Ronghui  
Created: 5 Dec 2022
Modified: 17 Sep 2023
Race to the End! WASD to move.
AB.newSplash() // sends out time to socketout and calls the game to be over
AB.socketOut({
AB.socket.destroy();
AB.socketStart();
AB.socketIn = function(element)
Password Websock...
43 runs ♦ 0 likes
By Starter user  
Created: 14 Nov 2022
Modified: 17 Sep 2023
Password only Websocket world (web page version). Need to enter password. Only join with users w...
AB.socketStart ( password );
AB.socketUserlist = function ( a ) // when told users I am sharing with
AB.socketOut ( data ); // server gets this, and sends the data to all clients running this World with this password
AB.socketIn = function(data)
Lion Chase
496 runs ♦ 0 likes
By Martin Derwin  
Created: 30 Nov 2022
Modified: 17 Sep 2023
Don't get caught by the lions
AB.socketStart(); // start sockets
AB.socketIn = function(data) // incoming data on socket, i.e. key movements of other players
AB.socketOut(data);
Websockets boxes
848 runs ♦ 0 likes
By Starter user  
Created: 29 Feb 2020
Modified: 17 Sep 2023
Demo of Websockets in 3D World. Click to change the boxes on the other user's machine, while the...
AB.socketStart();
function baby() { changeBox(5); AB.socketOut (5); }
function skull() { changeBox(6); AB.socketOut (6); }
AB.socketIn = function(n) // incoming data on socket, i.e. clicks of other player
Space Odyssey
459 runs ♦ 0 likes
By Yiming Fu  
Created: 2 Dec 2022
Modified: 17 Sep 2023
Clone of "Websockets boxes" by Starter user
AB.socketStart();
function pink() { changeBox(1); AB.socketOut (1); }
function blue() { changeBox(2); AB.socketOut (2); }
AB.socketIn = function(n) // incoming data on socket, i.e. clicks of other player
Zombie Escape
4134 runs ♦ 6 likes
By Liam  
Created: 30 Nov 2022
Modified: 17 Sep 2023
Compete with another player to see who can survive the longes against a hoard of zombies!
if (AB.socket) {
if (AB.socket.connected) {
if(AB.socket)
if(AB.socket.connected)
AB.socketOut(lives)
Test Websockets
310 runs ♦ 0 likes
By Starter user  
Created: 14 Nov 2022
Modified: 17 Sep 2023
Test if Websocket server is up
AB.socketStart();
if ( AB.socket.connected ) $("#out").html ( "<p style='color:green; font-weight:bold;'> Websocket server up </p>" );
Mighty Spread
344 runs ♦ 0 likes
By Gareth Hogan  
Created: 12 Nov 2022
Modified: 17 Sep 2023
CA318 Project
AB.socketOut("Start"); // send out start command to all worlds so they remove the splash
AB.socketStart(); // start sockets
AB.socketIn = function(data) // incoming data on socket, i.e. clicks of other player
AB.socketOut(data);
Hunting Season
1419 runs ♦ 1 like
By Niall Kelly  
Created: 3 Nov 2022
Modified: 17 Sep 2023
The aim is simple, shoot as many targets as you can in 60 seconds. Watch out for the hawk's, the...
AB.socketStart();
if(AB.socket){
if(AB.socket.connected){
AB.socketOut(p1score);
if(AB.socket){
escape...
836 runs ♦ 2 likes
By Jon Bryan Ortiz  
Created: 22 Nov 2022
Modified: 17 Sep 2023
There are 10 pages scattered around the map. First person to find all 10 pages escapes...the res...
AB.socketUserlist = function (a)
AB.socketStart();
AB.socketIn = function(score)
if (AB.socket)
if (AB.socket.connected)
3D Snake
647 runs ♦ 1 like
By przemek biel  
Created: 29 Nov 2022
Modified: 17 Sep 2023
snake eats apple nom nom but in 3D
AB.socketStart();
if(AB.socket){ //if the socket is open
if(AB.socket.connected){ //and if the socket is connected
AB.socketOut(p1score); //send the score to the server
AB.socketIn = function (s){ //
Battleship
4332 runs ♦ 2 likes
By Aaron Crawford  
Created: 30 Oct 2022
Modified: 17 Sep 2023
AB.socketStart(); // Starts web sockets
if(AB.socket) // If the socket has loaded & connected
if(AB.socket.connected)
AB.socketOut(data); // Sends players boats positioning, current players score & turn
if(AB.socket)
Stack (Multiplayer)
583 runs ♦ 3 likes
By Alexandru  
Created: 6 Dec 2022
Modified: 17 Sep 2023
window.onbeforeunload = function () {AB.socket.destroy();}
AB.socketStart();
AB.socketOut({ event: "restart" });
AB.socketOut({ event: "gameFinished", score: getScore(), username: AB.myuserid });
AB.socketOut({ event: "restart", username: AB.myuserid })
A1_Draft (clone ...
0 runs ♦ 0 likes
By Sergiu Lucaci  
Created: 24 Nov 2022
Modified: 17 Sep 2023
Clone of "A1_Draft" by Dave
AB.socketStart();
function baby() { changeBox(5); AB.socketOut (5); }
function skull() { changeBox(6); AB.socketOut (6); }
AB.socketIn = function(n) // incoming data on socket, i.e. clicks of other player
bomb generator(m...
6 runs ♦ 0 likes
By Xiaoyu Lyu  
Created: 18 Dec 2022
Modified: 17 Sep 2023
Clone of "bomb generator(multi-user)" by Xiaoyu Lyu
AB.socketStart();
if(AB.socket){
if(AB.socket.connected){
AB.socketOut(num_fire_p1)
AB.socketIN = function(num_fire_p1){
Websockets boxes...
0 runs ♦ 0 likes
By Cian sullivan  
Created: 12 Nov 2022
Modified: 17 Sep 2023
Clone of "Websockets boxes" by Starter user
AB.socketStart();
function baby() { changeBox(5); AB.socketOut (5); }
function skull() { changeBox(6); AB.socketOut (6); }
AB.socketIn = function(n) // incoming data on socket, i.e. clicks of other player
Translation (clo...
1 run ♦ 0 likes
By Divya Venketasan...  
Created: 24 Nov 2024
Modified: 2 Sep 2025
Clone of "Translation (clone by Divya Venketasan Shanmugam)" by Divya Venketasan Shanmugam
AB.socketStart ( password );
AB.socketUserlist = function ( a ) // when told users I am sharing with
AB.socketOut(messageData); // server gets this, and sends the data to all clients running this World
// --- re-define AB socket handler functions -------------------------------------
// When someone else enters text, server will trigger AB.socketIn.
Red vs Blue (clo...
7 runs ♦ 0 likes
By Yiming Fu  
Created: 1 Dec 2022
Modified: 17 Sep 2023
Clone of "Red vs Blue" by Octavian
AB.socketStart();
function baby() { changeBaby(); AB.socketOut (); }
function skull() { changeSkull(); AB.socketOut (); }
AB.socketIn = function() // incoming data on socket, i.e. clicks of other player
AB.socketIn = function()
Final_Version (c...
52 runs ♦ 0 likes
By Sergiu Lucaci  
Created: 6 Dec 2022
Modified: 17 Sep 2023
Clone of "Final_Version" by Dave
AB.socketStart();
if ( event.keyCode == 32 ) { fireMissile(); AB.socketOut(explodeAsteroids());} //if we press spacebar on keyboard we blow up the a
AB.socketIn = function(closestasteroid2ship) // incoming data on socket, i.e. clicks of other player
Websocket button...
0 runs ♦ 0 likes
By Przemyslaw Majda  
Created: 15 Nov 2022
Modified: 17 Sep 2023
Clone of "Websocket buttons" by Starter user
AB.socketStart();
AB.socketOut ( data ); // server gets this, and sends the data to all clients running this World
AB.socketIn = function(data)
New World (clone...
0 runs ♦ 0 likes
By MENGTE ZHU  
Created: 5 Dec 2022
Modified: 5 Dec 2022
Clone of "New World (clone by Xiaoyu Lyu)" by Xiaoyu Lyu
AB.socketStart();
if(AB.socket){
if(AB.socket.connected){
AB.socketOut(p1score)
AB.socketIn = function (s){
New World (clone...
2 runs ♦ 0 likes
By MENGTE ZHU  
Created: 21 Mar 2024
Modified: 21 Mar 2024
Clone of "New World" by Michael Walsh
AB.socketOut({
if(gInitialised || !gGLTF || !AB.socket || !gSoldier) return;
AB.socketStart();
Object.defineProperty(AB, "socket", {
Object.defineProperty(AB, "socket", { value: v });
Websockets boxes...
2 runs ♦ 0 likes
By Cian sullivan  
Created: 14 Nov 2022
Modified: 17 Sep 2023
Clone of "Websockets boxes" by Starter user
AB.socketStart();
function baby() { changeBox(5); AB.socketOut (5); }
function skull() { changeBox(6); AB.socketOut (6); }
AB.socketIn = function(n) // incoming data on socket, i.e. clicks of other player
Websockets boxes...
1 run ♦ 0 likes
By Dylan Corbari  
Created: 24 Nov 2022
Modified: 17 Sep 2023
Clone of "Websockets boxes" by Starter user
AB.socketStart();
function baby() { changeBox(5); AB.socketOut (5); }
function skull() { changeBox(6); AB.socketOut (6); }
AB.socketIn = function(n) // incoming data on socket, i.e. clicks of other player
Websocket chat (...
0 runs ♦ 0 likes
By Scott Brady  
Created: 12 Nov 2022
Modified: 17 Sep 2023
Clone of "Websocket chat" by Starter user
AB.socketStart();
AB.socketOut ( data ); // server gets this, and sends the data to all clients running this World
// --- re-define AB socket handler functions -------------------------------------
// When someone else enters text, server will trigger AB.socketIn.
AB.socketIn = function(data)
Websockets boxes...
2 runs ♦ 0 likes
By Niall Kelly  
Created: 2 Nov 2022
Modified: 17 Sep 2023
Clone of "Websockets boxes" by Starter user
AB.socketStart();
function baby() { changeBox(5); AB.socketOut (5); }
function skull() { changeBox(6); AB.socketOut (6); }
AB.socketIn = function(n) // incoming data on socket, i.e. clicks of other player
Websocket chat (...
0 runs ♦ 0 likes
By Faith Njekwe  
Created: 28 Oct 2025
Modified: 28 Oct 2025
Clone of "Websocket chat" by Starter user
AB.socketStart();
AB.socketOut ( data ); // server gets this, and sends the data to all clients running this World
// --- re-define AB socket handler functions -------------------------------------
// When someone else enters text, server will trigger AB.socketIn.
AB.socketIn = function(data)
Online Tower Bui...
0 runs ♦ 0 likes
By John Lasis  
Created: 5 Dec 2022
Modified: 17 Sep 2023
Clone of "Online Tower Builder" by Joseph Adedayo
AB.socketStart();
AB.socketIn = function(data) // takes in oppenent score and builds opponent tower next to user
AB.socketOut ( data ); // server gets this, and sends the data to all clients running this World
AB.socketUserlist = function ( a ) // get information of users available


The background is a program, showing the JavaScript graphics used on this site.
The globes light up when you log in.
 
Font:

Users retain ownership of user content.

Platforms      Stats      The name      Terms and conditions

Call for partners      Contact

Call for partners!
Ancient Brain is looking for a partner to co-write a JavaScript or Python coding book for schools, to be used worldwide. This would be a course for students in learning to code from scratch. The book and course will be integrated into the Ancient Brain site. This is an opportunity for someone looking to develop a course and textbook to partner with a site to promote it. Read more.