Anyway, these days I'm on Godot 4 with the rest of society, and... it's good! Lots of problems and inconsistencies were fixed, such as how sprites can now have a Z-axis too, not just GUI elements... All great! I still don't like a lot of the built in signaling code for AnimatedSprite objects, to the point I made my own state machine that swaps textures manually at specific times to emulate complex and responsive animation behavior. But whatever! It's a good engine now.
This thread is going to be half devlog, half complaining. Let's get to the devlog section for today.
I decided to make a game with only one texture source. Behold, the linchpin of my next project!

It doesn't look like much, but with a clever application of the threshold filter, it quite resembles half an industrial wall texture! I created cubes of the stuff after futzing with godot's various decal and 3d sprite options. Turns out I just had to make a Surface Material on my Mesh Instance and give its Albedo a Texture, whatever any of that means.

Once the cubes were working, I began the ambitious part of my project. You see, I want to load my game map from the banana too! How? Well, if you take an image and sharpen it real far, you get all kinds of fascinating artifacts. Here are some now:

Essentially, when the game starts I want to load a map based on an image like this. Every white pixel is an empty space, and every black pixel is a block. This part was surprisingly easy.
Code: Select all
for i in 100:
for n in 100:
var c = img.get_pixel(i, n)
if c.r == 0:
var tileinstance = tile_black.instantiate()
tileinstance.position = Vector3(float(i-50), 0.0, float(n-50))
self.add_child(tileinstance)

It looks pretty cool, though! Join me next time for scope creep, as I try to make really any image viable as a map you can walk around in. My success will be mixed!!