Gamestudio Links
Zorro Links
Newest Posts
loading historical data 1st time
by AndrewAMD. 04/14/23 12:54
Trade at bar open
by juanex. 04/13/23 19:43
Bug in Highpass2 filter
by rki. 04/13/23 09:54
Adding Limit Orders For IB
by scatters. 04/11/23 16:16
FisherN
by rki. 04/11/23 08:38
AUM Magazine
Latest Screens
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Hecknex World
Who's Online Now
3 registered members (AndrewAMD, Grant, Neb), 908 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
rki, FranzIII, indonesiae, The_Judge, storrealba
18919 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Panel causing initial slowdown... #6946
09/08/01 02:39
09/08/01 02:39
Joined: Mar 2001
Posts: 1,825
London, England
Keith B [Ambit] Offline OP
Expert
Keith B [Ambit]  Offline OP
Expert

Joined: Mar 2001
Posts: 1,825
London, England
Hi, I'm having a slight problem with a panel... The panel is just a red 1600x1200 PCX that appears briefly then fades out when the player is hit. However, the first time the player is hit, the game freezes for about a second, evidently while the panel is loaded. After that, there's no slowdown.

This is the code:

code:

//Bitmap used for blood in first person mode:
bmap bloodmap=<bldfade.pcx>;

panel bloodscreen
{
bmap=bloodmap;
flags=refresh,d3d;
layer=10;
}

function blood_screen()
{
bloodscreen.visible=on;
bloodscreen.transparent=on;
bloodscreen.alpha=100;
while (bloodscreen.alpha>0)
{
bloodscreen.alpha-=20*time;
wait(1);
}
bloodscreen.visible=off;


Any ideas on how I can get rid of the slowdown when the panel is first used?

Thanks,
Keith


Re: Panel causing initial slowdown... #6947
09/08/01 08:52
09/08/01 08:52

A
Anonymous
Unregistered
Anonymous
Unregistered
A



"Just" 1600x1200...

Anyway, since you say that there is no slowdown after the first time, just show the panel briefly when starting the game. You can set a lower layer flag and hide it behind a titlescreen or even the A4 / A5 logo, just to get it loaded. This will take a second, but since it is during the "loading" phase, it doesn't matter anyway. From then on, it should work.

Can't think of a better solution...

Gnometech


Re: Panel causing initial slowdown... #6948
09/08/01 20:18
09/08/01 20:18
Joined: Mar 2001
Posts: 1,825
London, England
Keith B [Ambit] Offline OP
Expert
Keith B [Ambit]  Offline OP
Expert

Joined: Mar 2001
Posts: 1,825
London, England
Hi Gnometech,

Thanks for your reply. That works perfectly - I guess it's just a matter of loading the PCX into memory before playing.

Thanks again,
Keith


Re: Panel causing initial slowdown... #6949
09/08/01 21:22
09/08/01 21:22

A
Anonymous
Unregistered
Anonymous
Unregistered
A



ya, thats your problem. it seems to me that there is a wdl function that will do that for ya, but i can't seem to remember it. You could go hunting through the manual, but it sounds like you have it fixed, so if you want that, go right ahead. (i still thing the other way would be cleaner though.... )
-merlingames


Moderated by  HeelX, Spirit 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1