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

Our goal: To become one of the most fun places in the world to code.

716 authors    1,284 Worlds    98,174 runs    0.5 million lines of code    Update stats

Free JavaScript courses in Dublin using Ancient Brain for teachers and adult leaders. Next class: 4 Jan 2019.
Collision World
By Starter user  
Demo of Physics API. Blocks fall under gravity and collide. Can modify gravity, friction, etc. S...
Car models with ...
By Port of threejs....  
Car bodywork reflects images from skybox. Click buttons to change model and bodywork. Mouse to m...
P5 Mouse tracker
By Starter user  
Example of P5 World integrated with AB framework. Desktop: Draw ellipse wherever the mouse hover...

Coders: Make 3D worlds and share them with friends. Clone and edit other people's worlds. Make touch mobile games. Embed your worlds on other sites.
Teachers: Run programming practicals in 3D or 2D or text, with many features designed for teachers. Safely edit and run student code.
Researchers: Upload problems, tender for solutions, test and rank them. Make hybrid AI systems from the code of multiple authors.
Gamers: Play the endless game worlds the coders make. Come and browse an ever-growing archive of games.
Learners: Clone other people's worlds and change one or two lines. What's the worst that could happen?

How to get started

Explore the site. Run Worlds.


See how coding on this site works.

  • See How to write code on this site.
  • When coding, see the "Docs" menu for all the documentation you need.


Do the Starter Tutorial (P5)

  • The "P5" graphics library is probably most suitable for beginners. More experienced programmers may prefer to skip P5 and use the "Three.js" graphics library (below).
  • To get started coding JavaScript on Ancient Brain with P5, work through the P5 Starter Tutorial. This shows you how coding on this site works (with P5). This does not assume you have ever written a program.
  • The tutorial looks at coding the following World:
One Cube World (P5)
By Starter user  
Simple starter World (P5 version). No camera control. So cube rotates to show 3D.
Do the Programming courses (P5)

  • You can learn in depth how to program in JavaScript in P5 by doing the course: Foundations of Programming in JavaScript. This does not assume you have ever written a program.
  • When you have done that, you can do the more advanced WebGL course (JavaScript 3D graphics in P5).
  • When coding, use the P5 reference material.
  • When you are finished these courses, you will be able to make Worlds like the following:
Tutorial 7.3
By "Coding Train" p...  
Arrays of Objects
Tutorial 7.8 variant
By "Coding Train" p...  
Tutorial 7.8 with music and other uploaded images, including from other users. Click on the images.
Tutorial 18.7
By "Coding Train" p...  
Tutorial 18.7 with full canvas, resized model, sound. Texture on box is image from another user.
Tutorial 2.1
By "Coding Train" p...  
Variables in p5.js (mouseX, mouseY)
Do the Starter Tutorial (Three.js)

  • The "Three.js" graphics library is more suitable for programmers with a little experience. Beginners may prefer to start with P5. If you know a little P5, you will be ready to try some Three.js.
  • To get started coding JavaScript on Ancient Brain with Three.js, work through the Three.js Starter Tutorial. This shows you how coding on this site works (with Three.js). This does not assume you have ever written a program.
  • The tutorial looks at coding the following World:
