Thursday, July 22, 2010

Progress log, something different.

Throughout the rest of this relatively short day, I'm going to save up all of my progress updates, and add it to this blog, rather than constantly post on Facebook, lets see if this work, if it does, I'll do the same in the future :-)


15:47 - After hours of scribbling on my whiteboard and sipping tea, I've come up with a revised class design for generic "game", I needed to tweak and change a few things as my old design was suited to SDL (I had to write a lot of functions to cater for SDL's shortcomings), that means I have less coding to do, but at the same time, cannot use the SFML Classes out of the box because many things aren't included, currently been working out how to structure sprites, players and objects in a game, figuring out what SFML did and didn't do was probably the biggest challenge

16:32 - Started writing out the code for my take on a sprite class (an extension of the one SFML provides), the new one handles collision, and collision regions, most of the methods relating to collision are implemented , code compiles, but haven't tested the methods work yet, about to do that.

16:51 The collision works!
Note in the pictures, when the 2 rectangles collide, the are visible, when they aren't colliding, they disappear



17:22 A Slight hitch there, the region collision didn't work to start off, but I figured it out, I found out I was making the width and height of the regions the same size as the original shape, thus negating the effect of setting a region in the first place! it's fixed now and everything working fine


This post is getting a bit long, so that's enough for now, I've probably waffled on for too long now :P

No comments:

Post a Comment