Drag the background!

Search JS code (of Worlds)

Search JavaScript code of all Worlds for: AB msg


Landmark Museum
118 runs ♦ 0 likes
By Christopher Dobey  
Created: 4 Dec 2023
Modified: 4 Feb 2024
A walkthrough tour of the most significant landmarks in any given country. Three.js 3D World wit...
AB.msg(thehtml, 1);
Password Websock...
66 runs ♦ 0 likes
By Starter user  
Created: 14 Nov 2022
Modified: 17 Sep 2023
Password version of "Websockets boxes"
AB.msg ( ` <hr> <p> Multi-user game. Pick a side. Click buttons to change boxes on all users' machines. Drag the camera. <p>
GA (TSP)
990 runs ♦ 0 likes
By "Coding Train" p...  
Created: 24 Jun 2019
Modified: 17 Sep 2023
Genetic Algorithm to solve the Traveling Salesman Problem.
AB.msg ( "Number of cities: " + (totalCities) +
AB.msg ( "<br> Number of routes looked at: <b> All possible routes </b> " +
AB.msg ( "<br> Number of routes looked at: " + routesLookedAt +
AB.msg ( "<p> Generation: " + gen +
Zombie Death Baby
771 runs ♦ 1 like
By Starter user  
Created: 11 Jun 2018
Modified: 17 Sep 2023
How to make a fun touch game for mobile. Touch drag and tap objects. Mouse drag and click object...
AB.msg ( buttons, 3 );
AB.msg ( " Step: " + AB.step + " Score: <span style='" + scoreStyle + "'>" + score + "</span>" );
if ( AB.abortRun ) AB.msg ( " <br> <font color=red> <B> You are trapped. You lose! </B> </font> ", 2 );
else AB.msg ( " <br> <font color=green> <B> Run over. You survived! </B> </font> ", 2 );
Websockets boxes
802 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.msg ( ` <hr> <p> Multi-user game. Pick a side. Click buttons to change boxes on all users' machines. Drag the camera. <p>
Simple World
1645 runs ♦ 2 likes
By Starter user  
Created: 1 Oct 2016
Modified: 17 Sep 2023
Simple World with a Mind-controlled agent, randomly-moving enemy, paint blocks with texture.
AB.msg ( " Step: " + AB.step + " out of " + AB.maxSteps + ". Score: " + score );
Mighty Spread
331 runs ♦ 0 likes
By Gareth Hogan  
Created: 12 Nov 2022
Modified: 17 Sep 2023
CA318 Project
AB.msg(winner, 7) // shows the winner
Phaser test World
57 runs ♦ 1 like
By Mark Humphrys  
Created: 29 Apr 2023
Modified: 17 Sep 2023
Basic Phaser World. Player moved with left-right-up keys. Can jump. Physics.
AB.msg ("Move player with left-right and up keys.");
3D Snake
621 runs ♦ 1 like
By przemek biel  
Created: 29 Nov 2022
Modified: 17 Sep 2023
snake eats apple nom nom but in 3D
AB.msg("Hit the arrow keys to spawn snake!");
AB.msg("P1 Score = " + p1score + " P2 score = " + p2score + "\n Time remaining: " + Math.trunc(99 - gameClock.getElapsedTim
Chess
5850 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.msg ( ` <hr> <p> Chess game. Pick a side. Click buttons to pick colour. <p>
AB.msg ( ` <hr> <p> Chess game. Pick a side. Click buttons to pick colour. <p>
Dragon Ball Meng...
932 runs ♦ 0 likes
By MENGTE ZHU  
Created: 14 Nov 2022
Modified: 22 Jan 2024
AB.msg ( ` <hr> <p> Multi-user game. Pick a character. Click buttons to change Dragon balls on all users' machines. Drag the camera.
The San Andreas ...
1023 runs ♦ 0 likes
By Effa  
Created: 1 Dec 2022
Modified: 17 Sep 2023
AB.msg (
canvas 2d
353 runs ♦ 2 likes
By Starter user  
Created: 4 Oct 2017
Modified: 17 Sep 2023
Minimal starter World for "Canvas" API (no graphics library). Program using getContext("2d"). Pa...
AB.msg ( "Step: " + AB.step );
Model World
856 runs ♦ 2 likes
By Starter user  
Created: 8 Nov 2016
Modified: 17 Sep 2023
Demo of how to insert 3d models into World. Mind-controlled agent, actively-pursuing enemy. Skybox.
AB.msg ( " Step: " + AB.step + " out of " + AB.maxSteps + ". Score: " + score );
Hunting Season
1389 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.msg("P1 Score = " + p1score + " P2 score = " + p2score + "\n Time remaining: " + Math.trunc(60 - gameClock.getElapsedTim
Collision World
1377 runs ♦ 4 likes
By Starter user  
Created: 21 Sep 2017
Modified: 17 Sep 2023
Demo of Physics API. Blocks fall under gravity and collide. Can modify gravity, friction, etc. S...
// AB.msg ( "Box " + boxno + " position: <tt> " + AB.vector3toString ( currentbox.position ) + "</tt>" );
AB.msg ( "Box " + boxno + " height: <tt> " + Math.floor(currentbox.position.y) + "</tt>" );
P5 chase World
187 runs ♦ 0 likes
By Starter user  
Created: 4 Aug 2018
Modified: 17 Sep 2023
Example of World with Mind on P5 plain API. No AB framework. Have to call Mind yourself. Mind mo...
AB.msg ( " <p> The job of the Mind is to move the object closer to the target. </p> " );
AB.msg ( " <p> Step: " + AB.step + " Score: " + score + " </p> ", 2 );
Expo World
211 runs ♦ 0 likes
By Mark Humphrys  
Created: 17 Oct 2018
Modified: 17 Sep 2023
Infinite changing demo for expos.
AB.msg ( status );
AB.msg ( status, 2 );
AB.msg ( " <br> <font color=red> <B> Agent blocked. " + BLOCKPUNISH + " extra bad steps and reset enemy. </B> </font> ", 3 );
AB.msg ( " <br> <font color=green> <B> Run over. </B> </font> ", 3 );
Run Run Run!
5690 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.msg("<p>Current number of players = " + e.length + "\n</p>", 2); // Display number of players
AB.msg("<p>Time left: <strong>" + clock.currTime + "</strong> seconds</p>", 5); // Update time left screen
AB.msg("<p>Time left: <strong>" + clock.currTime + "</strong> seconds</p>", 5); // Update time
AB.msg(`<h3> Welcome to our game!</h3>`, 1);
AB.msg(`<p><strong>Player 1</strong> Score: <strong>` + score1 + `</strong> | Highest: <strong>` + hscore1 + `</strong> </p>`, 3);
Zombie Escape
4092 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!
AB.msg("<p align=\"center\"> <font color=red> <B> Your lives: " + lives + "<p align=\"center\"> <font color=blue> <B> Opponent's Liv
AB.msg("<p align=\"center\"> <font color=red> <B> Your lives: </B>" + lives + "<p align=\"center\"> <font color=blue> <B> Opponent'
Recognise any image
267 runs ♦ 0 likes
By Starter user  
Created: 10 Jun 2021
Modified: 17 Sep 2023
Try to recognise any image with ML5 and MobileNet. Enter any image URL at runtime.
// AB.msg ( "Running image recognition ... <br> ", 1 );
AB.msg ( "<font color=red> <B> Error recognising image. See console for details. </b></font> <br> ", 2 );
AB.msg ( r, 3 );
3. Making an Avatar
116 runs ♦ 0 likes
By "3D Game Program...  
Created: 16 Aug 2018
Modified: 17 Sep 2023
Port of code "building_an_avatar" from Ch.3
AB.msg ( " <p> Drag and zoom the camera (built-in). </p> " );
Space Odyssey
441 runs ♦ 0 likes
By Yiming Fu  
Created: 2 Dec 2022
Modified: 17 Sep 2023
Clone of "Websockets boxes" by Starter user
AB.msg ( ` <hr> <p> This is a multi-user game.<br><br>Try dragging the camera to en-<br>joy the cosmic landscape.<br><br>Would you r
Lion Chase
435 runs ♦ 0 likes
By Martin Derwin  
Created: 30 Nov 2022
Modified: 17 Sep 2023
Don't get caught by the lions
if ( AB.abortRun && p1lose) AB.msg ( " <br> <font color=red> <B> Player 1 was caught! Player 2 wins. </B> </font> ", 2 );
else if ( AB.abortRun && p2lose) AB.msg ( " <br> <font color=red> <B> Player 2 was caught! Player 1 wins. </B> </font> ", 2 );
Touch World
457 runs ♦ 1 like
By Starter user  
Created: 6 Jan 2018
Modified: 17 Sep 2023
How to override default touch handling. Mobile: Touch drag moves agent, touch pinch zooms camera...
AB.msg ( " Step: " + AB.step +
if ( AB.onDesktop() ) AB.msg ( "<p> Desktop: Keyboard arrows to move agent. Mouse drag to move camera. Mouse scroll to zoom camera.
else AB.msg ( "<p> Mobile: Touch drag to move agent. Touch pinch to zoom camera. </p>" );
if ( AB.abortRun ) AB.msg ( " <br> <font color=red> <B> Agent trapped. You lose! </B> </font> ", 3 );
else AB.msg ( " <br> <font color=green> <B> Run over. </B> </font> ", 3 );
Lego
525 runs ♦ 0 likes
By Michael Walsh  
Created: 14 Nov 2022
Modified: 1 Oct 2023
Clone of "webgl_interactive_voxelpainter" by threejs.org porting project
AB.msg (`<ul style="padding-left: 2ch;">`
Interstellar cubes
612 runs ♦ 3 likes
By Thomas Mc Cann  
Created: 16 Oct 2019
Modified: 17 Sep 2023
A journey into Interstellar space. Run and press F12 (in chrome) to view the console. Try left c...
AB.msg ( "<p>Press <strong>F12 to view console!!</strong></p><p>Then try clicking and check the console</p><p>Or cheat and press <st
AB.msg ("<p>Clicking reduces the number of cubes by 1. <strong>You can't remove the last special cube</strong>.</p><Pressing z w
AB.msg ("</p>Pressing z will cycle through <strong>8</strong> zoom levels. <strong></p><p>CURRENT ZOOM LEVEL: " + zoom + "</stro
MineCraft
1116 runs ♦ 2 likes
By Starter user  
Created: 27 Nov 2016
Modified: 17 Sep 2023
Use keyboard to draw blocks like in MineCraft. Use arrow keys and PgUp, PgDn to draw. Can save w...
AB.msg ( " <button onclick='saveData();' class='ab-normbutton mybutton' >Save work</button> " );
AB.msg ( " <button onclick='restoreData();' class='ab-normbutton mybutton' >Restore work</button> ", 2 );
Perceptron
829 runs ♦ 1 like
By "Coding Train" p...  
Created: 26 Jun 2019
Modified: 17 Sep 2023
Perceptron to separate points.
AB.msg ( "Line: y = " + a.toFixed(2) + " x + " + b.toFixed(2) +
AB.msg ( "<br> Training on single point: " + count, 2 );
AB.msg ( "<br> Drawing points 0 to " + (count-1), 3 );
CA318 2018 World
2160 runs ♦ 3 likes
By Mark Humphrys  
Created: 25 Sep 2018
Modified: 17 Sep 2023
CA318 practical 2018: Write a Mind to solve this World.
AB.msg ( status );
AB.msg ( status, 2 );
AB.msg ( " <br> <font color=red> <B> Agent blocked. " + BLOCKPUNISH + " extra bad steps and reset enemy. </B> </font> ", 3 );
AB.msg ( " <br> <font color=green> <B> Run over. </B> </font> ", 3 );
Battleship
4277 runs ♦ 2 likes
By Aaron Crawford  
Created: 30 Oct 2022
Modified: 17 Sep 2023
AB.msg (
Final Pool
1164 runs ♦ 2 likes
By Ian Gilligan  
Created: 1 Mar 2019
Modified: 17 Sep 2023
Pool Predictor for CA326
AB.newSplash ("<p align=\"center\">Error!</p><p align=\"center\"> "+ msg +"</p>");
Character recogn...
1800 runs ♦ 0 likes
By "Coding Train" p...  
Created: 5 Jul 2019
Modified: 17 Sep 2023
Neural network to do character recognition from image database and from handwriting in real-time.
//--- start of AB.msgs structure: ---------------------------------------------------------
// We output a serious of AB.msgs to put data at various places in the run header
AB.msg ( thehtml, 1 );
AB.msg ( thehtml, 3 );
AB.msg ( thehtml, 5 );
ML5 image recogn...
106 runs ♦ 0 likes
By Starter user  
Created: 10 Jun 2021
Modified: 17 Sep 2023
Demo of image recognition using ML5 and MobileNet. Image URL is hardcoded.
// AB.msg ( "Running image recognition ... <br> ", 1 );
AB.msg ( "<font color=red> <B> Error recognising image. See console for details. </b></font> <br> ", 2 );
AB.msg ( r, 3 );
Castle World
786 runs ♦ 4 likes
By Starter user  
Created: 11 Nov 2016
Modified: 17 Sep 2023
Demo of how to insert 3d model into World. Mind-controlled agent, actively-pursuing enemy. Splas...
AB.msg ( "Step: " + AB.step + " out of " + AB.maxSteps + ". Score: " + score );
1. Shapes
173 runs ♦ 0 likes
By "3D Game Program...  
Created: 16 Aug 2018
Modified: 17 Sep 2023
Port of code "shapes" from Ch.1
AB.msg ( " <p> Drag and zoom the camera (built-in). </p> " );
Binary tree
3172 runs ♦ 0 likes
By "Coding Train" p...  
Created: 25 Apr 2019
Modified: 17 Sep 2023
Binary tree search demo.
AB.msg( "console log shows how we search a sorted tree quickly <br> search tree for " + x + "<br>" );
if (result == null) AB.msg('not found', 2);
else AB.msg('found', 2);
Complex World
8198 runs ♦ 5 likes
By Starter user  
Created: 1 Oct 2016
Modified: 17 Sep 2023
World with a Mind-controlled agent, actively-pursuing enemy, random maze, skybox, music.
AB.msg ( " Step: " + AB.step + " &nbsp; x = (" + x.toString() + ") &nbsp; a = (" + a + ") " );
AB.msg ( " &nbsp; y = (" + y.toString() + ") <br>" +
if ( AB.abortRun ) AB.msg ( " <br> <font color=red> <B> Agent trapped. Final score zero. </B> </font> ", 3 );
else AB.msg ( " <br> <font color=green> <B> Run over. </B> </font> ", 3 );
CharRecognition_...
369 runs ♦ 0 likes
By Dheera  
Created: 16 Nov 2021
Modified: 17 Sep 2023
Clone of "Character recognition neural network" by "Coding Train" project
//--- start of AB.msgs structure: ---------------------------------------------------------
// We output a serious of AB.msgs to put data at various places in the run header
AB.msg ( thehtml, 1 );
AB.msg ( thehtml, 3 );
AB.msg ( thehtml, 5 );
GA (TSP) (clone ...
60 runs ♦ 0 likes
By K.Ellis  
Created: 26 Nov 2019
Modified: 17 Sep 2023
Clone of "GA (TSP)" by "Coding Train" project
AB.msg ( "<font color=green> <B> Time taken in seconds </B> </font>" + millisecond/1000 +
AB.msg ( "<br> Number of routes looked at: <b> All possible routes </b> " +
AB.msg ( "<br> Number of routes looked at: " + routesLookedAt +
AB.msg ( "<p> Generation: " + gen +


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 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.