Live Coding Kotlin/Native Snake
summary
Live codes a playable Snake implemented with Kotlin/Native, building and running a standalone ~700 KB single-threaded binary, using pregenerated C bindings to ncurses for terminal UI, unit tests for movement and turning, and a functional immutable snake model. Shows memory management patterns: manual C allocation, arenas and memScoped with defer for cleanup, apple spawning, growth logic, collision and game-over detection, and pushes code to GitHub where it can be inspected.
AI-written summary · about
chapters (9)
- 0:00Kotlin Native introduction
- 5:13Project setup and tools
- 8:31Developing game logic
- 12:55Ncurses terminal UI
- 18:13Game loop and input
- 22:21Memory management
- 25:09Game mechanics and rules
- 30:58Adding apples and growth
- 37:53Conclusion and takeaways
related talks
44mLive Coding Kotlin - Native Snake
46mLive Coding Kotlin/Native Snake
47mSnake in 10 Lines: Learning More by Coding Less
54mKotlin/Native: Answers You Won't Find on the Internet
44mDeep Dive into Kotlin/Native
52mKEYNOTE: Kotlin/Native – Embracing existing ecosystems
50mKotlin - The Chronicles of Lost Semicolons
36mUsing Kotlin/JS and Kotlin/Native on Android
