Friday, June 10, 2011

Screens of the day 08 - Gallery

I managed to break the compiler. It worked fine in debug mode, but when compiling in optimal mode, it kept refusing to compile one of my files. It would just hang, eating 100% of the processor and using huge amounts of RAM. Sure, there was a huge function with a lot of template using code inside that was used to set up the word list, but still. So long story short, I saved the resulting data structures on disk and now I have about 2000 less lines of code. This way I will never have 20K! It is going to be pretty painful to produce a new word  list, but I hope this one will last me for quite a while.

I have gotten a second submission with engraving tiles. Thank you! So let me show you how this looks with the tiles randomly placed on floors:

Now this is the raw result of the submissions that I have gotten. The only thing I did is drop the two submissions into the content folder and load up the game. I know this is not what a lot of you were expecting when thinking about engravings. I will fine tune a little the images before the end of this post. As I said, I intentionally left all details as vague as possible to see what interesting results I could get. And interesting it is! See if you can spot my awesome turtle in this or a few more samples:

Just for fun, I went on to add engravings to grassy areas too:

I feel like this gives it a little bit more context. But let's see what we can do if we adjust the values a little based on the sizes and properties of the submissions:

A lot more detail is visible like this. Through trial and error I got even better results:

The final image was pretty clear and had recognizable patterns. Now it is time to see what can be done with the system with properly aligned patterns, or maybe even with a common theme. Here is an outline of the floor tile:

The content of the red outline is the visible surface of the floor. A pattern will be fully visible if it is that area, including the border. The yellow outline defines the sides of the floor. It makes no sense to have a pattern here. Of course, in the final version of the tile the outlines should not be visible. So in order to apply the awesome turtle pattern to the this outline, I would first center it in the red area:

Then I would remove the outline, getting the final version:

Also, keep in mind that while the background color is not important, it will be normalized, so I should declare one single taboo color. Working with isometric tiles is a little more difficult. I'll investigate if using some form of automatic conversion of top down tiles to isometric gives any interesting results.

I'll try to come up with some simple patterns during weekend and continue my investigation of RAM consumption. I have some good ideas that should bring down the 1000x1000x60 map memory consumption to 344 MiB. If it turns out to be as "simple" to implement as it seems it might be a worthwhile investment of my time. With this new system the traditional map of 300x300x40 should only take up 20 MiB.

No comments:

Post a Comment