So @timbeaudet challenged his viewers to make an Asteroid-like game, and I needed a reason to try #Godot out more. We sometimes play typeracers on his stream so I decided to give making a typing game a go!

#gamedev #typing

Gotta have a spaceship in an Asteroid-like!
...maybe need some actual asteroids too 😄

Using #Godot Tweens to get the asteroids to move on their own, without having to maintain code to manually update all the asteroids' positions, for the low cost of not being able to adjust the motion later \o/

#indiedev #typing

Instantiating bullet scenes and tweening them towards the asteroid, and only removing the asteroid when the last bullet hits it!

#WIPWednesday #indiedev

Now that the word disappears when the last bullet hits, rather than when you finished typing it, let's colour the word green as a visual indicator that it's finished!

#gamedev #typinggame

Correctly typing characters shoots bullets, so now we also need typos showing up. Implemented as red characters flying away, also works as indicating the current active word.

#gamedev #indiedev

Took me like an hour to get the hearts to line up in the HBoxContainer thing and be spaced properly... Layout in #Godot is confusing, sometimes clicking the anchor shortcuts makes the node move around in the parent, and sometimes it just does nothing O_o

Anyway, there's a fail condition! It's a real game now right?

Quick WPM display, layout anchor stuff is weird so just hard-coded position for now lol, who needs to play in any other resolution!

WPM = CPS * 60 / 6
Sources say "average word length" is 5 but I mostly have longer words so I guess 6 should work?

#typing #asteroid

Got different sized asteroids working, depending on how long the word is!
Not sure what the proper #Godot way is, but I made multiple Line2Ds in Asteroid.tscn, and then a script to hide all of them but one 😄

WOW! Sound effects do so much 😲
Also splitting the Line2D into a bunch of pieces and yeeting them away as an explosion effect!

#gamedev #typing

Being able to draw_line and draw_string on a Node is nice, managed to throw together a better end screen with a line chart of your #typing WPM over time!

#indiedev

Oh my god, I finally figured out one of the reasons why layouting things in #Godot is terrible. In order to right-align or center text, you need to constrain the text to a specific width! What‽

Without a width, text grows towards the right, unbounded by any maximum size. That's how left-align works. So why can't it grow towards the left, aka right-align, unbounded? Or grow both ways, for center-align?

Why is having a fixed width a requirement for center and right-align, but not left-align?

Apparently it's a known #godotengine bug https://github.com/godotengine/godot/issues/80163#issuecomment-1684939352 but they seem to think it's correct behaviour.
This is beyond stupid.

Anyway, finally got the WPM display to be right-aligned, by providing a width...

Also found the ShaderMaterial and added a subtle starry background with some twinkling stars 🌟

#screenshotsaturday #typing

Also added an audio cue for finishing a word, so you can look at the next word whilst finishing the current one, and still know that it got typed correctly!

#gamedev #typing

and juice it up a bit by increasing the audio pitch as you build your typo-free streak! and the star twinkling goes a bit crazy
what would a #gamedev Sunday be without some #screenshake

This feels like a hack, but it seems to work, creating a SubViewport around an object to take a "screenshot" of it into a texture and then multiple sprites with its own region of the texture == word go boom 💥
But getting used to how #Godot thinks, I probably missed a "split Node into multiple segments" button somewhere :P

#indiegame #typinggame

Splash screen, main and settings menu, and fancy transition into gameplay! 🤩

There's still a very slight frame glitch when #Godot loads the next scene, even when doing `await get_tree().process_frame` just before switching. Probably not possible to get rid of?

#gamedev

I managed to get rid of the stutter by instantiating the scene into a SubViewport and then deleting it after a frame 😅

Also the Steam #Typing Fest 2026 just started, and I'm participating! You can go play the #demo right now!

https://store.steampowered.com/app/4346020/Typeoids/

#gamedev #indiedev

Started implementing different typing modes.

Some words you have to type backwards, which is surprisingly hard to do!
And instead of actual words, sometimes you get a collection of random letters!

#SteamTypingFest

@tsjost Yeah, this is silly. I don’t even see what the limitation would be, because you can shape the text normally, decide what the width is, and then align text lines to whatever side the user wants.

For single line, at least, you can simply align the node itself to grow left or in both directions.

@yurisizov Whoa, so aligning the label node with anchor on the right side, makes the text grow towards the left, aka right-aligned, despite the label having "Horizontal Align: Left" specified. This adds another layer of confusion :D

(I understand that it's the content of the box, not the box itself, being left-aligned, but it's still weird having two different things determining growth direction)

Thanks!

@tsjost Actually, the anchor is not directly responsible for the grow direction! You’re probably using the quick anchor presets and those set the most sensible grow direction with them. But you can set it to custom and then the grow direction section will become visible for you to configure however you like. It’s true for every anchored node.

It probably helps to ignore the fact that you’re growing a label specifically and just think of the control’s box growing with content, whatever it is.

@yurisizov Oh wow, I found the Custom and Grow Direction now, that makes a whole lot more sense! I might be starting to understand how this works. Thank you!

@tsjost

I guess this horizontal alignment behavior stems from old-school CSS intuition, where people regularly had exactly the same problems with alignment of any object, particularly centering.

With CSS, you generally had text containers' widths defined explicitly and properly, and in that "box model" context, text alignment worked out nicely as intended, as you were always aligning relative to the dimensions of the enveloping box, not growing willy-nilly all over the place and ruining your page layout with enlarged text or whatever.

Godot seems to lean heavily into existing CSS styling paradigms, to rely on that already built intuition. I would not call that beyond stupid.

However, different alignment modes would be nice, as I can totally understand how "just grow leftwards or from the center!" would come in handy in gamedev as opposed to rigid page layout land.

Then again, you'd probably end up with a year-long battle over what to make the default. 🙄

@Gyroplast You're probably right, Godot seems to be using some box model layouting too. But you're also free to just plop things down at absolute positions, so it would be intuitive to be able to grow the text in other directions, since growing towards the right is already implemented :D

@tsjost
Yeah, I agree with you there, my white-knight reflex just got triggered a little. :)

The commenters on the issue seemed open for a constructive change/addition. Doesn't seem to be too sexy of a contribution, though.