Thursday, May 1, 2008

Graphics Overhaul

I've made some drastic changes to the way placing houses and fences work which has improved the quality of the graphics and made placing them easier. They are now tiles instead of sprites. To compensate for the loss of their sprite sort ability I've implemented a new calculation and property to the map layers to determine how far above the player the tile actually is. This new system allows for tile layers to be drawn above the player as well as below and will allow for future multiple story houses.

How it works is it will compare the 'Elevation' of the player to the 'Elevation' of the layer and display accordingly. The initial base elevation of the player and all tiles will be 0 and the second story of the house or the roof will be 1 and so on. But to give a 3D effect I've allowed for tiles to be placed halfway between elevations. i.e. the bottom half of a wall on the ground floor will be 0 and the upper half will be 0.5.

Another feature of this system will be removing the floors above the player when the player enters houses. for example: if the player is on the ground floor then the 'Player Elevation' will be 0 so all layers of an elevation of 1 or more will be prevented from being displayed if the tile placed above the player is not empty.

Obvisouly once a player goes up a set of stairs or climbs a ladder the 'Player Elevation' would increase from 0 to 1 which will allow the next floor of the house to be displayed.

a minor downside of this system is that all roofs and second floors of every house will be prevented from being displayed instead of just the house your in. I'm currently working on a method to determine which house the player is in and only preventing that one.

Check out the new screenshot, you should be able to see the difference when compared to earlier screenshots. You will also notice that the tile size is now also smaller, I've halved it to make the walls a better scale then they used to be. It also gives the illusion of the game being a higher resolution.

Also notice the new door style, I removed the old doors because I could see myself having trouble animating them once the ability to open and shut doors was ingame.

No comments: