#
#gamedev progress:
- sorting sprites by layers for drawing
- first item crafting
Personal Blog about anything - mostly programming, cooking and random thoughts
#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:
#gamedev progress:
Great talk about architectures for #gamedev. He also wrote a book about game programming patterns
#gamedev progress: