ChunkDev 🦋
banner
chunkdev.bsky.social
ChunkDev 🦋
@chunkdev.bsky.social
Building ChunkCity - an Infinite City Builder for PC & mobile 💻📱. No engine, built with #Kotlin and #libGDX
Pinned
Integrated the 2D traffic simulation into the 3D world. Got it working on first try.

#gamedev | #indiedev
Taught my Kotlin scripting runtime to handle default parameters and named arguments. For simplicity, default evaluation lives in the function body and gets removed when inlined at the call site.

#kotlin
December 29, 2025 at 8:40 PM
Angular lerping done wrong in production
December 25, 2025 at 10:33 PM
Added vararg support to my runtime. Fewer things broke than expected.

#kotlin
December 21, 2025 at 7:59 PM
Implemented a Vector3 inspired by libGDX in my Kotlin scripting runtime. Overriding equality just works - and later sharing the native host class should work seamlessly as well.

#kotlin
December 19, 2025 at 9:44 PM
Reposted by ChunkDev 🦋
Simulating water evaporation & precipitation, driven by a (somewhat fake) fluid simulation for the wind! Need to tweak some constants but overall taking e.g. year-average precipitation and temperature should give me some nice biomes.

#indiedev #gamedev #indiegames
December 10, 2025 at 8:04 PM
Reposted by ChunkDev 🦋
I refactored my code that generates a density map for the city to be more detailed and loved the resulting texture so much that I felt compelled to use it in the game. So I added these parallax map displays kind of like some cities have miniature versions of them.

#gamedev #indiegame #procgen
December 10, 2025 at 2:34 PM
I added thread support to my runtime. It’s mostly a wrapper around Kotlin’s threads - and of course I had to demonstrate it with the obligatory race-condition example.

#kotlin
December 6, 2025 at 5:32 PM
Reposted by ChunkDev 🦋
The level editor is no longer limited to one chunk! The stages can get huge now, if we so desire :D

If it gets too large, I'm going to have to set a system where it loads/unloads chunks, but that won't be too tough.

#gamedev #indiedev
December 6, 2025 at 1:11 PM
Sorry I had to use the most useless CS-class example ever to show off interfaces working.

#kotlin
December 3, 2025 at 9:27 PM
I discovered that adding new opcodes is sometimes easier if I introduce them through handwritten MiniKt assembly functions, so I can reuse the normal function resolution. The compiler inlines them anyway.

#kotlin
November 30, 2025 at 7:41 PM
Added generics for classes. It was painful. I wasn’t aware how much the compiler does for you.

#kotlin
November 29, 2025 at 7:02 PM
Me: I won’t add many features to this tiny Kotlin scripting runtime.
Also me: adds function-level generics.

#kotlin
November 28, 2025 at 7:34 PM
One of Kotlin’s wildest features: you can define control flow altering functions using lambda expressions with a special syntax. Thanks to aggressive inlining it’s basically free.

#kotlin
November 27, 2025 at 1:25 PM
Higher-order functions take other functions as arguments. The fun part: you must not inline the call unless the target is constant - otherwise you break semantics (and your VM).

#kotlin
November 25, 2025 at 9:15 PM
I did the absolutely sane thing of letting the script run another script; Kotlin-ception achieved

#kotlin
November 23, 2025 at 10:04 PM
Got sidetracked and ended up writing a tiny raytracer for performance benchmarks. 😅

#kotlin
November 23, 2025 at 3:33 PM
This is my first time implementing class inheritance via vtables (in my tiny Kotlin runtime).

A::foo() vs B::foo() get resolved through vtables in the generated code if they cannot be resolved statically. Seeing it work correctly is more satisfying than it should be.

#kotlin
November 22, 2025 at 9:11 PM
Imagine your embedded runtime throwing exceptions with real stack traces - and your IDE actually picking them up correctly so you can easily navigate there. 🤯

#kotlin
November 20, 2025 at 6:59 PM
The journey continues. I’m still aiming for the point where I can take some random Kotlin code and execute it within Kotlin.

Recent additions:
- Explicit nullability
- Safe calls
- Extension functions

#kotlin
November 20, 2025 at 4:24 PM
My embeddable Kotlin scripting language just got a new feature: classes.

And if you look at the assembly, you can see the function calls getting inlined.

#kotlin
November 17, 2025 at 6:47 PM
Sometimes you get one of those insane ideas you know you’ll regret, but it’s just too intriguing.

So… I’m building a compiler for a subset of Kotlin - something I can embed into Kotlin/JVM projects like Lua, but with static typing and better performance.

#kotlin
November 15, 2025 at 12:52 PM
Reposted by ChunkDev 🦋
First pass on some basic parks/plazas.

#screenshotsaturday
November 8, 2025 at 7:24 PM
I added a tree cutter for your tree cutting needs.

#gamedev | #indiedev
November 6, 2025 at 7:06 PM
Originally, terrain editing was click based. However, I noticed that clicking like a hundred times to make a hill is rather inconvenient. So now there's continuous terrain editing.

#gamedev | #indiedev
November 5, 2025 at 5:31 PM
Experimenting with clipping based transparency. In contrast to actual alpha it doesn't require special sorting or separate draw calls. However, some GPUs - especially mobile ones - tend to dislike this type of rendering pretty much. It's also quite noticable on lower resolutions.
November 3, 2025 at 7:02 PM