[Solved] Possible to change render script at runtime?

Hi all,

I understand I can configure a render script at runtime by sending messages to it, but is it possible to change the active render script at runtime? If not, this would be a pretty cool feature. Monolith render scripts could be neatly broken out into more specialized scripts and help keep projects tidy.

For example, I’d like to have super-simple render scripts for my menus and front-end and a much more complex script for my game screens.

You can use a top render script and use lua modules with different functionality.

3 Likes

Ah good point. Can simply forward the update and on_message to the modules. Why didn’t I think of that first? :man_facepalming:

Thanks =)

1 Like

I created a helper project for this kind of functionality. Nothing fancy, but it helps a bit: https://github.com/britzl/easel

1 Like

Oh perfect, that looks useful!

1 Like

In programs/predicate.lua there is a redundant loop?

The loop sets the local variable ‘tag’. This then goes out of scope.

edit: should it be: tags(tag)

1 Like

Ah, yes that is indeed a bug. The purpose is to ensure that the tags are hashes. Could you please either report a bug or submit a pr.