Weird lag

Sep 15, 2011 at 7:22 AM

Hi Nich

I was drawn away to look at something else, but now I'm back in the physics, and again I would appreciate your take on this. As you know I was building an Airhockey game for Surface, while testing your wrapper before using for something bigger - it gives me a good quick and realistic walkthrough of the possibilities.

Now, I've been doing some basic game-mechanics, such as splash-screen, P1 ready/P2 ready, scoreboard, various animations etc. After I implemented this the engine lags BIG time. I tried disabling new code and debugging it, but I just can't find the bastard-child in the midst. But I wonder even more as to why this happens - I've only added a few images, three textboxes and two checkboxes...

Have you had any ordeals that sounds like this?

Coordinator
Sep 16, 2011 at 7:21 AM

Your description isn't ringing any bells. Is it actually using the cup more is it just running slow with the same cpu usage? It could simply be that the clock got changed somehow.

You could try a profiler to see what code is causing the problem.

It you send me your code I'll talk a look and see what I can do.

processor
Sep 16, 2011 at 7:30 AM
Edited Sep 16, 2011 at 7:31 AM

Oh, sry, forgot to update this.

I found a bug, and guess it's not related to XAML Physics. I had a basic XAML-animation with EasingFunction in it. Even when it was'nt running, the whole application lagged. Removing the EasingFunction unlocked the experience again. It took a while to identify, as there was also animations inside styles.

Weird, but I seem to remember the Surface SDK had issues earlier with this, so I guess it has'nt been properly fixed yet.

All XAML-animations that keys opacity seem to have an effect on Farseer though. I made a scoreboard that fades in (animated opacity-property) when a goal is scored. During the fade, the UI updates very slowly.