Libove Blog

Personal Blog about anything - mostly programming, cooking and random thoughts


#

#gamedev progress:

  • Trader implementation: appear regularly at the tavern selling materials for crafting.
  • Adventurers implementation: Have a quest and can be booked into rooms. When the embark on a quest after their stay.
  • Reworked items: previously I had an enum to distinguish between different items. This would become infeasible once I start adding more items. Rework to have a generic item struct.
  • Reworked recipes: similar to items, each recipe is now a struct. The recipe defines the ingredient requirements and a function to generate the resulting item.

#

Implementing scheduled publishing with #ActivityPub requires some effort. Until now my blog only had draft/published as states of entries. The AP service would just send out the requires requests immediately. With the possibility of setting the publishing date into the future this is no longer possible. I have to somehow trigger these after the publishing date.

Pull systems are so much easier than push systems.


#

#TIL #systemd user service don't run when the user is logged out (by default)

User has to be enabled for "lingering" to keep services running.

loginctl enable-linger username

It worked for a long time for me without this because I had a tmux session open :D


#

#gamedev progress:

  • sorting sprites by layers for drawing
  • first item crafting


#

#gamedev progress:

  • added first items. Items are always placed in slots.
  • items can be dragged between slots.

recording of a yet unnamed game


#

#gamedev progress:

  • built a UI system using "immediate mode" style.

Code for one button:

if (d.add_inter(.{ .BUTTON = .{} }, .{ .owner = i, .item = 0, .index = 0 })) {
    std.debug.print("BUTTON KITCHEN\n", .{});
}
d.down();
{
    d.add(.{ .V_LIST = .{} });
    d.down();
    {
        d.add(.{ .TEXT = .{ .text = "Kitchen", .box = rl.Vector2.init(200, 20) } });
        d.add(.{ .TEXT = .{ .text = "100 G", .box = rl.Vector2.init(200, 20) } });
    }
    d.up();
}
d.up();

gif showing UI dialogs popping up and highlighting buttons under the mouse

#zig