As I said in my last post, the next thing I wanted to get done was to fix up the physics on the raisable buildings by rejiggling the code for the Building class. I’ve now added ‘Debris’ which is spawned by each ‘Building’ when it decides it’s time to fall off the island. Currently all the buildings just spawn a piece of debris that looks exactly like the building itself, though in the raisable building’s case this means one piece per floor.
Since the physics can be a tad unstable at times, this can result in interesting-looking explosions such as that pictured in this screenshot!
You may also notice there are some bright orange buildings there. If you don’t notice them you’re not looking very hard. They’re just replacements I made for the ‘tudor house’ mesh that I borrowed from Ogre right at the start of this project – it was unnecessarily highly detailed, a bit ugly, and not mine. These new buildings have only one of those problems.
I also replaced the graphics of the people – they’re now little chaps made out of several cuboids (what an evolutionary leap!). They’re even textured! You can’t see it from the screenshot, but they each have a smiley happy face. They’re blissfully unaware that if ‘trippedOver’ ever returns true, they’ll be launched upwards with ‘10′ force, which although unitless is definitely quite deadly, and comical.
Next I’m going to do a bit more rejiggling (‘refactoring’ is a term many programmers use inappropriately, so it’s sort of lost its meaning. ‘Rejiggling’ is a good replacement I think), since there are a few bits of code that are being duplicated every time I add a new type of object. After that I’ll be adding some ’special’ buildings and updating the game logic a bit, which will be fun
That will probably have to wait until after Easter though, since I’m off to France with my girlfriend for a bit first!
Wow. You’ve divided the building-model-problems count by three, multiplied the cuboid-per-people count by something like… err, “several”, and you’ve multiplied the texture-per-people count by a whopping “division by zero” (says my calculator)! _That_ is clear improvement.
However, there is a point which isn’t as clear as improvement. Faces. We, the non-cuboid people (well, me at least), want to see these blissfully unaware faces! They’re probably the happier faces we’ve ever seen on a CITSizen.
PS: Additionally, a video of the violent upward force would be neat. You know, scientific curiosity and stuff.