Tuesday, November 3, 2009

Dimetric Land Rendering

So I got started on my game, I'm calling it BMAC (Build me a city). I've been playing around with the dimetric rendering (sort of like isometric, except instead of all 3 angles between the axes being the same, 2 are the same, and the third is different). I've got it to the point where with a grid of tiles, each with an elevation, it's drawing a fairly nice landscape. Without further ado I present to you my test picture.

As you can see, it's not quite perfect, some of those little moundy things should really merge with their neighbours, and at the top of the hill in the bottom two lines stick out a bit which is odd, but I plan on doing them soon.

That was quite a bit of effort, and quite a bit of drawing pictures to see how it should look. I plan on making it so it can draw from 4 directions looking down at it, but have only down one of these so far, the rest will come.

That's around 500 lines of code or so, which is less than I thought it'd be, but I suppose once I get all the special cases and directions and things that'll increase significantly. I'm quite chuffed though, I thought that would take much longer.

4 comments:

  1. That's looking neat-o! What language are you using?

    ReplyDelete
  2. I originally did it in Java, but have just translated it into Python, using Qt for the graphics. Still not sure which way I want to go though.

    ReplyDelete
  3. Reminds me of good ol' Rollercoaster Tycoon. Looks promising :)

    Also: If you are going to do it in Python there's a library named Pygame, which I strongly recommend.

    ReplyDelete
  4. You're re-writing Sim City 2000! I await its release with great anticipation. Can you please add the ability to turn my city into a communist state. You may have to adjust the game mechanics to inflict a severe penalty on players that let their citizens leave their socialist state. You may need to hire some creative graphics artists but I think it will be worth it; just imagine the scenarios: "Defend the "Stasi", "Stop the brain-drain" and "Protect the wall". I just hope it's released under some sane license or kept propriety.

    ReplyDelete