Ancient Brain Starter Tutorial (P5)

This tutorial shows you how to get started on Ancient Brain (P5 version).

To be precise, this shows how to start coding on Ancient Brain in the JavaScript programming language, using the P5 library for the graphics. (You can use other libraries for graphics, notably Three.js.)

On Ancient Brain, you can edit and run programs in the browser, with no install. You have to register and get a username if you want to save your creations.

This tutorial will show you how to copy and edit a simple "World" called "One Cube World". (Click on a World image to run it.) You will soon be able to make variants of this World, such as the ones shown here.

One Cube World (...
151 runs ♦ 0 likes
By Colin Duggan  
Created: 4 Oct 2021
Modified: 4 Oct 2021
Clone of "One Cube World (P5)" by Starter user
One Cube World (P5)
965 runs ♦ 0 likes
By Starter user  
Created: 10 Nov 2018
Modified: 21 Apr 2021
Simple starter World (P5 version). No camera control. So cube rotates to show 3D.
Interstellar cubes
499 runs ♦ 3 likes
By Thomas Mc Cann  
Created: 16 Oct 2019
Modified: 3 Nov 2019
A journey into Interstellar space. Run and press F12 (in chrome) to view the console. Try left c...
262 runs ♦ 3 likes
By Theo Delettre  
Created: 30 Sep 2021
Modified: 2 Oct 2021
Clone of "One Cube World (P5)" by Starter user


  1. Register and login
  2. Run the Starter World
  3. Clone the Starter World
  4. Edit your World
  5. First look at the code
  6. Change some code
  7. Program structure
  8. Paint the cube
  9. Upload your own image
  10. Make another box
  11. Make lots of boxes
  12. Add music
  13. Errors
  14. Documentation
  15. Clone and edit other P5 Worlds
  16. Finish


Introduction video

This tutorial has 16 videos, one for each step. There is also a high-level introduction to Ancient Brain, shown below. This does not assume you have ever coded, or ever heard of JavaScript graphics.

Notes on videos

Get started

Enough talk. Let's start the tutorial!
Step 1 of 16