Libove Blog

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

#gamedev progress on hotel game:

  • did some further refactoring to rendering function
  • added room highlighting when building new rooms and selecting bed rooms for new guests

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
}

Screen Recording of my hotel game. It shows the highlighting of available bed rooms and placing new rooms





Interactions

Liked by แปzkriff

Liked by embix

Reposted by MadMike77

Reposted by Rust GameDev ๐Ÿฆ€๐ŸŽฎ

Liked by ak