Csharp (4)

Two mice using a computer mouse
Pilvinen Pilvinen

Node2D double click detection in Godot

Clicks for Node2D based nodes can easily be detected by using CollisionObject2D‘s input_event signal. To capture the mouse clicks we can add an Area2D node and a CollisionShape2D or CollisionPolygon2D…

Binary
Pilvinen Pilvinen

Binary addition

Let's take a look at how binary addition can be done by using bitwise operations. Why would we want to do this? Simply because we can. And also because it's…

Array flattening
Pilvinen Pilvinen

Array flattening

One dimensional arrays, or flat arrays as they are sometimes called, have desirable properties. They are fast. They are simple to access and to iterate through. They can easily be assigned…