Repository navigation
OpenECS 0.6.0
Pre-releaseOpenECS 0.6.0 lets you enable and disable plugins while a tool runs, and gives plugins structs: plain data with methods and operators, which C and Lua share. A tool can be added to the system's launcher on Linux and Windows. Seven new standard plugins read data formats, compress, run programs, read gamepads, hash, keep SQLite databases and show notifications.
It comes out with the releases of the two repositories that OpenECS ships, each described in its own release:
- OpenECS-std 0.6.0: parse, compress, process, gamepad, hash, sqlite and notify, the plugin list, web's HTTP/2, and cglm on structs.
- OpenECS-examples 0.6.0:
c14_structsands11_parsetos17_notify.
This is still an early release.
What you can do
Enable and disable plugins while the tool runs. The plugin list, the prefix then ;, lists every plugin in the plugin folders. Disabling a plugin asks about its panels' unsaved work, disables the plugins that depend on it, and keeps its panels as placeholders with their state. Enabling it loads it again and gives back its panels. The session remembers what you changed. Plugins do the same with ECSPlugins_Enable, ECSPlugins_Disable and ECSPlugins_List, ecs.plugins in Lua, and follow it with the event ecs.pluginsChanged.
Share plain data as structs. ECSStruct_Register(plugin, "vec3", "float x, float y, float z") registers a struct type, which signatures name struct<plugin.vec3>. C passes it by pointer; Lua gets a table of its fields. ECSStruct_AddMethod makes a function a method, and a method named add, mul, eq and the like is also Lua's operator, so a + b works. ecs.struct.register, addMethod and new do the same in Lua, and the definition files declare each struct for editors.
Group functions in namespaces. A function named with dots, such as json.read, is a nested table in Lua, parse.json.read, and a class in the definition files.
Add a tool to the launcher. OpenECS --install --preset FILE adds the preset's tool to the system's launcher, with its name and icon, and --uninstall removes it. On Linux it writes a .desktop file. On Windows it makes a Start menu shortcut, whose windows the taskbar groups, and adds the tool to "Open with" for its files. A preset's app.categories and app.mimeTypes say where the tool goes and which files it opens.
Open the tool's menu. A right click on the title bar, or the prefix then A, opens a menu of the functions that the setting ecs.toolMenu names, the workspaces, resetting the layout, and quitting.
Go through a table's fields. ECSValue_GetTableFieldCount and ECSValue_GetTableFieldAt go through a table's named fields, in the order they were set.
Small fixes
- Panels and popups sit on whole pixels, and their pixels show one to one, so text stays sharp at any place and size.
- Lua panels draw faster: a surface's methods are found before its fields, and
fillandsetPixelparse a colour text once while it stays the same. - Functions that a plugin's threads sent to the main thread run before its library is unloaded.
- Events no longer leak what an undelivered event carries, such as a dropped file or typed text.
What will break
Sessions. They are format 3, which lists the plugins that you enabled or disabled. OpenECS 0.6.0 reads formats 1 to 3; an older OpenECS cannot read format 3.
Presets. Presets are format 2 when they set app.categories or app.mimeTypes. OpenECS reads formats 1 and 2.
Native plugins. OPENECS_API_VERSION stays 2, and the interface only gained functions, so native plugins of 0.5.0 still load. A plugin that uses the new functions needs OpenECS 0.6.0.
cglm. Its vectors and matrices are structs; OpenECS-std's release says how to change your code.
Build scripts with shuild. SHU_MODULE is SHU_Module, and SHU_UtilBuildScript is SHU_Shuild. shuild writes compile_commands.json only when the build script defines SHUC_COMPILE_DATABASE.
Downloads
openecs-0.6.0-linux-x86_64.tar.gz: the program with SDL's libraries, its plugins, presets and examples, the plugin interface, and the licenses. Unpack it and runOpenECS. It needs glibc 2.38 or later, such as Ubuntu 24.04 or Fedora 39.openecs-0.6.0-windows-x86_64.zip: the same for Windows on x86_64, with SDL's DLLs besideOpenECS.exe.openecs-0.6.0-source.tar.gz: the source with every library it uses. GitHub's own "Source code" archives leave the libraries out, so use this one to build.SHA256SUMS: checksums of the archives.
OpenECS is under the zlib license.