Live Coding Kotlin - Native Snake
summary
Live-codes a playable Snake written in Kotlin/Native that uses ncurses for terminal UI, Gradle for builds and Kotlin/Native C interop via LLVM, with tiny unit tests for movement and turning. Builds a 1.6MB standalone binary, implements apples, growth (growthSpeed = 3), and halfDelay 200ms input; memory uses reference counting plus memScoped/defer for C allocations. The game runs, grows when eating apples, and dies on wall or self collision.
AI-written summary · about
chapters (12)
- 0:00Start
- 3:29Runtime Implementation
- 5:42Source Code
- 14:25Init Screen
- 21:15Half Delay
- 22:13Tail of the Snake
- 23:33Moving Snake Around
- 25:39Navigation
- 27:33Reference Counting
- 29:19Zoned Memory Allocation
- 29:46Mem Scope
- 43:28What You Can Do Next
related talks
41mLive Coding Kotlin/Native Snake
46mLive Coding Kotlin/Native Snake
47mSnake in 10 Lines: Learning More by Coding Less
46mMaking Noise with Kotlin Native
54mKotlin/Native: Answers You Won't Find on the Internet
44mDeep Dive into Kotlin/Native
37mGoing Native
43mThe Triumphs and Tribulations of Kotlin-Native in Practice
