Jump to content
  • Advertisement

Canning

Member
  • Content Count

    5
  • Joined

  • Last visited

Community Reputation

100 Neutral

About Canning

  • Rank
    Newbie
  1. Canning

    Camera angles

    OK, thanks. An adjustable follow distance is always a nice touch as well. [/quote] Already implemented it for my camera angles.
  2. Hello all. I am currently making a 3d space ship game. I am after some ideas on some good camera angles for my game. Currently I have a camera to rotate around my 3d space ship model and a simple following camera, but am after some good ideas. thanks Canning
  3. I have a ship, and am wanting to rotate it to a destination angle. When I want to start turning, this is the code I run: Ship.DestAngle = System.Math.Atan2(Ship.Target.y - Ship.msngY, Ship.Target.x - Ship.msngX) + PI / 2 Ship.turning = True And this is the turning code: If Ship.turning = True Then a = System.Math.Sin(Ship.msngHeading + PI) b = System.Math.Cos(Ship.msngHeading + PI) c = System.Math.Sin(Ship.msngFacing) d = System.Math.Cos(Ship.msngFacing) det = a * d - b * c If det > 0 Then Ship.msngFacing = Ship.msngFacing + Ship.ROTATION_RATE * PI / 180 If Ship.msngFacing > Ship.DestAngle Then Ship.msngFacing = Ship.DestAngle Ship.turning = False End If Else Ship.msngFacing = Ship.msngFacing - Ship.ROTATION_RATE * PI / 180 If Ship.msngFacing < Ship.DestAngle Then Ship.msngFacing = Ship.DestAngle Ship.turning = False End If End If End If Sometimes the ship turns nicely, other times it 'jumps' to the destination angle. I think this has something to do with the sign changing. Can I have some advice please on how to fix this? thanks Canning
  4. Canning

    2d physics

    OK, I have found my way to control my ship. I am now after a way to move my ship to a destination x and y coordinate. Here are the important variables: Const PI = 3.14159 'Mmmm.. Pi Const ACCEL = 0.1 'Rate of increase of speed Const ROTATION_RATE = 15 'Rotation speed Const SHIP_RADIUS = 10 'Distance from center of triangle to any vertex Const MS_DELAY = 25 'Milliseconds per frame (25 = 40 frames per second) Dim msngFacing As Single 'Angle the ship is facing (ok, ok, it's a triangle, not a ship! Shut it!) Dim msngHeading As Single 'Current direction in which ship is moving Dim msngSpeed As Single 'Current speed with which ship is moving Dim msngX As Single 'Current X coordinate of ship within form Dim msngY As Single 'Current Y coordinate of ship within form Can I please have some help with this? thanks
  5. Hello all. I am wanting to create a 2d space action game similar to Subspace or Star Sonata. Just to get me started, I am wondering if there is any 2d physics examples out there for me to have a look at? I am wanting to do this in VB2010 I would love to be able to use mouse clicking as well. So that I can click a destination on my 2d map, and the ship will turn and move towards this destination, taking into account its physics variables. I used to have a directx example of this called shpshoot.zip, but have lost it. Does anyone have this example or can help me with some code? thanks ppl Canning
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!