Log In  

Cart #oxo3d-0 | 2020-01-02 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

oxo3d - 3d noughts and crosses / tic-tac-toe

Oxo 3D is a 3 dimensional (4x4x4) noughts-and-crosses / tic-tac-toe game for pico-8. This is a game with considerably more strategy than the traditional 3x3 version.

Quick start

You're O and you have to get 4 in a row. The board is a cube viewed in slices. Imagine the 4 slices piled on top of each other.

Use the arrow keys to move the highlight and press Z to place a piece.

Use X to view the cube in different orientations.

Use Enter to view the menu to change level.

Watch out for tricky diagonal lines!

Good luck!

How to play 3D Noughts-and-Crosses

Each group of 4x4 positions represents one plane on the cube.

On each layer there are 10 possible winning lines, 4 horizontal, 4 vertical and two diagonal.

However lines may run from layer to layer also.

There are 76 lines in total possible, these are 4x4 = north-south lines, 16 east-west lines, 16 vertical lines, 2x4x3 = 24 diagonal lines from one edge to another, and 4 diagonal lines from corner to corner.


There are 3 carefully graduated levels which you change with the cartridge menu (Enter).

  • Easy
  • Medium
  • Hard

The levels get increasingly hard. Easy and Medium use the same simple heuristic player, but Easy makes random mistakes. Hard uses a two level lookahead player - watch out is is very sneaky.


  • Written in ZX81 BASIC (1983)
  • Converted to QL BASIC(1985)
  • Converted to BBC Basic (1985)
  • Converted to Psion 3a OPL (1994)
  • Converted to C (1996)
  • Converted to Perl (2000)
  • Converted to Python (2004)
  • Converted to LUA and pico-8 (2019)

I used to play this game with my father when I was a boy. We always used to play on squared paper while sitting round the kitchen table. When I was old enough (and the home computer had been invented) this inspired me to write a computer player for the game.

The very first version of this game was written in 1983 on a Sinclair ZX81 in BASIC. It used to take 60 seconds to think of a move, and it used to beat the author nearly all of the time.

This pico-8 version is a pretty faithful port of the original ZX81 game though I think the original program only had the equivalent of Medium difficulty.

I wrote this as a first step towards getting my son interested in pico-8 programming - I thought I'd better learn how first!

P#71714 2020-01-02 21:16

You might be interested in looking at this, @ncw, to get the right visual effect:


P#71716 2020-01-02 21:22 ( Edited 2020-01-02 21:23)

@dw817 nice isomorphic graphics - that would be very easy to implement :-)

P#71718 2020-01-02 21:42

Glad to help. I love puzzles so I'm going to keep my eye on this one. :)

P#71719 2020-01-02 22:12

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2022-12-04 15:43:52 | 0.023s | Q:21