Archive for August, 2013

World scale and scenery details

Saturday, August 17th, 2013

I increased the scale of the world by changing the dimensions of the tiles. The width and depth of the tiles are now each 20% larger. The scenery scale is related to the tile dimensions, so now trees and other obstacles are larger as well. The structures are bigger too and will be increased further before the artwork is created for the fortresses and towers. The troops are roughly the same size, which looks more natural when compared to the other larger entities. In addition, the increased world scale provides more room for the scenery details, which I just finished implementing.

I started by adding some code to provide a foundation for randomizing the world. I decided to save values for a primary and secondary seed value used during randomization. Each tile then generates a random number based on the seed values to produce a primary magic number and a secondary magic number. Those numbers are saved for each tile in memory. The scenery details use the tile magic numbers to produce random variations. For example, the magic numbers determine scenery detail type, offset position within the tile, and whether or not the detail is flipped horizontally in order to create another variation.

I have set the coverage of the scenery details to roughly 20% of the world tiles. However, any larger scenery obstacles will take priority over a smaller scenery detail, so the actual amount should be lower. I could also decide to weight the scenery detail types with different percentages, which could be influenced by the base terrain type. This approach would be useful if certain types are more appropriate for certain terrain. Right now I am planning to have around 100 scenery details, depending on various factors. I currently have the scenery details set at 25×25 pixels, which seems to be a good size.

I’m happy with the result, even with using placeholder scenery details that I pulled from existing assets. I’m starting to work on the dynamic scenery design now. It will use the same randomization scheme to create variations. If I need some additional randomization I can use the secondary magic number for some of the components. I hope to have a basic implementation for the dynamic scenery finished in about a week.

Then I will focus on the asset layout, so I can begin the artwork process as soon as possible. I really want to start showing the game with art assets that are intended for the new design. It’s been a year since I made a video, so that is a priority too. The rest of the year will be quite busy, so keep checking my progress :)