Posts in "Screenshots"

Devlog: Godot Game Update

A brief status update on that Godot game. I think we’re pretty close to a finished 4-1 level. The underground section has been built, and the level has been decorated. I’ve also added a couple of secrets, which needed a few new mechanics β€” like doorways, which are used to transport the player around the level β€” plus some refinement to existing ones. I am a little concerned about the amount of waiting involved near the end of the first half, where the player will need to make their way across a large gap by jumping on the slow cycling “layer 2” tile layer.

Does Vivaldi Mobile for Android have GIF support? Yes… I guess? Not entirely sure who’s asking. Or why. Are these the same people who want to know if Vivaldi has paid stickers or file sharing support? Is this for a hypothetical messaging app?

Auto-generated description: A review screen for the Vivaldi Browser app asks the user to rate the app with stars and provide feedback, with additional questions about GIF support.

Blessed be the Mail.app View menu and the option to hide the useless Apple AI priority messages. My Inbox is now slightly more sane.

Auto-generated description: A computer screen displays a dropdown menu with various options such as Show Tab Bar and Show Priority, against a background of tall trees.

A bit more on the Godot game this morning, this time working on background tiles artwork. Made some grey masonry tiles for the end castle sequences. Also tried some background rocks for underground areas. I’m pretty rubbish at anything organic, but they didn’t turn out too bad.

Auto-generated description: Two rectangular pixel art frames with stone textures, one in brown and the other in gray, are displayed with matching filled versions inside them.
Right side has the background tiles surrounded with their complementary foreground tiles on the left.

It pains me that Forgejo’s CI “pipeline running” animation spins anti-clockwise, as if you’re going backwards in time. A metaphor, perhaps? Services get undeployed, binaries go back to the source code, projects return to their seeds of ideas. πŸ€”πŸ’­

Oh, build’s done. Never-mind. πŸ˜€

A commit titled 'Added the grid image processor' by user 'lmika' was pushed to the main branch with the workflow file 'deploy.yaml', with a yellow spinner spinning in an anti-clockwise direction.

Was looking at how I could add hazards to my Godot project, such as spikes. My first idea was to find a way to detect collisions with tiles in a TileMap in Godot. But there was no real obvious way to do so, suggesting to me that this was not the way I should be going about this. Many suggested simply using an Area2D node to detect when a play touches a hazard.

I was hesitant to copy and paste the scene node I had which handled the collision signal and kill the player β€” the so-called “kill zone” scene β€”but today I learnt that it’s possible to add multiple CollisionShape2D nodes to an Area2D node. This meant I needed only a single “kill zone” scene node, and just draw out the kill zones over the spikes as children. The TileMap simply provides the graphics.

Auto-generated description: A game development interface displaying level design with a grid layout, tiles, and collision shapes is shown.

This discovery may seem a little trivial, but I’d prefer to duplicate as few nodes as a can, just so I’ve got less to touch when I want to change something.

Tried opening my Godot project this morning and was greeted with the following error:

Auto-generated description: A computer screen displays a development environment with an error message pop-up about an invalid or missing scene file.
scene/resources/resource_format_text.cpp:284 - res://scenes/falling_platform.tscn:14 - Parse Error: 
Failed loading resource: res://scenes/falling_platform.tscn. Make sure resources have been imported by opening the project in the editor at least once.
Failed to instantiate scene state of "res://scenes/falling_platform.tscn", node count is 0. Make sure the PackedScene resource is valid.
Failed to load scene dependency: "res://scenes/falling_platform.tscn". Make sure the required scene is valid.

Traced it back to the technique I was using to respawn the falling platform. Looks like Godot didn’t like the two preloads I included:

# file: scripts/falling_platform.gd

@onready var FallingPlatform = preload("res://scenes/falling_platform.tscn")
@onready var FallingPlatformScript = preload("res://scripts/falling_platform.gd")

This resulted in a parse error and Godot thinking the level scene was corrupted. In retrospect, this kinda makes sense. What I doing was technically a circular dependency, where the scene and script was trying to preload itself. I was hoping Godot was smart enough to recognise this, but I guess not.

So I had to change the respawn code. I modified it to make use the duplicate method. Here’s the revised version:

func respawn():	
    var dup = self.duplicate()
    dup.global_position = init_global_position	

    # Duplicate also copies the velocity so zero it out here
    dup.velocity = Vector2(0, 0)
    get_tree().current_scene.add_child(dup)

After some limited testing, this seems to work. One good thing about this approach is that it looks like duplicate copies the script, so I no longer need to do anything special here.

So I guess the lesson here is don’t try to preload the script within itself.

Adventures In Godot: Respawning A Falling Platform

My taste of going through a Godot tutorial last week has got me wanting more, so I’ve set about building a game with it. Thanks to my limited art skills, I’m using the same asset pack that was used in the video, although I am planning to add a bit of my own here and there. But it’s the new mechanics I enjoy working on, such as adding falling platforms. If you’ve played any platformer, you know what these look like: platforms that are suspended in air, until the player lands on them, at which point gravity takes a hold and they start falling, usually into a pit killing the player in the process: