Building UI

Last week I did work on the building UI. It was a complete nightmare!

I wanted the UI to show you a preview of the building that you are going to build. Therefore if the user creates there own building the UI will automatically create a preview for that building for you to see. It was a pain.

Now for the technical bit for you who are interested.

Step:

  1. The end result is the building is render to a back-buffer.
  2. Then take this image and find the nearest pixels to each edge of the texture.
  3. Remove the rest of the image just leaving the rendered building
  4. Scale that texture to the correct size.

The result is something I am happy with. Its not to bad on performance either.

Building UI

Leave a Reply

Your email address will not be published. Required fields are marked *