Elektrine lite

← Feed

@yurisizov@mastodon.gamedev.place

Post #2895246

2026-05-11 13:12 UTC

@bryce@mastodon.brycedixon.dev @memoriesin8bit@mastodon.gamedev.place @tracefree@mastodon.gamedev.place Oh, I don't mean that you cannot render images on the fly. In fact, you don't even need nodes for that. But you don't have to do that for this task here. You can create a scripted texture type, extending Texture2D, and render other textures, styleboxes, text from there. And RTL supports any texture resource as an image, including your scripted ones. Of course pre-rendering would be cheaper per frame, but if that works here, then no reason to do it at runtime.

Replies (2)

  • @bryce@mastodon.brycedixon.dev @memoriesin8bit@mastodon.gamedev.place @tracefree@mastodon.gamedev.place Basically, nodes and resources do not do any rendering. They are just lists of commands for the rendering server to draw something. Resources don't even hold any rendering context, they use the canvas item RID passed to them. Given that information, consider this: you can create a custom resource that contains all the rendering commands you need, whatever they are. I have a custom texture type that draws styleboxes, for quick prototyping, for example.

    Open ##2895247

  • @yurisizov@mastodon.gamedev.place @bryce@mastodon.brycedixon.dev @tracefree@mastodon.gamedev.place Well, whatever option I pick, it doesn't have to be the cheapest, but it needs to be flexible enough to switch the image/text once the player changes their input device. Seamlessly. Maybe I'll ship around all these layers and layers of complexity and just don't add the input prompts into the text. Begins to sound like way more of a time sink (for me) than it's worth it.

    Open ##2895250