Skip to content

Articles in 2021

Thoughts on software development, games, design, and the things I learn along the way.

Advertisement Talescape
Create a List With Multiple Different Types in C#

Create a List With Multiple Different Types in C#

Generally C# is a very strongly typed language and usually lists allow only one defined data type. Using ArrayList, however, we can get around this restriction to some extent.

Capture Screenshot in Unity

Capture Screenshot in Unity

Screenshots can be created very easily in Unity using the ScreenCapture class respectively the CaptureScreenshot method. You can use the class defined below. Just create a new script CaptureScreenshot.cs and paste the code there. Then you just have to attach the new MonoBehaviour to a GameObject. You can select the folder and the key afterwards simply inside the Inspector. Screenshots will be saved in your system folder Pictures.

Runtime Storage in C#

Runtime Storage in C#

Sometimes you just want to store some random value. For this I wrote the RuntimeStorage class. It serves me in some games as a naive cache for a couple of less important values.

How To Create And Use a Singleton in C#?

How To Create And Use a Singleton in C#?

Creating a Singleton is relatively simple. First we create a static variable _instance. In addition, we create a property Instance. We will use it later to access the Singleton. In addition, a new instance of the class is provided there, if none should exist yet. This way we also ensure that the singleton is initialized at exactly the right moment. Namely, only when we need it.

Assign a Static IP Address in a Local Area Network

Assign a Static IP Address in a Local Area Network

You can change the assigned IP address of your computer by editing the file /etc/network/interfaces. Search there for your primary Ethernet controller (usually eth0). Change the value from dhcp to static. Then you can specify address (IP address) and gateway (usually your router). Then restart the network or computer. Tested under Ubuntu and Rasbperry Pi OS.

How to Install DDEV on an Apple M1 Mac

It doesn't often happen that I'm one of the early adopters. However, after the announcement of Apple's new silicon processor, I wanted to be ahead of the game this time. Needless to say, there was hardly any compatible software at the beginning. That's why I had to work with MAMP and a local PHP installation - terribly inflexible. But now I finally managed to get Docker and DDEV up and running.

Optimizing Aureola: Conclusion

In the previous articles in this series, I showed you how I optimized my blog. Not only was I able to reduce the size of the website, but also the response time has improved significantly. Time to take a look at the result and draw a conclusion.