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

How to code

Help on how to code on Ancient Brain, for coders at all experience levels.

Running Worlds is easy. Click World images to run them. Try running the Editor's Choice Worlds or Random Worlds.

There are currently 7,569 Worlds on this site.

There are introductory pages:

Introduction
The basics of what this site is. You can code your own "Worlds". They are hosted on this server. Introduces the idea of "tweakers", users who can change some code without being full programmers.
List of features
Extensive list of features of the Ancient Brain site.

Definitions and Principles
Explains the idea of "Worlds" and "Minds", and types of Worlds. Explains the core Principles of Ancient Brain.
How to run Worlds
Click World images to run them. No install needed. Runs open in a new tab. Runs take place on a separate "run" server. Runs on that server are like untrusted web pages.
All Worlds are coded in JavaScript. We use a JavaScript "library" to make it easy to code graphics. Your big decision is whether to use the "P5" library or the "Three.js" library.


The P5 library is probably easier to get into if you are a beginner coder. But it has some features that may annoy non-beginners. It seems to be harder to do more advanced graphics with it. There are a number of P5 teaching courses on this site.

Use P5
The Three.js library is a little more intimidating for a beginner coder. But it is well suited to non-beginners. It is designed for advanced graphics. There is currently no Three.js teaching course on this site. On the other hand, almost all the advanced Worlds on this site are Three.js.
Use Three.js
  • 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
7389 runs ♦ 3 likes
By Starter user  
Created: 1 Oct 2016
Modified: 18 Apr 2021
World with a Mind-controlled agent, actively-pursuing enemy, random maze, skybox, music.
Blank Three.js World
1330 runs ♦ 2 likes
By Starter user  
Created: 20 Nov 2016
Modified: 18 Apr 2021
A simple starter World. An Array of spheres. Painted with textures. Random motion.
MineCraft
1009 runs ♦ 2 likes
By Starter user  
Created: 27 Nov 2016
Modified: 4 Jul 2021
Use keyboard to draw blocks like in MineCraft. Use arrow keys and PgUp, PgDn to draw. Can save w...
Simple World
1511 runs ♦ 2 likes
By Starter user  
Created: 1 Oct 2016
Modified: 18 Apr 2021
Simple World with a Mind-controlled agent, randomly-moving enemy, paint blocks with texture.
As you keep learning, here are some examples of what you can build on this site. Build something beautiful!
Game of Crowns s...
196 runs ♦ 0 likes
By Enhanced  
Created: 21 Jun 2018
Modified: 27 Aug 2018
Enhanced version of "Game of Crowns" by Niamh Byrne with better graphics and controls
User-controlled ...
804 runs ♦ 2 likes
By Starter user  
Created: 12 Feb 2017
Modified: 18 Apr 2021
3d model World. User controlled on desktop. Keyboard arrows to move. Switch to "Move with" camer...
Game of Crowns
2124 runs ♦ 2 likes
By Niamh Byrne  
Created: 16 Nov 2016
Modified: 10 Feb 2018
Pacman In Space
1668 runs ♦ 0 likes
By Simon Lowry  
Created: 16 Nov 2016
Modified: 10 Feb 2018
Here are some of the most advanced Worlds:
Port of flying b...
659 runs ♦ 0 likes
By Discover three.js  
Created: 10 Feb 2019
Modified: 24 Mar 2019
Animated models. Port of flying birds with GLB models. From "Discover three.js". See project inf...
Final Pool
1110 runs ♦ 2 likes
By Ian Gilligan  
Created: 1 Mar 2019
Modified: 13 Aug 2019
Pool Predictor for CA326
Car models with ...
737 runs ♦ 1 like
By threejs.org port...  
Created: 13 Sep 2018
Modified: 24 Mar 2019
Car bodywork reflects images from skybox. Click buttons to change model and bodywork. Mouse to m...
Complete Infinit...
465 runs ♦ 0 likes
By Enhanced  
Created: 9 Aug 2018
Modified: 26 Aug 2018
This program was made by Nathan Bonnard. In this world, you can generate an infinite world ! Bu...