White Shining Rock Logo
White Shining Rock Logo

Prototype code...

June 3, 2013 | Dukus | 21 Comments

Today I've decided that code written for prototypes should ALWAYS be thrown away. No questions asked.
This morning I was changing a few vertex and pixel programs to support some of the new environmental effects I've been working on. This led me to remove some data from the terrain that used to be used for coloration. The color data is now stored in a compressed texture instead.
While cleaning up the C++ side of things, I noticed the terrain rendering data was laid out in almost the worst way possible - both for performance and memory. I can't think of too many worse ways to do it.
I wrote that code while I was prototyping Banished - way back sometime in 2011. I probably wrote it in less than a day, and it worked for the prototype so I never looked at it again. Why would I? It never caused any problems and never required any additional features.
The terrain was using something awful, like 28 megabytes of memory. After fixing things up properly, it now uses 4.25 megabytes for rendering the exact same thing. As a happy side note, I got an immediate 10 FPS frame rate increase when i reduced the memory usage.
Graphics AnomalyHowever, the first time I ran the game after reducing the memory I got a good graphics explosion. I mentioned this occuring previously - Graphics Explosion.
This was a particularly fine example of sorta awesome terrible graphics errors. At leat it was easily fixable.
As a side note, I'm somewhat amazed at my memory usage level. Two weeks ago, I saw the DX9 renderer using 310Meg on a fresh map. Today my DX11 renderer using 74Meg. Woo.
Maybe I should skim the rest of the code for remnants of the prototype...

Leave a Reply

Your email address will not be published.

21 comments on “Prototype code...”

  1. Works pretty well with the winter scene.
    It would actually take a bit of work to intentionally come up with a more effective iced-up-camera-lens effect πŸ™‚

  2. This needs to be printed and distributed as a fine work of abstract art.

    On the gaming/coding subject, you should always skim through your code, over and over again. There are always rooms for improvement.

  3. @Andy - there is always room for improvement, but there is time for that πŸ˜‰

  4. also, I'm really gonna need to get me a dx11 video card. I foolishly bought a dx10 card just before dx11 came out. it's still fine performance wise but dx11 would be swish

  5. Awesome pic. Its like a huge freak heatwave going through a winter town causing some sort of wierd mirage effect

  6. I have to say that I have learned so much simply by reading your updates...seriously, it's like i'm taking an on-line course in this! Now if this stupid computer monitor would just take the $$$ I keep throwing at it, all would be well!


  7. I'm guessing whatever shader you used to make water ripples some how got spread over the rest of the scene? XD
    Looks great!

  8. I love this game and have been following it for a while. I think this project is awesome and not many games have mastered this style of game but this one seems to be really close. I have been telling all my friends about this game and have spread it through my school. It would be nice if this game was natively on mac so i dont have to wait for a port or wrapper. Thanks!!

  9. This effect is really nice to simulate the citizens having a nice party and drinking too much. You should keep it it.

  10. @WarBane

    If you want to play games, you should just buy a Windows pc. Also better bang for your buck

  11. I don't even know the way I stopped up right here, but I assumed this post was great. I don't recognize who you might be but definitely you are going
    to a well-known blogger when you aren't already. Cheers!

  12. However in order to attempt my plastic material shoes boycott, Let me need a program. Given that clinging this cloth shoes within the entry way is just not foul-proof and also forgetfulness-proof, Now i'm finishing that will I am going to need to have a shoes will have on palm always compact one louis vuitton shoes outlet that will easily fit into my own shoes and also cut on to my own critical diamond ring just like it via ChicoBag.

More Posts

Code Rot

April 17, 2022
1 2 3 47
Back to devlog
Back to devlog
Β© Copyright 2021 Shining Rock Software
Website Design & Branding by Carrboro Creative
menu-circlecross-circle linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram