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 World image to run it.)

One Cube World (P5)
1858 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.
You will soon be able to make variants of this World, such as the ones shown here.
One Cube World (...
181 runs ♦ 0 likes
By Colin Duggan  
Created: 4 Oct 2021
Modified: 17 Sep 2023
Clone of "One Cube World (P5)" by Starter user
Spaghett
325 runs ♦ 3 likes
By Theo Delettre  
Created: 30 Sep 2021
Modified: 17 Sep 2023
Clone of "One Cube World (P5)" by Starter user
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...
My first world
412 runs ♦ 0 likes
By Sagnik Chakraborty  
Created: 19 Sep 2022
Modified: 17 Sep 2023
hopefully will be wonderful, but its scary for now lol

Contents

  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


Notes


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