Monday, 21 February 2011

Baddy baiting

Here's where two players can easily take out an enemy - one player draws the troops out of the village and the second player can swoop in and kill their king!
This vid also shows an issue I haven't resolved yet; at about 18 secs the camera dips below the ground and you can see water underneath. I don't much like this but I also don't much like any of the alternatives (like zooming or blocking the camera movement).
What's the best solution for this? Or shall I just leave it as it is?

6 comments:

  1. Why not let the ground act as a lower bound for the camera? I think the car example in the jPCT distribution does this too...works pretty well, IIRC.

    ReplyDelete
  2. Well, I did try that at first, but I turned it off because it was annoying. Trouble is that if a unit is stood in a valley you can't look up the sides because the camera hits the ground and stops (if you see what I mean!)

    ReplyDelete
  3. Maybe don't stop the camera, but simply move up. Something like cameraHeight=max(groundHeight+x, calculatedCameraHeight);

    ReplyDelete
  4. You mean zoom in when the camera's got something behind it? That's good at close range but it can get weird when the camera's at long range (ie goes behind a mountain).
    I think I either need to use a 'free' camera (not locked to a unit) or have the camera only in tight first person (more visually impressive but it makes the game much harder to play!)

    ReplyDelete
  5. No, not zoom in. What i mean is to calculate the camera's position as if there were no terrain but after that, check if the camera would be located inside the terrain that way and if yes, move it up until it's above the terrain again. I'm not sure if this is applicable here though.

    ReplyDelete
  6. K, that's what I meant by blocking the camera. I was just fiddling with it now & I think I'm going to have to have a free top-down camera - controlling battles and building things in third-person is not easy...

    ReplyDelete