Libove Blog

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

Tag: rust

#

Added walls to the room and removed the pillars in the room itself. These can still be placed in the data structure but my random generator isn't using them at the moment. The geometry is now mostly done for my purposes. The next step will be tooling to create and edit rooms manually.

#gamedev #rust #geometry


#

Cleaned up everything a bit and added a floor. All still in debug colors. Next will be to create proper UV coordinates to enable texturing.

#rust #wgpu

Debug rendering of a room with arched ceiling.



#

Combined the Delaunay triangulation with the Bezier curves to create the "walls" of a room. Next step will be figuring out how to create surfaces between curves.

#geometry #rust

Screenshot of a 3D mesh with bezier curves sticking out


#

Result of some recreational graphics programming:

  • Can load OBJs
  • Flat rendering and controllable camera
  • using #winit and #wgpu in #rust

a low poly iso sphere with random colors



#

I've just one-shotted an iterator with a lifetime in #rust. Is this what it feels like when the language finally clicks?



#

#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


#

Insights from the weekend:

  • Claude Sonnet 3.7 is the first #GenAI I tried out that actually produced usable code. The code is not pretty but it was the first time I was impressed by an AI system being able to produce non-trivial code and being able to adjust it to feedback.
  • I should stop using #python for one off scripts to convert data. The #rust ecosystem has a similar maturity. Building such scripts takes roughly the same time in both languages, but the rust system will finish the job order of magnitudes faster.
  • When your rust program feels slow you probably forget --release.