Dominik Madarasz shared 4 months ago
Dominik Madarasz shared 6 months ago
Dominik Madarasz shared 8 months ago
Dominik Madarasz shared 8 months ago
Dominik Madarasz shared 8 months ago
Dominik Madarasz shared 8 months ago
Dominik Madarasz shared 9 months ago

I just wrote an article about implementing a basic AI in .

It features basic hunger needs, , and other goodies!

https://blog.zakto.pw/articles/ce1856a/eco2d-creature-life-simulation

GIF
Dominik Madarasz shared 1 year, 2 months ago

Item routing now uses persisting rolling counter.

With 20k NPCs running around, the game runs at an average 12ms tick rate.

makes use of distance and action based streaming.

GIF

All the registered tooltips are now searchable for quick access!

GIF

WIP notification manager in

With the tooltips done, I think it's time to implement a basic notification feature too!

Small tooltip demo!

GIF

Tooltips can also be moved around!

As long as at least one tooltip node has a cursor nearby, the entire chain stays open!

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.

Having played Crusader Kings 3 and Victoria 3 for quite a time, I appreciate these games' multi-level tooltip system. I feel tooltips would be a great addition to eco2d to explain various mechanics or provide valuable information directly when the context requires it.

Performing sanity check on the existing item production and logistics system.

The crafting tooltip is now done; over time, once I introduce GUI skinning, the layout will improve, but so far, this is a decent addition to the prototype.