Archive for March, 2009

Skyscrapers

Monday, March 30th, 2009

Tonight I added those raisable buildings I was talking about. This involved a lot more work than you’d think! Mostly this was because it’s quite a radical change from the way things are done currently. Each building is made up of several meshes now – a ground floor, a roof, and several middle floors, whereas before there was the assumption that there was a 1:1:1 mapping between building, physics object and mesh.

You may also notice that I’ve thrown some random rotations of buildings into the mix. This pretty much came for free when I was adding in all the other stuff, so I’m happy since it makes things look a whole load more interesting! Similarly, it’ll now be easy for me to add things like stilts/foundations to make sure buildings don’t hover like they can now, or to add scaffolding temporarily just after construction, or to change the appearance of buildings entirely (make them more futuristic as the game progresses or the buildings are developed enough). All graphical niceties that I’ll get to in time!

Unfortunately I’ve broken the physics on those buildings since they can no longer just take their position and orientation from their physics component (otherwise the whole building would be at ground floor level), but I haven’t bothered to fix this since that’s next on my list of things to revamp. I’ll make buildings spawn ‘building chunk’ objects when they collapse, which will improve things in many ways – the Building class will then have one responsibility rather than two (it currently has states for ‘free’ and ‘attached’, the ‘controlled’ state being lost when I factored that out into the ‘Piece’ class), there will be the possibility for multiple building chunks with different graphics to that of the building they came from (proper bits of rubble!), and the Building object will need physics only for collision detection and not to physically attach it to the island.

Still bringing home the bacon

Friday, March 20th, 2009

Well, if you didn’t know already you’ll know after reading this or this – Rare announced last month that it would be doing some ‘restructuring’, which is a friendly term for sacking a bunch of people. The whole process has been farcical at best, and has demoralised everyone thoroughly, but the powers that be have now let some people go. Thankfully I’m not one of them (which is fortunate since my redundancy payout would be pennies, and the Midlands isn’t exactly bursting with game development studios that would welcome me with open arms), but it’s been difficult seeing some of the people I work with depart, especially those that weren’t planning on walking out anyway. I hope they land on their feet, and something better finds them.

So there you go, a brief ‘behind the scenes’ glimpse at the sham of a mockery of a sham that is the games industry.

Surprise!

Sunday, March 8th, 2009

Hah, I bet you didn’t think I’d wait this long before posting those interesting things, did you? Did you?

What I’ve done is had a good ol’ rethink of the way the gameplay is going to work. Up until now, the idea has been that individual buildings fall from the sky and get attached to the island when they hit it. If you build on top of an old building, you destroy both the old and the new. Your score was going to be decided on a measure of each building’s quality (depending on where on the island it was placed, and which other buildings were around and so on), multiplied by the number of people, to get a rough measure of the total ‘happiness’ of your population.

The problem with this is that you’d quickly run out of space and end up being forced to destroy all your old buildings. There would come a time when your island is full, and your task would change from building a nice city to coaxing the physics system into not wrecking everything each time you place a building. Development would be linear, and capped, and I don’t think that would be very fun.

I went through a few more ideas after this, and after some discussions with the guys at work (that means you Rich!) and an old university chum (that means you Mike!), I’ve come up with something that plays well in my head, which I intend to try out. It’s just a few changes to the old idea, but I think they add up to something quite fun.

Instead of dropping actual buildings, you now drop pieces which can create buildings, or perform some other function. The main pieces will be ‘raise’ pieces, which will raise whichever buildings they hit (or create them if not present. These buildings will be your ordinary houses, and the idea will be to just have as many of these as high as you can make them. Of course the higher they are the less stable they are. The other main types of pieces will be the special pieces, which build buildings like docks, windmills, farms, mines and so on. These will generally have some criteria for where they can be built – docks at the edge, windmills up high, farms on flat ground – and will sometimes have gameplay effects other than their physical presence – mines will mine out a cavity inside the island gradually which will act as a negative weight, docks will attract merchants which will serve as other physics objects to get in the way.

Scoring remains cumulative over time, but instead of the previous sum of building scores times population, it will be a general ‘development’ score (which I see being a sum of ordinary buildings and their heights), affected by several multipliers relating to the special pieces. These multipliers will be things like ‘have 3 docks’, ‘have 3 windmills’, ‘have a really tall ordinary building’, and will be shown as greyed out icons next to the score when inactive, and lit up when active, probably with some crazy effects when several of them are acting together.

I’ve made a start, in that I’ve re-jiggled things to no longer drop buildings but to drop pieces, and I’ve added multi-part pieces (just an ‘L’ shaped raise piece at the moment), and added the base functionality for the raising mechanic (Note that you can also see the temporary Flash-based replacement for the in-game GUI in this screenshot!). In doing all this I’ve learnt some 3D modelling with Blender, which was different. Just today I figured out how to do UV editing and texturing, and exporting that information from Blender into a format that OGRE can use. All that must have appealed to my previously undiscovered inner artiste, since I then spent a few days learning to use my graphics tablet to do a spot of ‘digital painting’, but that’s a story for another day!