About coming up with game code architecture

I ran into a Reddit thread in r/gamedev (can't find it anymore) about a teacher asking what topics are important but least talked about or have few resources so he can make instructional videos about them. Majority of the responses is about code architecture or how to structure code. This got me thinking "maybe I … Continue reading About coming up with game code architecture

Accessing struct fields using reflection without producing garbage

One of the good things we've made in Academia is its serialization or also known as saving/loading. We were able to create a generic writer and reader that can write/read any type of instance. Such framework has not changed much from introduction until release. This is possible using reflection. The following is the gist of … Continue reading Accessing struct fields using reflection without producing garbage

How to run jobs using BufferFromEntity in parallel: Children entities in a hash map

In my previous post, I talked about how to run jobs with ComponentDataFromEntity (CDFE) that writes to a list or a set of values in parallel. This is useful for parent-child relationships where the child entities are maintained in a list on the parent. In this post, I want to share with you a different … Continue reading How to run jobs using BufferFromEntity in parallel: Children entities in a hash map

How to run jobs using ComponentDataFromEntity in parallel

ComponentDataFromEntity<T> is one of the most commonly used API in Unity's Entities package (ECS). At least in our case. It's basically like Dictionary<Entity, T> where T is an IComponentData. You can lookup any component as long as you have the entity owner. You can get a ComponentDataFromEntity<T> for any T in any sytem. The most … Continue reading How to run jobs using ComponentDataFromEntity in parallel

How to add subscribers to Mailchimp within your Unity game

Mailing list is one of the powerful marketing tools for indie devs. You can read Chris Zukowski's posts here and here. One of my favorite books, Perennial Seller by Ryan Holiday, also talked about why a mailing list is important to have if you're a creator that wants to sell. There's a story that when … Continue reading How to add subscribers to Mailchimp within your Unity game

How we did the tutorial system in Academia: School Simulator, Part 3: Putting them all together

In part 2, I discussed how we made the tutorial actions that will be available on the editor. Now we're on the last part (I promise). I'm going to discuss how we put them all together from the SSM framework discussed in part 1 and the actions in part 2. Editor Let me show you … Continue reading How we did the tutorial system in Academia: School Simulator, Part 3: Putting them all together

How we did the tutorial system in Academia: School Simulator, Part 2: Actions

In part 1 of this post, I discussed about the underlying framework used for our tutorial system for Academia. I'll continue it here on how we made the tutorial actions. Locking or unlocking an interaction UI In Unity, there's a base class for all components that makes a UI interactable. It's called Selectable. The components … Continue reading How we did the tutorial system in Academia: School Simulator, Part 2: Actions

How we did the tutorial system in Academia: School Simulator, Part 1: SSM

I've been a game developer for more than a decade now. I can say that one of the technically challenging features to do is the guided tutorial. Tutorials are generally hard because they tend to temporarily break the normal functioning of the game's systems. Later on, those systems should revert to functioning normally and seamlessly. … Continue reading How we did the tutorial system in Academia: School Simulator, Part 1: SSM

The different lists allowed in IComponentData

Unity's ECS is very different in that it requires a subset of C# if you want to take advantage of the Burst compiler. This subset was termed High Performance C# (HPC#). For the components part of ECS, only structs are allowed that are composed of blittable types. You can't have reference types like classes. public … Continue reading The different lists allowed in IComponentData