I just wrote an article about implementing a basic AI in #eco2d.
It features basic hunger needs, #flecs, and other goodies!
https://blog.zakto.pw/articles/ce1856a/eco2d-creature-life-simulation
The tooltip system is now done! Although it requires some UI improvements, the functionality itself is complete.
Tooltip links are generated at startup by scanning the help text for any terms registered as tooltips already.
Example code:
void tooltip_register_defaults(void) {
// test
tooltip_register( (tooltip) { .name = "ASSET_WOOD", .content = "Used as a building material or fuel for the ASSET_FURNACE." } );
tooltip_register( (tooltip) { .name = "ASSET_FURNACE", .content = "Producer used to smelt ASSET_IRON_ORE into ASSET_IRON_INGOT." } );
tooltip_register( (tooltip) { .name = "ASSET_IRON_ORE", .content = "Natural resource that can be smelted in ASSET_FURNACE." } );
tooltip_register( (tooltip) { .name = "ASSET_IRON_INGOT", .content = "Used as a building material. It is smelted from ASSET_IRON_ORE" } );
}
As a user, you call:
tooltip_show("ASSET_FURNACE", mouse_pos.x+5, mouse_pos.y+5);
And the internals will draw a tooltip with references to other registered help texts in content.
Thanks to the fantastic wrapper raylib-nuklear made by @[email protected], the Nuklear UI integration is seamless. I can't wait to test it out on some new tools!
eco2d is a small 2D sandbox game you can play in your browser. The desktop version also supports networked sessions using the enet fork we maintain. The game is not aware of any networking as it's completely isolated. There's a fundamental movement, crafting (WIP), and some vehicles you can drive around. All of this is powered by flecs and rendered via raylib, cwpack for data serialization, and zpl as an all-around c99 standard library.
Over time I will provide some development updates.
You can play it at: https://zaklaus.itch.io/eco2d
zpl.texed is a cross-platform stack-based image generation tool suitable for prototyping textures with pixel art aesthetics. It offers a suite of tools to generate/blend/modify stacked layers and also provides an ability to export bespoke textures into PNG files or packed C header files (a header containing an array of bytes and various metadata).