MissingDeadlines / iolite

A highly flexible, voxel-powered game engine with an embedded editor. Create games using Lua, the native C/C++ API, and assets authored in voxel editors like MagicaVoxel or Avoyd.
https://iolite-engine.com
MIT License
191 stars 14 forks source link

[Feature request] TimeScale + writing files or/and calling external network protocols #6

Closed trsh closed 1 year ago

trsh commented 1 year ago

I would like a feature where I can increase (maybe also decrease) timeScale, i.e. make everything (including physics) faster.

And a option to write to write custom data (like json) to a file or/and even better an API to subscribe and call remote network sockets.

These 2 things would allow me to bring reinforcement learning (RL) to IOLITE.


Use cases for timeScale:

One example is slow motion in certain situations. Another to fast-forward some gameplay episode. Then putting the game process in hold with TimeScale 0. And list goes on. I was using it all the time while making games in Unity. For machine learning its essential to speed up the learning process simulation.

Use cases for writing files:

Save games, statistics, or something very specific for the game to store persistent data. For machine learning it would be 1 way to push data forth and back from RL learning backend, which is on Python.

Calling external network protocols:

Again lots of use cases. Like fetching Ads info, Saving game data on remote server etc. For machine learning this is second way to transport data forth and back from RL learning backend on Python.

Again why Python backend?

There are no good alternatives. All cool RL ML libs are written on Python. And every integration I know work this way. Unity's ML agents and new UE5 Agents as well.

Why RL:

With RL one can train very realistic NPC behavior. Its still not very popular for big games. Mostly they use behavioral trees. But I can see it becoming more and more actual. Besides The npc thing, you can also train A.I. to build terrains and beyond.

begla commented 1 year ago

I've added support for a "time factor". It will be available in 0.2 next week!

Am I correct that "writing files" and "calling external network protocols" are obsolete with the upcoming C API? There is some support for writing data via the Lua API. Still, it's also something that can be easily extended now with the Lua integration becoming a native plugin. :slightly_smiling_face:

trsh commented 1 year ago

Yes, for me at least, its obsolete.

begla commented 1 year ago

Implemented in 0.2.1 via the API.