Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by EternallyCurious. 04/18/24 10:45
StartWeek not working as it should
by Zheka. 04/18/24 10:11
folder management functions
by VoroneTZ. 04/17/24 06:52
lookback setting performance issue
by 7th_zorro. 04/16/24 03:08
zorro 64bit command line support
by 7th_zorro. 04/15/24 09:36
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:48
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:46
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 600 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, 11honza11, ccorrea, sakolin, rajesh7827
19046 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