Sign up

Sometimes I Code

Not verified No WebSub updates No webmention support Not yet validated

Blog maintained by the game development studio Lazy Squirrel Labs. We write mostly about video game development, but also about software development in general.

Public lists
I ♥ RSS
Fetched

Sometimes I Code

Creating and using a native iOS/iPadOS (Swift) library in Unity

Unity is a great tool to develop cross-platform games and interactive applications, but it lacks some functionality that is often delivered by native platform libraries. A good example of that is iOS/iPadOS functionality that is only available in native libraries like SwiftU...

Sometimes I Code

Tabs vs. spaces: the discussion that should not exist

I am a firm believer that the “tabs vs. spaces” discussion regarding code indentation should not even exist… because tabs is the only sane answer. And I don’t mean to joke with that punchline—I truly believe that tabs are objectively the right choice when it comes to source...

Sometimes I Code

Generating an icosphere with code

In this article, we will walk through the process of generating icospheres (spheres based on a regular icosahedron) with code. I started looking into icospheres when working on Terraced Terrain Generator (TTG) 2.0 (GitHub, OpenUPM), which added support for spherical terrains...

Sometimes I Code

Adding more detail to Terraced Terrain Generator using Perlin noise octaves

This blog post details how the Perlin noise algorithm was reused to add more detail to terraced terrains generated by Terraced Terrain Generator (TTG). It is part of a series that documents the development process of TTG, containing the following posts: Developing a Terra...

Sometimes I Code

Adding custom terrace heights to Terraced Terrain Generator

This blog post details how custom terrace heights were added to Terraced Terrain Generator (TTG). It is part of a series that documents the development process of TTG, containing the following posts: Developing a Terraced Terrain Generator Terraced Terrain Generator per...

Sometimes I Code

Asynchronous programming in Unity: Coroutines vs. async/await

This article aims to contrast two different strategies for writing asynchronous C# code in Unity projects: Unity’s Coroutines and C#’s asynchronous programming model via async/await/Task. We start by quickly introducing both concepts. Following, we discuss how game developer...

Sometimes I Code

Terraced Terrain Generator performance improvements

This post details the process of improving the performance of Terraced Terrain Generator (TTG), a tool developed to procedurally generate terraced terrains in Unity. For more info about TTG, check its website, repository and OpenUPM pages. This post is part of a series that ...

Sometimes I Code

Developing a Terraced Terrain Generator

In this blog post I will discuss some technical details and give a glimpse of Terraced Terrain Generator’s (TTG) development process. TTG is a free Unity tool for procedural generation of terraced terrain meshes. It’s open source and it’s on GitHub and OpenUPM! Here are some...

Sometimes I Code

[Postmortem] Parker - the game

In this article, I discuss and analyze the development of my last project as a Game Developer at Fantazm: Parker - the Game, an online multiplayer turn-based team strategy game. After a quick introduction of the project, its biggest challenges are presented. Then, we focus o...

Sometimes I Code

Game testing made easier: decoupling code

Most (or close to none) of the game projects I’ve worked in the past implemented automated tests. I was aware of the benefits this type of testing could bring, but I was also knew that implementing them could be quite challenging. In this article, I describe a strategy that ...

Sometimes I Code

Finally, a proper Game Design Document (whatever that means)

A Game Design Document (GDD) is a famous and popular tool used by game developers to… well, to document the design of a game. Even though some say it’s an essential part of the development process, most of the projects I’ve worked on didn’t use GDDs during the entire develop...

Sometimes I Code

How Windows Mixed Reality’s poor reliability forced a kiosk game switch to HTC VIVE

In a previous article, I described the development of VoedingscentrumVR, an educational, kiosk, VR game for Windows Mixed Reality. Although at the time of writing it seemed like it was the end of that game’s development, some surprises crossed our path. Eventually, we ditche...

Sometimes I Code

When software internationalization isn’t just about UI: a tale of how a parsing error crashed our game

Whenever we talk about adapting a game to different countries, the first thing we often think of is localization, but we sometimes neglect its sibling: internationalization. Wait, what’s the difference again? Internationalization is the process of designing and developing yo...

Sometimes I Code

Null check and equality in Unity

In some programming languages – like C# – it is a common practice to use comparison operators and functions to check for null references. However, when programming in Unity, there are some particularities to keep in mind that the usual C# programmer usually does not take int...

Sometimes I Code

Unity’s scripting duality and object destruction

The Unity engine provides users with tools and abstractions that ease its usage and hide its complexity. Although we often take these commodities for granted and completely forget they exist, we often face a situation in which they become apparent, usually due to an unexpect...

Sometimes I Code

C#’s finalizer/destructor trap

Let’s talk about C#’s finalizers (also called destructors in C#) and how a common mistake when using them might lead to unwanted behavior, especially in applications made with the Unity engine. Finalizers A finalizer is a method that is called whenever an instance of a cla...

Sometimes I Code

[Postmortem] Developing an educational, kiosk, VR game for Windows Mixed Reality

In this article I analyze the development Voedingscentrum VR, an educational, kiosk-style and Virtual Reality game I helped to develop at Fantazm from October 2018 until April 2019. After a quick introduction about the project, the biggest problems that surfaced during devel...

Sometimes I Code

FP: Currying vs. partial application

While learning Functional Programming, there were two concepts that for me, were really hard set apart: currying and partial application. One day, I finally decided I would dig deeper and learn what each one represents and more importantly, why I mixed them up. In this artic...

Sometimes I Code

Android 6 (Marshmallow) permissions and Unity

While working on Overclock, our team faced a new problem with Android 6 (Marshmallow): all permissions were requested when the app launches the first time instead of when the user downloads the app. Not only that, but the permissions are requested individually and not altoge...

Sometimes I Code

Unity serialization part 3: Scriptable Objects

This post is part of a series about Unity serialization. Click here for part 1: how it works and examples or click here for part 2: defining a serializable type. On the last article, we learnt how we can define our own serializable types and discovered some problems that ca...