Time scale or Time freeze ! What are way to do?

Hi everyone! Sometime in game you can see stop motion by critical hit…

If I want to take stop motion or pausing game like that. What are way I can penalty stop all of game(animate, callback…)?
Result I want is something like Timescale in Unity Engine do. Thanks so much for your answer!

You can modify the time step/scale of a collection proxy by posting a “set_time_step” message to it:

@britzl but I don’t use collection proxy, Is there any other method?

My recommendation is that you use one. It is a good practice to organise your game “scenes” around collection proxies. Start with a loader.collection and use that as the bootstrap/start collection.

The purpose of the loader is to load and unload collections through collection proxies. Then have a menu.collection, game.collection, gameove.collection and anything else that makes sense and add these as collection proxies to your loader.collection.

You can see an example of this here:

@britzl If in builtins of engine have a method can call this task at every where. May be work will easy

I’m sorry, I didn’t understand. What should we have in builtins?

What I mean is that if there is a function or an api in go or msg that when called, it can perform the time change feature for the whole system. Because this time change feature is really used a lot when developing a game these days

Yeah, sure, it would be convenient to be able to set on the bootstrap collection as well. Feel free to open a feature request on GitHub!

But I honestly don’t see that it is a big problem since you’ll likely have a controller or loader collection in any moderatley sized game anyway.

Yeah. I was don’t use proxy collection and done with manual script. This issue really need in future if we use Defold to create a AAA game

wait, what kind of AAA game won’t need a loader collection? So a one scene game can be AAA level game?

1 Like

@schlista Using collection it is just 1 option. You can still do it in other ways

For memory management you want to split your game into multiple collections loaded and unloaded using collection proxies. Yes, you can do it through a collection factory and the “load dynamically” option, but I question if that is better than loading and unloading using collection proxies.

But like I wrote above, please create a feature request on GitHub. There is no point in discussing it here. Just keep in mind that it will take some time before the feature request is considered for implementation (unless you do it yourself).

2 Likes