Ancient Brain
Code. Play. Teach. Learn. Research. Demo.

Getting started

Here is a guide to getting started running Worlds and coding on Ancient Brain.

We have a text Introduction to the site.
And we have the following video introduction.
This video does not assume you have ever coded, or ever heard of JavaScript (what is behind this site).
See also:

You can "run" any World by clicking on it. No install needed.
Try running some of the Editor's Choice Worlds.

There are currently 9,332 Worlds on this site.
Here are a few random choice Worlds to try (reload for more):


Tutorial 7.8 variant
369 runs ♦ 0 likes
By "Coding Train" p...  
Created: 6 Sep 2018
Modified: 17 Sep 2023
Tutorial 7.8 with music and other uploaded images, including from other users. Click on the images.
Breadth-first se...
2778 runs ♦ 0 likes
By "Coding Train" p...  
Created: 30 Apr 2019
Modified: 17 Sep 2023
Breadth-first search with a Force-directed graph.
escape...
800 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...
Stylish Image Ge...
372 runs ♦ 0 likes
By Daniel Pelech  
Created: 23 Nov 2023
Modified: 4 Feb 2024
Convert user prompt to a set of images. Uses Sohail Ahmed's text to image API at Rapid API: http...

OK you are ready to code. All Worlds are coded in JavaScript (JS). We use a JavaScript graphics "library" to make it easy to code the graphics.

You need to pick a library: The "P5" library or the "Three.js" library.

  • The P5 library has pluses and minuses:
    • It is easier to get into if you are a beginner coder.
    • It has features that may annoy non-beginners (global namespace taken up, timing loop controlled for you).
    • It is harder to do advanced graphics.
    • There are a number of P5 teaching courses on this site.

  • The Three.js library has pluses and minuses:
    • It is more intimidating for a beginner coder.
    • It is well suited to non-beginners.
    • It is designed for advanced graphics. Almost all the advanced graphics Worlds on this site are Three.js.
    • There is currently no Three.js teaching course here.

For beginners, we recommend P5.

Having picked your graphics library, do the starter tutorial.

Using P5:

P5 Starter tutorial

Or using Three.js:

Three.js Starter tutorial

When coding, the Docs menu has all the help and reference that you need:

Docs
One Cube World (P5)
1862 runs ♦ 1 like
By Starter user  
Created: 10 Nov 2018
Modified: 17 Sep 2023
Simple starter World (P5 version). No camera control. So cube rotates to show 3D.
One Cube World (...
1113 runs ♦ 2 likes
By Starter user  
Created: 11 Apr 2018
Modified: 17 Sep 2023
Simple starter World (Three.js version). Built-in camera control.
  • Once you have seen how to code on Ancient Brain, the easiest way to progress is to start modifying existing Worlds.
  • Pick one of the Starter Worlds. "Clone" it, and edit your copy.
  • The easiest parts of the code to change are in the "tweaker's box" at the top.
Complex World
8200 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.
Simple World
1646 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.
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...
Blank Three.js World
1505 runs ♦ 2 likes
By Starter user  
Created: 20 Nov 2016
Modified: 17 Sep 2023
A simple starter World. An Array of spheres. Painted with textures. Random motion.
There are a number of coding courses and exercises on this site that you can do:
  • Introduction to Programming. This is a proper Introduction to Programming course, with videos, using JavaScript and P5. This does not assume you have ever written a program.

  • Introduction to Programming: Part Two.

  • Alternative JavaScript course for kids. This is an alternative introduction to programming, with kid-friendly language. This does not assume you have ever written a program.

  • WebGL course. This is a course in JavaScript 3D graphics ("WebGL") programming, using P5.

  • AI exercises. This does not have a full set of notes explaining AI theory. You will need to get that somewhere else. Rather this is a series of online AI programming exercises, with problems for students to solve. All code is in JavaScript using P5.


As well as courses, there are accounts with certain collections of Worlds:

P5 Editor porting project  
Port to Ancient Brain of P5 Editor built-in sketches. Source: editor.p5js.org/p5/sketches. Port ...

threejs.org porting project  
Project to port threejs.org examples. All credit to: https://github.com/mrdoob/three.js/tree/mas...

"Coding Train" project  
Project to port JS Worlds from The Coding Train to Ancient Brain.

"3D Game Programming for K...  
Proposed project to port code from the book "3D Game Programming for Kids" by Chris Strom. Await...

Discover three.js  
Project to port code from "Discover three.js" book and site by Lewy Blue. Done with permission o...

As you keep learning, here are some examples of what you can build on this site. Build something beautiful!
Language Transla...
89 runs ♦ 0 likes
By Darius Beril  
Created: 7 Dec 2023
Modified: 8 Feb 2024
AI Language Translator And Reader. (1) Uses OpenAI GPT API for translation. Need to enter your o...
Audiobook Generator
120 runs ♦ 0 likes
By Aleena Joseph  
Created: 21 Nov 2023
Modified: 11 Feb 2024
Convert your text/story to an audio file. Calls OpenAI text to speech (TTS). Need to enter your ...
Design Your Own ...
4413 runs ♦ 0 likes
By Jack O'Connor  
Created: 18 Feb 2019
Modified: 17 Sep 2023
Design Your Own Room Escape Game
Find Woody's Hat
588 runs ♦ 1 like
By Benjamin Olojo  
Created: 4 Dec 2022
Modified: 19 Oct 2023
Clone of "Capture the Hat" by Tuomas Bazzan
Color Matcher
278 runs ♦ 0 likes
By Siri Nandipaty  
Created: 27 Nov 2023
Modified: 5 Feb 2024
Color ideas generator using the Cohere AI API: https://docs.cohere.com/reference/generate. (1) E...
P5 Mouse tracker
323 runs ♦ 2 likes
By Starter user  
Created: 4 Jul 2018
Modified: 17 Sep 2023
Example of P5 World integrated with AB framework. Desktop: Draw ellipse wherever the mouse hover...
3D Platform Game
237 runs ♦ 0 likes
By Ronghui  
Created: 5 Dec 2022
Modified: 17 Sep 2023
Race to the End! WASD to move.
Stability AI Ima...
248 runs ♦ 0 likes
By Alfred Iyby  
Created: 2 Dec 2023
Modified: 11 Feb 2024
Image Generation Using Stable Diffusion API at Stability AI: https://stability.ai/stable-diffusi...