Today was working on buildings, my goal was to be able to place and remove buildings. Just displaying them and the underlying code needed to track them and state changes. Nothing actually affecting game state, yet, but they need to draw and be tracked before I can do that. Another issue I had, that I haven’t tracked down yet, is the buildings don’t seem to be respecting the Alpha settings of my PNGs, they draw black where they should be transparent. I know that this does work properly, because my selection cursors use the alpha channel of the PNG to set transparency.
Right now I can draw buildings on the map that are already generated along with the terrain, but the mouse code should make it easy to add/remove them. The A, B and two half tiles are placeholders for buildings right now in the picture below.
I’ve also been trying to figure out why my sprites seem to have extra pixels added to them, and I came across a Stack Overflow post suggesting that it was a pyglet (the OpenGL library underlying cocos2d) issue with image scaling. Disabling the autoscaling made my images look better, but the still don’t quite align properly. I still think the alignment issue is a rounding issue rather than a cocos2d issue directly.
I didn’t spend much time working on my game as I was participating in Extra Life today, playing games, rather than working on one.