Platform Masters Title
Platform Masters - Will you be the world's next platform master?






Keveran Forest - nearly finished


Date: July 26, 2014
Screenshot #551: This wasn't quite how I was envisioning Keveran Forest to actually be, it's even better and I'm still not yet done with yet. Not done? Only the area where the Teigram River is, along with extras between the layers of the Keveran Mountains remain. Due to high memory usage (I know I could take off another 2 1/2 MB from this with an optimization I know of - this was intended for a quick preview) and very poor visibility, I'm leaning against the inclusion of the ground decals for the coast. Still, if I can squeeze out more memory, then I could include them in. Compared to how this setting was a year ago where it was very unrealistic, this is absolutely amazing!




Barugan Islands - Marusi Island preview


Date: July 27, 2014
Screenshot #552: I knew I needed to redesign the drawing system for the ground decals to get extra flexibility, but, having spent over a week amongst tree generation and trying to figure out how to do the lighting, the end result was more than worth it. I wanted a quick preview. This is one of the most breathtaking sights in PM. Once you gain access to the Barugan Islands, get about 10,000 feet in the air and just glide peacefully along at high speed and watch the beautiful Marusi Island go by. It's a scenic treat well worth the modest effort needed to reach this height.

Until about a month after Platform Masters is released, this scenic sight will remain classified.




Keveran Forest - shaping the Teigram River


Date: July 30, 2014
Screenshot #553: Keveran Forest is a tricky world to design. Not only do I need to shape the river, I need to design it in a way so that the memory usage isn't very high while still retaining the great detail. For the Teigram River, this means needing a bias in the river's variation, favoring the closer part more. Why? In the area at 8 SU, the trees are 80 pixels tall and would be 4096 pixels wide. At 16 SU, on the farthest side of the river, the trees are 40 pixels tall and 2048 pixels wide making them need only 1/4 the memory. Trees can't be in the river unless flooding was going on, something that isn't happening here (unlike Ronnisa Plains). So, by having the river have a bias on the distance, preferring the closer part, I can leave out more of the very big trees and exchange them for the smaller ones which saves on memory. Throw in my new optimizations for ground decals (which can also affect the clouds) and even more memory can be saved.

To be sure that this works out in the end, and the river follows my planned design, I needed to set up some boundaries. The first one involves that bluish gray background. This is to let me know the bounds of the river. There's a dark blue center where nothing but water is supposed to be so I can completely cut that out of the ground decals. There's a lighter shade right next to it where I'm not to draw the shape of the river into because it's intended to be for the white gradient at the edge, as from a rushing river (though in this case, it's not a strong current or the like so it's not as extreme as the Keveran River in Keveran Desert). Farther from the center, it's that blue-gray color to let me know that I can include part of the shape there. Going still farther from center is a very pale blue-gray shade for the area marking the outermost edge of the river for where the white gradient will be but the shape is allowed there. The farthest parts out is where I'm not allowed to include the shape as that's where the shore darkening effect is, the sand to grass gradient, then pure grass beyond. So I know where the trees are going to be placed, plus extra padding around so the trees don't end up in the river, I marked in a green line that provides a reasonable distance from the river's shore so I can plan the size spans of the trees along with where they can go. The pink lines are nothing new: the scaling grid (spaced 1/2 SU in this case) used to let me know the exact Z position that that part is at.

Making a river ground decale is done in 9 steps. The first step is the usual setup stuff with all ground decals - planning the zoning in Excel so I know where the river is going to be along with optimizing its memory usage and the like. Setting up the basic image follows where I form the scaling grid and mark the bounds on where I want the river to vary from, as explained in the previous paragraph. The third step is forming the shape for one of the sides of the river, usually the closest side. This must be tileable on the X (left to right) axis. The fourth step is duplicating that shape, after checking that it verifies with the plans set, moving it to the other side of the river and making it highly transparent. This is so I have a quick reference as to how the shape of the river is so I don't get the width varying very randomly. Following this, step 5, is forming the shape for the area around the river, roughly following that guide line as this screenshot clearly shows. Like the initial outline, it must tile on the X axis. The sixth step is applying the gradients. There are 3 gradients involved. The first is the white gradient at the shore for a hint to rapids. The second is the shore darkening gradient where the sand texture gets darkened like the real world has it (though I have no idea why that happens). The third is the sand-to-grass gradient. The seventh step is to apply any extra details that I'd like such as picnic tables, shadows (only if practical to do), roads, and whatever else. The eighth step is the finalizing - adding the fog, setting up the zoning layer so I know what to crop out, and saving the output layers. Step 9, the final step, is importing this in the game engine and testing it.




Keveran Forest - automating trees along Teigram River


Date: August 1, 2014
Screenshot #554: It took several tries and fixing bugs (which also meant redoing the layer generation) but I got the generation of nontiling forest layers working. Another new design change is still needed to allow for one additional feature yet, the case where the center part is to tile seamlessly but also including edges on the left and right for where the forest is to terminate. Worlds 11 and 20, for sure, need this but chances are, a few other worlds do. Keveran Forest is not one of them.

