Log In  
Follow
ncw
Follow

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

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.

Levels

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.

History

  • 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

Follow Lexaloffle:        
Generated 2020-10-19 15:25 | 0.094s | 4194k | Q:27