Topic:   Somethin Strange...   (Read 8824 times)


0 Members and 1 Guest are viewing this topic.

Gan


  • Administrator

  • ^ This guy is amazing.

  • *****


  • Posts: 4411
Somethin Strange...
« on: December 08, 2010, 10:21:02 PM »
Hey Mike, I'm working on my engine for the contest and I've come up with some strange results...

When I compiled and played my game it ran incredibly fast. Too fast. When I opened Activity Monitor it ran at normal speed. When I closed Activity Monitor it went back to crazy speeds.
Then I also figured out that if I dragged the window then let go it'd change the speed from fast to normal and vice versa. Here's the compiled game for you to try:

http://cl.ly/053D1y1P3C1X0z091Z2Q

If you can't replicate the results I can record the video.
Do you think this happens cause I have the timer running on 0?
« Last Edit: December 08, 2010, 10:21:48 PM by Gandolf »

Charlo


  • GMG-er

  • **


  • Posts: 451
Re: Somethin Strange...
« Reply #1 on: December 08, 2010, 10:25:56 PM »
Just curious, why would you want a timer running at 0?  That's just asking for problems.   ::)

GMG Mike


  • Administrator

  • GMG-er

  • *****

  • no avatar

  • Posts: 536
    • mikerichardson.name
Re: Somethin Strange...
« Reply #2 on: December 08, 2010, 11:25:16 PM »
Quote
Hey Mike, I'm working on my engine for the contest and I've come up with some strange results...

When I compiled and played my game it ran incredibly fast. Too fast. When I opened Activity Monitor it ran at normal speed. When I closed Activity Monitor it went back to crazy speeds.
Then I also figured out that if I dragged the window then let go it'd change the speed from fast to normal and vice versa. Here's the compiled game for you to try:

http://cl.ly/053D1y1P3C1X0z091Z2Q

If you can't replicate the results I can record the video.
Do you think this happens cause I have the timer running on 0?

If I play it on the G5, it seems to run correctly. The ball bounces up and down at what appears to be an appropriate rate.

If I play it on the Mac Pro, the ball goes up and down really fast like it's on crack. Opening Activity Monitor doesn't seem to change this.

What's really weird is that the game uses less CPU on the G5.

REALbasic might have some kind of bug on Intel having to do with 0 tick timers. Try using a 1 tick timer. That should give you 60 FPS.

I probably shouldn't support 0 tick timers at all. They eat up way too much CPU.

Gan


  • Administrator

  • ^ This guy is amazing.

  • *****


  • Posts: 4411
Re: Somethin Strange...
« Reply #3 on: December 09, 2010, 07:14:59 AM »
Setting to 1 fixed it. Thanks.