Jump to content

  • Log In with Google      Sign In   
  • Create Account


Lars-Kristian

Member Since 20 Jul 2012
Offline Last Active Nov 02 2012 02:35 AM
-----

Topics I've Started

Xna GameTime problem?

21 October 2012 - 12:41 PM

Hi, everyone!

I am making a game for wp7 using silverlight/xna.

In the pre made code the game loop is setup like this:

[source lang="csharp"]GameTimer timer;public MyGame(){ timer = new GameTimer(); timer.UpdateInterval = TimeSpan.FromTicks(166666); timer.Update += OnUpdate; timer.Draw += OnDraw;}private void OnUpdate(object sender, GameTimerEventArgs e){}private void OnDraw(object sender, GameTimerEventArgs e){}[/source]

When the game runs, it lags precisely one time a second;

From my understanding the GameTimer suspends a frame if the frame is using more time than it should.
My game is pretty simple and the game runs fine on all the other frames, so why is this happening only one time per second?
I have Googled around and this seem to be a common problem. But I can't find a solution to it.

If someone have had this problem or know a solution I would be very happy if you can share it with me. Posted Image

Bug in Verlet integrated physics engine.

01 October 2012 - 06:41 AM

Hi everyone.

I am working on a game that uses Verlet integrated physics, and it works pretty well.
I got 2 types of objects vertices and edges.

The problem is when 2 horizontal edges collide and one of them is static, the other one jumps pretty high.

Attached File  path3961-6.png   10.44KB   17 downloads

Is this a common problem? does anyone know how to fix it?

Incremental freedrag

30 September 2012 - 04:22 AM

Does anyone know how to make a incremental freedrag from only using gesture samples in xna?

What I mean is if the user makes a drag gesture that is 40px long, the object will move to the left or right.

I can't seem to figure it out. xD

Rotational motion to linear motion

20 July 2012 - 07:04 PM

Hi, like my title says I want to transform rotational motion in to linear motion.
In my game I have a circle that spins, and when it collides with something, it shall transform some of that spin in to a linear motion.

Attached File  test.jpg   21.33KB   21 downloads

I have tried alot of different things, and I'm out of ideas. Does someone have a solution?
And I'm using a verlet integration for physic's if it helps.

PARTNERS