I created this as a protype for potential expansion. One of my favorite genres of video games is city builders and I had to try creating something akin to one.
While it’s not very in depth, it does feature a modest game loop involving a higher level state machine that stores the building locations, rotations, and types, as well as the players currency.
It also features a limited variety of “blocks” that influence the player’s currency count.
You can check out the source code here at the public repo: Simple City Builder Repo
Update 04/12/23:
I’ve added some visual updates to my R3F city builder. The previous version was built using default primitive shapes provided by Three.js.
To add some diversity to the city I modeled, textured, and developed procedural buildings. The highrises you see in the current featured photo are assembled out of several different pieces and assigned a random texture. The layouts are randomly generated each time you select a highrise to place in your city.
I’ve also updated the road textures and the park. The park also includes a simple tree model with random positioning.