One Cube World (...
By Starter user  
Simple starter World (Three.js version). Cube of random color. Built-in camera control.
Do a Programming course (Three.js)

  • There is not yet on this site a full course in programming in Three.js.
  • You are directed to the Three.js reference material.
  • There are plans to partner with the book 3D Game Programming for Kids. You can go through this book and code the examples on Ancient Brain. This book does not assume you have ever written a program.
  • When you are finished this book, you will be able to make Worlds like the following:
3. Making an Avatar
By "3D Game Program...  
Port of code "building_an_avatar" from Ch.3
1. Shapes
By "3D Game Program...  
Port of code "shapes" from Ch.1
Modify some Starter Worlds.

  • If you have learnt a little programming, 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
By Starter user  
World with a Mind-controlled agent, actively-pursuing enemy, random maze, skybox, music.
MineCraft
By Starter user  
Use keyboard to draw blocks like in MineCraft. Use arrow keys and PgUp, PgDn to draw. Can save w...
Simple World
By Starter user  
Simple World with a Mind-controlled agent, randomly-moving enemy, paint blocks with texture.
Blank Three.js World
By Starter user  
A simple starter World. An Array of spheres. Painted with textures. Random motion.
See what you can build.

As you keep learning, here are some examples of what you can build on this site. Build something beautiful!

User-controlled ...
By Starter user  
3d model World. User controlled on desktop. Keyboard arrows to move. Switch to "Move with" camer...
Game of Crowns s...
By Enhanced  
Enhanced version of "Game of Crowns" by Niamh Byrne with better graphics and controls
See the most advanced Worlds.

These are probably the most advanced Worlds on the site at the moment:

Car models with ...
By Port of threejs....  
Car bodywork reflects images from skybox. Click buttons to change model and bodywork. Mouse to m...
Complete Infinit...
By Enhanced  
This program was made by Nathan Bonnard. In this world, you can generate an infinite world ! Bu...
Editor's Choice Worlds

Here are some selected user-submitted Worlds and the most useful built-in Worlds.

Bouncy Balls
By Starter user  
Demo of Physics API. Balls bounce under gravity and collide in low friction world. Splash screen...
Scrolling background
By Enhanced  
here is explained and commented a way to code a scrolling background with three.js
Sampler
By Enhanced  
Upload sounds, play them, automate them. Saving data works.
CELLS WITH MIND ...
By Enhanced  
Cells is a game about cells trying to infect each other. It offers a playground for minds to com...
2D sprite animation
By Mark Humphrys  
2D sprite animation on a surface. Change show3d to true to see it on 3d box faces.
smooth movement
By Mark Humphrys  
this may work on touch
P5 Mouse tracker
By Starter user  
Example of P5 World integrated with AB framework. Desktop: Draw ellipse wherever the mouse hover...
Rythm of the night
By Enhanced  
A rythm game where you have to use the right inputs at the right time to progress from one level...
Cells
By Enhanced  
'Cells' is an animation that displays 4 team of cells trying to infect each other, until total d...
Sun
By Enhanced  
Here is a prototype of a sun object that you can copy to your world !
Tutorial 18.7
By "Coding Train" p...  
Tutorial 18.7 with full canvas, resized model, sound. Texture on box is image from another user.
Tutorial 7.8
By "Coding Train" p...  
Objects and Images. On Ancient Brain you can upload your own images. Try it!
MineCraft
By Starter user  
Use keyboard to draw blocks like in MineCraft. Use arrow keys and PgUp, PgDn to draw. Can save w...
Car models with ...
By Port of threejs....  
Car bodywork reflects images from skybox. Click buttons to change model and bodywork. Mouse to m...
Zombie Death Baby
By Starter user  
How to make a fun touch game for mobile. Touch drag and tap objects. Mouse drag and click object...
Enhanced Space Pong
By Enhanced  
It's all you want from Pong : smooth controls, different difficulty levels and game modes
canvas 2d
By Starter user  
Minimal starter World for "Canvas" API (no graphics library). Program using getContext("2d"). Pa...
Model World
By Starter user  
Demo of how to insert 3d models into World. Mind-controlled agent, actively-pursuing enemy. Skybox.
Space Hero
By Enhanced  
Drag the Earth the collect the suns. Don't get hit by the asteriods ! Enhanced version of "Space...
CELLS WITH MIND ...
By Enhanced  
Cells is a game about cells trying to infect each other. It offers a playground for minds to com...
Minecraft Builder
By Enhanced  
Build your own worlds. Enhanced version of the Minecraft starter world with added control and co...
Purple Fruit Monster
By Starter user  
Example of porting physics World unchanged to AB using plain physics API. From "3D Game Programm...
Complete Infinit...
By Enhanced  
This program was made by Nathan Bonnard. In this world, you can generate an infinite world ! Bu...
Chess : Mind v...
By Enhanced  
Your mind plays against "Simple AI - Depth 1" with a little bit of random added so the games are...
Shooting Range
By Enhanced  
Shoot the ducks, feel the spirit of the hunt. Enhanced version of "Shooting Range (Space To Shoo...
Blank Three.js World
By Starter user  
A simple starter World. An Array of spheres. Painted with textures. Random motion.
Enhanced Don't Move
By Enhanced  
Try to dodge cubes as they fall to the ground, in this simple but efficient game
P5 Particle System
By Starter user  
Port of P5 site's "Particle System" example with almost no change. P5 plain API. No AB framework...
Plain Three.js World
By Starter user  
Example of plain Three.js API. Porting a World unchanged. From github.com/mrdoob
Flickr World
By Starter user  
Demo of "Web page" API. Just use JS to make a web page. This page gets images from Flickr using ...
Game of Crowns s...
By Enhanced  
Enhanced version of "Game of Crowns" by Niamh Byrne with better graphics and controls
P5 chase World
By Starter user  
Example of World with Mind on P5 plain API. No AB framework. Have to call Mind yourself. Mind mo...
canvas webgl
By Starter user  
Minimal starter World for "Canvas" API (no graphics library). Program using getContext("webgl")....
Plain canvas web...
By Starter user  
Example of porting webgl World (almost) unchanged to AB using plain canvas API
Infinite World O...
By Enhanced  
Here is a code to get an infinite world that loop without object in it, without the sun
Chess : Mind v...
By Enhanced  
Clone of "Chess : Mind vs Simple AI (a bit of random)" by Mathias Bazin
Pacman
By Enhanced  
Enhanced version of Game Pacman in Space, you need to collect all white bullet to end the game, ...
Castle World
By Starter user  
Demo of how to insert 3d model into World. Mind-controlled agent, actively-pursuing enemy. Splas...
Romantic Sunset
By Enhanced  
Turn your head and discover a eautiful scenery observable in first person mode.
Bomberman
By Enhanced  
Classic game of Bomberman, try to kill the ennemy with a bomb !
Collision World
By Starter user  
Demo of Physics API. Blocks fall under gravity and collide. Can modify gravity, friction, etc. S...
First Person Con...
By Enhanced  
First person view with mouse controls. Use WASD or Arrows to move, mouse to look around and spac...
Tutorial 2.1
By "Coding Train" p...  
Variables in p5.js (mouseX, mouseY)
One Cube World (...
By Starter user  
Simple starter World (Three.js version). Cube of random color. Built-in camera control.
User-controlled ...
By Starter user  
3d model World. User controlled on desktop. Keyboard arrows to move. Switch to "Move with" camer...
Simple World
By Starter user  
Simple World with a Mind-controlled agent, randomly-moving enemy, paint blocks with texture.
Touch World
By Starter user  
How to override default touch handling. Mobile: Touch drag moves agent, touch pinch zooms camera...
Expo World
By Mark Humphrys  
Infinite changing demo for expos.
No brain
By Enhanced  
Float through hypnotic space cubes. No user input required, it's only an animation
Complex World
By Starter user  
World with a Mind-controlled agent, actively-pursuing enemy, random maze, skybox, music.
One Cube World (P5)
By Starter user  
Simple starter World (P5 version). No camera control. So cube rotates to show 3D.
Scare the Fishes!
By Enhanced  
Scare the fishes with your mouse ! If you click they will flee even further away. Includes twea...
3D for Kids Worl...
By Starter user  
Example of plain Three.js API. Porting a World unchanged. From "3D Game Programming for Kids"
Plain canvas web...
By Starter user  
Example of porting webgl World (almost) unchanged to AB using plain canvas API
The Game of Life
By Enhanced  
The famous Game of Life. Click on the screen to place the initial cells and then click start ! ...
Tutorial 7.8 variant
By "Coding Train" p...  
Tutorial 7.8 with music and other uploaded images, including from other users. Click on the images.
Infinite World G...
By Enhanced  
Here is a code to get an infinite world that loop without object in it, and with the sun
CA318 2018 World
By Mark Humphrys  
CA318 practical 2018: Write a Mind to solve this World.


The background is a program, showing the JavaScript graphics used on this site.
 
Font:

© Ancient Brain Ltd. All rights reserved.

Ancient Brain ™ is a trademark of Ancient Brain Ltd.

Beta      Bug bounty      Contact      Stats      The name      Terms and conditions