- Before that, I made games on this engine and I understood it well. Now I have an idea to create a non-gaming application. I don’t know kotlin or java to create in android studio. Is it a good idea to make a non-game application on this engine? From the point of view of the technical part, will it be inferior in terms of performance and other parameters?
- If it’s a good idea to create an application on this engine, then how to make the screen update not 60 frames per second, but only on a certain event or user action. (To reduce power consumption and optimize the application)
Apps will work fine. You can use native extensions to add extra features.
You can control frame rate directly in your render script. Skip rendering new frames when nothing has changed in the app for example. You can also skip every other frame always with a simple bool toggle.
If you code your app to be reactive code wise (as in, very little code runs on update / most code reacts to user input/events/timers) then you should be using very little idle CPU.
If I limit the number of frames, how can I use smooth animations? Temporarily reset the frame rate to 60 once the animation is over, put the cap back on?
It’ll work but it won’t be ideal. It depends on what you want to do. Utility programs tend to use features that game engines don’t provide (file-system stuff, communicating with the OS, communicating with hardware, etc.). Of course you can make native extensions to add features, but that’s not really different from learning kotlin or java and android studio…
Utilities tend to be more UI-heavy than games too. (Not that this will change, whether you use Defold or not, just something to be prepared for.)
Last I checked there was no way to make the engine go “idle”, I asked the same question a while ago, but I agree about trying to dynamically change the frame-rate like Pkeod says, I never tested that thoroughly myself.
I just need a file system and processing of text files (.txt, .doсx, .rtf). Looks like I need to look for a solution like app builder.
It’s looks like LuaFileSystem works on Android, so that part might not be bad.
Processing .rtf and .docx…That sounds quite difficult to me, unless maybe you’re using C#. Do you actually want to display them, or do you just need to read them? I think there are reasons why word processors tend to be gigantic.
You could probably make a doc-whatever to RichText convertor. There are probably existing parsers you can use for Lua.
@ross.grams is correct that other tools may be better for app domain specific stuff. But there’s still nothing stopping you from using Defold. You can even run your own HTTP webserver with Defold and allow uploading/downloading docs from your local network.
Hi. I think it depends on really what your requirements are for this. It sounds like you want to filesystem intensive things, with a gui. It is quite easy to do with lua - dont really need to bother too much with native extensions unless you need to access the native platform specifically.
How I would tackle it (I have done similar to this with a number of tools):
- You can ‘disable’ rendering by simply not rendering. Make a render script file that has an empty update. Technically the renderer will still do some things, but if you dont load it with much/any drawing calls it will do very little (cpu wise).
- To process txt, doc and rtf files you can use one of the many lua libs around that can do this. I made a simple markup → imgui processor. And I have a partially built html->imgui renderer working too.
- Id recommend imgui for any ui rendering (its extremely flexible and has many features). You can also specify when you want to render an imgui frame - which makes it very useful for event styled drawing processes.
To do this in other systems/languages you are going to need to do the above in any case. If you are not very familiar with Defold or Lua, then it might be better to use something else if time is a constraint.
Imho - I have built a number of tools with Defold now. And its my default goto for dev no matter what Im doing