To generate the nontiling layers, I only need to know the width, the span to be covered. This is obtained from the ground decals using my "scaling grid" layer to determine the Z position then a rectangular selection to measure the amount needed. From there, I simply multiply that pixel width by the map's CU per pixel resolution to get the final result. In this screenshot, I've written these values down in Excel, copying the parameters into my generation program (via scanf, something only used here instead of in PM).




Keveran Forest - optimizing nearest trees


Date: August 2, 2014
Screenshot #555: With Keveran Forest pushing very close to the 96 MB limit, I need to squeeze out whatever memory I possibly can. Take this selected area for example. The full magenta color that I use represents all areas that would have an alpha of 0. In this select area, there's nothing there so why bother drawing it or wasting memory when I can just split the image into multiple chunks. For example, if I cut this out, I'd, then, have 2 chunks - the lower area here and the remainder that I can offset as needed. By doing this, I managed to save a massive 2,979,968 bytes (2.84 MB) of memory but it will cost a few extra draws and time for image position calculations.

You might be noticing the huge number of layers as well. This is because there really are a lot of layers of trees. However, there are some older layers and the area around the Teigram River has separate images that have all been imported. I still need to import all of the fog layers as well so that layer count will get roughly doubled. Not all trees have the fog involved and not all trees are even used in this (all but 3 are though - the odd ones are because they're part of the Keveran Mountains).




Keveran Forest - positioning trees carefully


Date: August 3, 2014
Screenshot #556: After a lot of rework to fix bugs and pushing optimizations in whatever ways I can, I still had to import the trees into the game engine. Not only that, but I had to make sure that the positions were reasonable. After all, you don't see live trees in the middle of a river, unless it was a river that was flooding. This river isn't really flooding (like Ronnisa Plains has), it's, instead, quite normal. Being a dense forest, the trees need to be very close to the river. This setup shows just that. Sure 5 pixels doesn't seem like much for these, that easily amounts to more than the height of an average adult human. Thus, I needed to fine-tune the positions of each layer of trees. The part on the left may seem a bit close to the river, but that's only due to the imprecisions. The part on the right, however, needs considerable adjusting as that leftmost tree could be moved closer to the river.




Keveran Forest - the lowest point


Date: August 3, 2014
Screenshot #557: Take a moment and go way back to screenshot 53. For several years, Keveran Forest was like that, hardly seeing any change. Now look at screenshot 498 when Keveran Forest finally saw new progress. Unfortunately, it was treeless so it wasn't really a forest, but the basic design was set. And now you have screenshot 557. From looking like a cartoon, Keveran Forest has turned into a surprisingly realistic and stunningly amazing environment that almost makes me think I should rename it to "Keveran Jungle" as it kind of qualifies as a jungle.

This is a view from the lowest point, right where the bottomless pit is. Every now and then, you can clearly see the road through the trees. This is one example but it's not the best available. It's also very hazy and misty because of the dense fog. Moisture from the tropical Barugan region is getting funneled in by the Keveran Mountains, squeezing it to condense it.

As planned way back before screenshot 53, the Teigram River (formerly Tegram without the i) was to serve as a warning to the proximity to the bottomless pit. If you can't see the river, you're very close to the pit. In this case, you can still clearly see the gap where the Teigram River would be but the river itself, short of a lucky gap between the trees, is invisible.




Keveran Forest - top of the mist


Date: August 3, 2014
Screenshot #558: From about the height of the top of the mist, the Teigram River is quite visible. The trees on the other side of the road are best visible from this height. You can clearly see the variation in the depth of these trees. Near the center part, the trees are much farther out than the left and right edges. The far part of the forest is much more easily visible as well but it still fades away.




Keveran Forest - the Teigram River


Date: August 3, 2014
Screenshot #559: The typical regular level might peak out at a little above this height. This is where the Teigram River is easily and best visible. Mixed in through the gaps in the trees, you can see the river's sandy beaches and the shore darkening. Those odd lines are from the fog and the imperfections that come with volumetric fog (Who's ever heard of a 2D game using volumetric fog? Platform Masters has all sorts of amazing wonders and effects, doesn't it?). This is my new top favorite screenshot. Like with screenshots 557 and 558 above, you can clearly see the variation in the depth.




Keveran Forest - the far forest


Date: August 3, 2014
Screenshot #560: Those trees just keep going on and on and on, don't they? In fact, there are literally 40,598 total unique trees in this, close to about 70,000 visible at the most. Does this hurt the frame rate? Surprisingly, it has little effect. With even my GeForce 460 on an i7-2600K processor overclocked to 4 GHz, I can see the frame rate pushing past 500 fps at times from a lower vantage point than this. Really: 500 fps for 65,000+ visible trees. How is that possible? Everything is prerendered so the game engine only has to draw a single (often tiny) 2D bitmap image with alphablending. In a way, it's hard to believe that an amazing sight like this is entirely possible with a mere 91.86 MB of RAM. The only downside is the high number of draws and total pixels drawn used.

This is a few from what a short jumbo level would have to offer. The supersize level will get to at least twice this height, really showing the vastness of the forest, the most extreme in all of Platform Masters.

I would've liked to have added a coast beyond the Keveran Mountains, but memory is very short so I'll have to postpone it as there are still a few game objects I need to add in and a (likely) reworking of the sky for the Earth curvature effect that I have a solution worked out for.






Footnotes:
None.