Oskar Stålberg Profile picture
Gamedev. Made @BadNorthGame and Townscaper. Both available on most platforms. Go buy em!
Jun 17, 2023 4 tweets 1 min read
I figured out how to mimic Thread.Sleep() in Burst! Just store time in a static unsafe NativeArray! Then you can write to it from the main thread and read from it inside a job! Probably super bad in many ways but good enough for visualization and debug! Well not static, cause Burst wont allow that. But an unsafe array that's referenced both inside the job and outside in a main thread timekeeper.
Nov 10, 2022 6 tweets 2 min read
An early look at grass billboards. I really like how they add a completely new kind of shape and detail frequency. Creating nice (subtle) outlines is always a quite technical business. Even more so on grass billboards. I want a strong outline when silhouetting against a cliff or the sky, but not against other grass.

You might recall my contrast texture:
Nov 11, 2021 5 tweets 2 min read
I'm exploring the Half Edge data structure. Feels like a really lightweight, powerful and versatile way of representing topology. A big thanks to everyone suggesting I look into it. Being able to effortlessly represent n-gons is much more convenient than I expected
Oct 13, 2021 7 tweets 4 min read
More talk prep. Gonna have another go at persuading people to cut their tiles along the dual grid instead of the main grid. I genuinely don't understand if this is rare because people don't know about it or if there is some drawback I'm not seeing.

Image
Image
Image
Most gameplay logic (like collision and navigation) should still happen on the main grid. And all object-like sprites, like characters, houses, etc, should also go on the main grid.
Oct 12, 2021 4 tweets 2 min read
Imma talk about my new island generator at Sweden Game Conference (@SwedenGameArena) on Friday (no idea if its gonna be recorded). Naturally, I'm preparing by implementing some nice timing and visualization. @SwedenGameArena While implementing said visualizations, I discovered several buglets, glitches and irregularities that were not obvious before. There's probably a lesson in there somewhere.
Oct 11, 2021 6 tweets 2 min read
I regret to inform you that I've relapsed into procedural island generation Everyone is like "worldscaper when" "bad south when". No one is like "oh, what algorithmic approach are you using?"
Dec 2, 2020 4 tweets 2 min read
The cliffs and mountains in Humankind look absolutely fantastic. Seamless, smooth, yet sharp and expressive. I can't figure out how they're doing them... is it a tile-based approach? A mega texture, baked on the fly? Some combination? It looks good enough to be properly eroded at a huge resolution at load time. Yet there are repetitive elements (and even occasional mirrored tiles), which heavily suggests some tile-based approach.