Allegro.cc - Online Community

Allegro.cc Forums » Programming Questions » Temporary freeze

This thread is locked; no one can reply to it. rss feed Print
Temporary freeze
WyvernSk
Member #2,456
June 2002

Has anyone been experiencing temporary freeze at the start of their allegro game?

Cuz everytime I start mine, the game freezes after a few seconds and then come back to normal. If I take a look at the frame rate... it starts at 80 fps drops to 5 fps and goes back to 75-80 fps.

By the way, the game starts in fullscreen mode.

So any help would be great.

Thanks

Zaphos
Member #1,468
August 2001

Sounds like a fault in your own code, not allegro, to me. Do the example programs do the same?

kdevil
Member #1,075
March 2001
avatar

I get that with my game also. I haven't focused much on it yet, though, so I don't know what's causing it.

-----
"I am the Black Mage! I casts the spells that makes the peoples fall down!"

spellcaster
Member #1,493
September 2001
avatar

It seems to happen with the latested WIP, only.
IE. it never happened to me before I switched to the latest WIP, and now I've the slowdown.

It's really weird, because it takes forever to go through the init code (just setting the mode, creating the double buffer, etc.)

But it happens before I enter the main loop... I'll try to find the allegro calls blocking the game..

[EDIT]
Ok, just recompiled it with an older version... no slowdown with 4.0.2

--
There are no stupid questions, but there are a lot of inquisitive idiots.

lameDuck
Member #2,327
May 2002
avatar

I'm still on 4.0.2, are the WIPs worth using? My attitude to things like this is generally to wait until formal 'stable' releases. Things ain't broken, so I ain't gonna try fixin em ;)

Are ppl switching to WIPs just to try them out or are they fixing some problem you're having? I read the one about XP, but I haven't experienced it...

WyvernSk
Member #2,456
June 2002

Actually I had that problem even before the latest WIP version.

I've just discovered that It has the same problem with plain DirectX apps. (no allegro code, just DirectX).

Maybe Windows XP has some special features that would cause such slowdown.

kdevil
Member #1,075
March 2001
avatar

I'm using 3.9.36, or something that was shortly before version 4. The init goes fine, but about one second into the game (or, in my case, the title screen), it stutters for about a quarter of a second, and then resumes normality. I'm using Win95, by the way.

-----
"I am the Black Mage! I casts the spells that makes the peoples fall down!"

Evert
Member #794
November 2000
avatar

I forwarded the post to the developer list. I'm now back-forwarding the response here:

Quote:

This patched src/win/wddmode.c may speed up fullscreen mode initialization:

http://www.multimania.com/ebotcazou/dev/wddmode.zip

Could you take a look at it?

spellcaster
Member #1,493
September 2001
avatar

I'm running windowed, and I have the same problem (in win98, not with winNT). And the delay is after the window has been created.

--
There are no stupid questions, but there are a lot of inquisitive idiots.

Oscar Giner
Member #2,207
April 2002
avatar

I remember having little freezes (1/2 sec) with the 3.9.x versions (under Win98), but now I don't get any freeze (Can't tell if it's because that has been fixed or because I changed some part of my code).

kdevil
Member #1,075
March 2001
avatar

I changed my game from double buffering to dirty rectangles, and I've noticed that the tiny freeze is less noticeable now (about 1/10th of a second).

-----
"I am the Black Mage! I casts the spells that makes the peoples fall down!"

Hard Rock
Member #1,547
September 2001
avatar

Well, on my computer, sometimes my a game will continue freeze every few seconds,

After closing random porgrams, i found fastfind was acting screwy....

But using allegro programs, 23's tile engine demo likes to stutter every 30 seconds-2 min or so and i then find my self warped to a new part of the level....

_________________________________________________
Hard Rock
[ Stars Dev Company ][ Twitter ][Global Warming: ARA My TINS 07 Entry][Pong Ultra Website][GifAllegS Ver 1.07]
"Well there's also coolwebsearch but we'll let that be an IE exclusive feature" - arielb on the New Browser Plugins "What's better, HTML or Variables?"

23yrold3yrold
Member #1,134
March 2001
avatar

If you mean the game in my sig, I get that too (if by warping you mean that you run, it pauses for a sec, then suddenly you're a screen too far). So this is an Allegro thing and not my 'puter wasting resources in the background? I'm using Allegro 4.0.

I'd read the rest of the thread first, but navigating on my monitor has become a headache, as you're about to read in the OT forum ....

--
Software Development == Church Development
Step 1. Build it.
Step 2. Pray.

Go to: