Tuesday, April 03, 2007

Building basics are done

I got the basics of the buildings in! And by basics I mean the image files, the classes(Each building has it's own class, as oppossed to units which mostly consists of 1 class and a few derived for special units).

Buildings in action

The reasons are simple: Most buildings have a bunch of animations which are non-standard(starport, refinery, radar), buildings also add 'things' to the game. For instance, building a light factory, enables you to construct new units. By spawning the building, it 'registers' itself with the game, exposing the features to the rest.

All the buildings also play their 'pre-deployment' sequence. This is a different sprite(See below), which is displayed when the building is deployed. It then 'blinks' between the normal and the deploy image a few times with decreasing interval and finally shows up normally. Nothing fancy, nothing difficult to make. However, I must say, I'm getting a quite a lot of timers... Thank god timers don't have a 68MB memory footprint(A la the clock in Vista).

Buildings before being fully deployement

I'm not sure how I'm going to proceed from now on. Probably the next thing to do is to get the powerplant operational, showing it's animation. EDIT: In before someone comments about it: Yes, the 3x3 and 3x2 buildings are off half a tile. This is because they render using their position, not by tile. since I used 64 as X position, it renders from 64 - (32 * 1.5) = 16. Would I use X - 80, they'd render normally.

However, this probably does bring up the problem I had before: Images are alphablended into 1 fugly soup of weird colors. I really should spend some time testing out with the various D3DXSprite render modes to figure out how to only replace specific colors. If the power plant works, I'm going to make buildings selectable, including a selection marker.

After that, I will probably start working on the UI parts. I'm not really looking forward to that, but after that, it will start piecing together.

Stefan: On a sidenote to what you said about rotating the turret and moving: Good point. I'll fix that aswell.

In other random news: I got a new archwire for my braces. I went for 012 to an 016. I know it means the thickness of the wire, but not really sure how. I'd assume it's 0.12cm, but not sure. Anyway, my teeth are sore now. But I know what I'm doing it for: sexy teef!

And, changed the layout of the blog a bit. I upgraded to the new layouts, which allow me to expand the layout myself. I'm probably going to add a ToDo list to the left navigation bar. Should be hot.

No comments: