Wednesday, 21 December 2011

Rural Scene

Been working mainly on the French countryside. I've created a distant rural landscape background that scrolls and creates a nice sensation of depth.


The other focus was creating telegraph poles and wires to string along the roads. Initially the wires were black, but they created harsh aliasing issues due to the black pixels being so large on screen.

I needed to fade the wires thus giving the impression they are thinner than they actually are, and creating a form of anti-aliasing (as the background can be seen through the wires). I could have created a separate sprite for the wires and rendered those sprites to screen using an alpha value, but I wanted to create the poles and wires together as a single sprite to make placement along the route easier.

I used the function:
sprite_set_alpha_from_sprite(telegraph_spr,telegraph_mask)

Here, telegraph_spr is the main source sprite for the telegraph pole and wires and telegraph_mask is the alpha mask.

telegraph_spr

telegraph_mask


The other trick was to create a single sprite that could be placed along the route, to represent a long sequence of poles and wires. You may notice that in the sprite, the two poles are identical. This is so that when the sprites are placed down, the start and end poles can be overlapped thus creating an unbroken line of poles and wires.