#
#gamedev progress:
- materials are loaded from a configuration file
- Adventurers return from quests and spawn a treasure chest
- reworked text element to automatically adjust height of element
Personal Blog about anything - mostly programming, cooking and random thoughts
#gamedev progress:
refactored hero logic into state pattern. So much better!
#gamedev progress:
enum
to distinguish between different items. This would become infeasible once I start adding more items. Rework to have a generic item struct.#gamedev progress:
#gamedev progress:
#gamedev progress:
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();
#gamedev progress on hotel game:
Not sure if I should be proud or embarrassed about this #rust code :D
// mark building tile
if let Some(mut r) = match game.mouse_action {
MouseAction::BuildGrill => Some(Room::new_grill()),
MouseAction::BuildStairs => Some(Room::new_stairs()),
MouseAction::BuildBedroom => Some(Room::new_bed_room()),
MouseAction::BuildCorridor => Some(Room::new_corridor()),
MouseAction::BuildRestaurant => Some(Room::new_restaurant()),
MouseAction::BuildWineCellar => Some(Room::new_wine_cellar()),
_ => None,
} {
// rendering code
}
#gamedev progress:
#gamedev progress on hotel game:
#gamedev progress: