Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

2D All the way! / Fade bitmap?

Author
Message
EvilKnuckles 666
22
Years of Service
User Offline
Joined: 23rd Jun 2003
Location:
Posted: 30th May 2004 22:49
Maybe i'm doing this wrong, but ok..
i'm doing"



and it's going really really slow, like 2 fps...
is it because i'm fading the screen? or should i make a separate bitmap for that?

http://esotericbasic.dbspot.com
EvilKnuckles 666
22
Years of Service
User Offline
Joined: 23rd Jun 2003
Location:
Posted: 31st May 2004 00:36
i think i found another way...

instead of fading the bitmap (which is the whole screen anyway) i'll reduce the GAMMA values...

but when i make a change, the program ends right away... does that mean my card doesn't support gamma?

http://esotericbasic.dbspot.com
Mentor
23
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United Kingdom
Posted: 31st May 2004 12:05 Edited at: 31st May 2004 12:09
your screen refresh must be realy slow, and since you don`t have any sync in that loop you must be using the automatic screen refresh (the default refresh), DO NOT USE THE AUTOMATIC SCREEN REFRESH...EVER

instead add this to the top of your code

sync on:sync rate 0

then after "fade bitmap" add

sync

turning sync on allows you to tell the system when to display the changes on the screen, the automatic default sync slows code to something less than glacialy slow, never use it, make a habit of using the manual sync, the only time you need automatic sync is if you use "input" since the system is busy waiting for the return key to be pressed before it follows any other instructions you need it to manage the sync automaticaly until the input statement finishes, but swap back to manual sync as soon as you have got the input .

you will need to add a sync in your code wherever you need to see the current state of play on the screen, you will not see any changes until you have performed a sync, so you will need one at the bottom of the main loop and another for example after you load any title screens, you may find you need to perform a double sync the first time you perform one, since the system will sometimes ignore the very first sync instruction.

Mentor.

PC1: P4 hyperthreading 3ghz, 1gig mem, 2x160gig hd`s, Nvidia FX5900 gfx, 6 way surround sound, PC2: AMD 1.2ghz, 512mb ram, FX5200 ultra gfx, stereo 16 bit soundblaster, ups.

Login to post a reply

Server time is: 2026-06-09 13:56:15
Your offset time is: 2026-06-09 13:56:15