Random City Generation

Github

To use program run the command python build.py && ./prog. Only assumption is that you have SDL2 setup.

Each time you run this program, a new random city will be created. The types of building (cylinder and block) will be randomly chosen, with buildings closer to the city center being on average taller than those further. The block buildings are made up of several rectangular boxes stacked together to create interesting shapes. The cylinders have a random amount of sides to give more diversity in the types of buildings present.

Through the custom shaders, there is also an element of fog to give the impression to the user that they are flying in the night sky. This means that elements further away will seem more gray and less clear but as you approach buildings, you will be able to see all the details.

Previous
Previous

The Apple Engine