all repos — tictactoe @ main

tic-tac-toe game for uxn

43c4c19b
use sprites to draw cursor and board

this is a bit more code, but ten times less cycles to
draw the board and the cursor. the latter now looks slightly different,
this is somewhat unintentional, but only slightly.

also board is now drawn at the background layer, while
everything else is on foreground. doesn't matter much, but
makes more sense.

in uxn32 redrawing the cursor erases figures. looks awful and is a bug.
but this happens probably because uxn32 lacks the recent update to
a screen device.
la-ninpre aaoth@aaoth.xyz
Tue, 29 Aug 2023 17:54:41 +0300
94c3b37d
refactoring and optimization

- remove logic from drawing code (also simplify)
- remove ability to make move with space key
- fix bug where game instantly restarts at the end
(key release event was triggering the restart)
la-ninpre aaoth@aaoth.xyz
Tue, 29 Aug 2023 14:37:05 +0300
e55541a2
compact board drawing code

also make cursor change color in place
la-ninpre aaoth@aaoth.xyz
Mon, 28 Aug 2023 15:53:21 +0300

tictactoe.tal

simple little game that took me far longer than i thought it would.

installation

you need uxn assembler and emulator. for example, check out uxn-sdl (which also contains uxnasm, the assembler) and drifblim (the self-hosted assembler).

controls

arrow keys to move, button A (or control) to make your move. when the game is over, press any button to restart.

licence

ISC (see LICENCE).

clone
git clone https://git.aaoth.xyz/tictactoe