Does the Delta Time plugin still work?

I’ve download and activated the plugin.
I’ve included the right information in the build settings as well as the syntax

but I keep getting a " module ‘plugin_deltatime’ not found: " error

is it working for anyone else?

Are you using Corona builds or Solar2D builds? If you’re using Solar2D builds, Corona Marketplace doesn’t work with them.

You can try this alternative that I found through Google search:

1 Like

Pretty sure I’m using Solar2D builds. The strange thing is this plugin works - and I’ve downloaded it from the same marketplace.

I can’t find the build settings-plugin code in the link you sent

This is an in-house plugin so it’s baked into the offline builds, locally available on your computer.

The code I sent you is an open source library which you can include right in your code and use right away. You can check out the example:

You can also use my delta time module.


local M = {}

M.dt = 1

local frame = 1000/display.fps
local getTimer = system.getTimer
local prev

local function _update()
    local new = getTimer()
    M.dt = (new-prev)/frame
    prev = new

function M.start()
    prev = getTimer()
    Runtime:addEventListener( "enterFrame", _update )

function M.stop()
    Runtime:removeEventListener( "enterFrame", _update )
    M.dt = 1

return M

You can use the delta time in your project via:

local dt = require("deltatime")

Runtime:addEventListener( "enterFrame", function()
    print( dt.dt )
end )

Basically, once you’ve required the module and called .start(), then you’ll be able to access the delta time value via dt.dt in whatever file you’ve required it from. Then, if you ever stop the module, it’ll still keep your game from crashing.

By the way, Corona Marketplace is obsolete for Solar2D builds. You can use alternatives found here:
or directly reference third-party plugins like in here: Plugins for New OFFLINE builds 3595

@bgmadclown, I’ve never downloaded plugin code before (knowingly), so if I download those plugins, where do I put them on my system? (Mac)

Not entirely sure because I haven’t tried it yet but this may work -

For example, Vungle plugin works like this in Windows: Under Simulator/Plugins there is a folder named plugin.vungle and there is a data.tgz file inside. It should be similar.

Does anyone know if we should download plugins and place them in the Simulator/Plugins folder on Mac and/or PC, with regard to the new offline version 3600?