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.

Author
Message
heartbone
22
Years of Service
User Offline
Joined: 9th Nov 2002
Location:
Posted: 18th Jul 2003 06:30 Edited at: 18th Jul 2003 06:31
After two years of programming this stuff, only just now I discovered the horror of just how bad of a player Sync On truly has been in DBC.

I was developing this snippet to show you just why I sometimes need to temporarily pause a DarkBASIC Classic program, when I discovered how nasty of a command it has been.

Before I tell you about my latest discovery run this in DarkBASIC Classic. It produces an effect that I'm sure that we've all seen. If you look at the code it will be very clear what is happening.



OK now that you have run it, to see my discovery remove the Sync On and run it again!

The more you see, the more you know.
The more you know, the more you see.
Richard Davey
Retired Moderator
23
Years of Service
User Offline
Joined: 30th Apr 2002
Location: On the Jupiter Probe
Posted: 18th Jul 2003 06:55
It took you 2 years to realise your video card needs to sync?

"Gentlemen, we are about to short-circuit the Universe!"
New DBS Web Sites Coming Soon - All Change
Ag3ntSm1th
22
Years of Service
User Offline
Joined: 13th May 2003
Location:
Posted: 18th Jul 2003 08:01
yeah, you have much to learn young grasshopper, for syncing correctly will show you the light

"The secret to creativity is knowing how to hide your sources." - Einstein
my DarkBasic creations - http://www.sixurbanninjas.tk
heartbone
22
Years of Service
User Offline
Joined: 9th Nov 2002
Location:
Posted: 18th Jul 2003 19:27
rich quit being such a smart ass and try the code damn it.

The more you see, the more you know.
The more you know, the more you see.
Mattman
21
Years of Service
User Offline
Joined: 5th Jun 2003
Location: East Lansing
Posted: 18th Jul 2003 19:54
DOn't be so mean to the administrator

---Mattman
DID YOU KNOW THAT ???
heartbone
22
Years of Service
User Offline
Joined: 9th Nov 2002
Location:
Posted: 18th Jul 2003 20:05
But it's the second time in 2 days that he has made some half arsed comment about my post WITHOUT BOTHERING TO EITHER RUN OR ANALYZE the information presented.

See http://www.darkbasicpro.com/apollo/view.php?t=13497&b=1

If he can not be helpful, at least be quiet. Or is he just trying to cover up bugs?

The more you see, the more you know.
The more you know, the more you see.
Hamish McHaggis
22
Years of Service
User Offline
Joined: 13th Dec 2002
Location: Modgnik Detinu
Posted: 18th Jul 2003 21:44 Edited at: 18th Jul 2003 21:48
Ummm, as far as I can tell, taking out the 'sync on' just makes the text commands happen with gaps inbetween, which makes sense as 'sync on' makes everything in the code happen at once, unless you put a sync command there, in which case everything between that sync and the last sync happens at once. Not using sync off means that the computer does everything one command at a time (as far as I can tell).

I cannot see any bug, maybe it's just your setup.

cuRant PRogekt: a three-de map editer
Why the hell'd you ask me for crying out loud!?!
Athelon XP 1400 Plus - Nvidia Geforce MX400 - 256mb RAM
heartbone
22
Years of Service
User Offline
Joined: 9th Nov 2002
Location:
Posted: 18th Jul 2003 21:58
Maybe it is my setup?

When I compile it and run it under DBC, it produces the dreaded flickering text effect.

When I remove the Sync On command the flicker problem is removed. And the stuf displays as expected.

Anyone else experience that?

The more you see, the more you know.
The more you know, the more you see.
Chiwawa
22
Years of Service
User Offline
Joined: 13th Oct 2002
Location: Canada
Posted: 19th Jul 2003 01:39 Edited at: 19th Jul 2003 01:39
heartbone i experimented this $/"! bug many time..... there is MANY bug ..of sync with image..text..

there is an integred "sync" in the wait ..... like in the "get image" and many other.. then juste put a sync:




i know.... it can screw all your program if you wont to sync... then you should do that:



but you can do it many way.... like.. copy bitmap instead of get image..... but it delete the source bitmap..... OR you put un sync like in your code that i FIXED ... BUT if you wont to sync.... at this moment.. then just use my method
Chiwawa
22
Years of Service
User Offline
Joined: 13th Oct 2002
Location: Canada
Posted: 19th Jul 2003 01:46
another way ..better than the other:





hmmmmm but i just tough that a get image 0 do a sync...then it dont..... screw up your game if you wont sync at this time..

hmm you should do some test in different ...moment you can do many thing.. it just depend what you need... and when.
Chiwawa
22
Years of Service
User Offline
Joined: 13th Oct 2002
Location: Canada
Posted: 19th Jul 2003 01:50
hmmmmm finnaly a get image 0 DO NOT do a sync..... i forgot it.. in fact i inversed it.. its the get image who WAIT a sync.... then its ok..

this method should do ALWAYS the job (i wont sync in the middle of your loop):

heartbone
22
Years of Service
User Offline
Joined: 9th Nov 2002
Location:
Posted: 19th Jul 2003 04:46 Edited at: 19th Jul 2003 04:47
Hey Chiwawa good to see some alternative solutions.

I don't like your first solution. inserting Syncs is much more slowing and ugly than Wait 2.

Your second solution of pasting a whole screen sprite is, let's say interesting. However, it's someting that woud not work for me in most cases.

Yet both of your solutions do solve this particular problem.
Thanks.

---------------------------

Analysis of what is going on in my example:

After a Text or Center Text command, if you too soon follow it with a command that changes the parameters of the text, the text attribute gets changed before the system can render the second buffer.

As a result my DBC code is peppered with Wait 2s to slow down the code to prevent these flickers. I learned this technique in AMOS a long time ago.

What is news to me is that if I remove the necessary Sync On command this problem vanishes!

The more you see, the more you know.
The more you know, the more you see.
Chiwawa
22
Years of Service
User Offline
Joined: 13th Oct 2002
Location: Canada
Posted: 19th Jul 2003 04:54
like i said..... MANY command get an "integrated" sync....
and WAIT and WAIT KEY are 2 of those.....then wait 2 is SLOWER than SYNC(you will see ...wait 0 is a sync...):

see that:


wait 0 is a sync.....i think its even slower than sync... then use my first example with the sync.... but.. if you wont sync in the middle of your code... (who will screw up many thing...) you just need to use the second example..like you said

and see that:


i had so much trouble...cause of these "incorporated" sync.....with a backdrop+2d ...it flicker so much.. there is so much command with incorporated sync...

then i founded many trick ..but almost each of them work ... on a specific.. need..
Chiwawa
22
Years of Service
User Offline
Joined: 13th Oct 2002
Location: Canada
Posted: 19th Jul 2003 04:57
then CLS is better than wait 0
heartbone
22
Years of Service
User Offline
Joined: 9th Nov 2002
Location:
Posted: 19th Jul 2003 05:55 Edited at: 19th Jul 2003 05:56
Understood. And good work. Thanks a million.

And it is too bad about the a$$hole Bush poisoning the minds of the American sheeple about the French. You guys are totally correct about Iraq.

The more you see, the more you know.
The more you know, the more you see.
Ag3ntSm1th
22
Years of Service
User Offline
Joined: 13th May 2003
Location:
Posted: 19th Jul 2003 06:55 Edited at: 19th Jul 2003 06:56
dude, whoa!!! i suggest you keep your political opinions to yourself. no one wants to read that kind of crap.

and btw your code doesn't work because you aren't syncing properly!!!!!!



not a bug, more like one of those Id-10-T errors

"The secret to creativity is knowing how to hide your sources." - Einstein
my DarkBasic creations - http://www.sixurbanninjas.tk
Chiwawa
22
Years of Service
User Offline
Joined: 13th Oct 2002
Location: Canada
Posted: 19th Jul 2003 07:33
i already posted this solution...
just check all my solution......
BUT i you WONT sync 2 time....cause of some thing you should not see..its a big problem......

and i said it....the command WAIT... IS A SYNC ...
heartbone
22
Years of Service
User Offline
Joined: 9th Nov 2002
Location:
Posted: 19th Jul 2003 08:51 Edited at: 19th Jul 2003 08:58
Chiwawa you have convinced me that Wait contains a Sync. So my Wait 2 strategy which works, is inferior to just calling Sync.

I haven't tested replacing Wait 2 with Sync yet (I'm still downloading IE5.5 SP2 and at 48K dialup the 84 MB takes almost forever), but I do understand.... If it works. Why I am a bit skeptical is that I seem to remember that Wait 1 didn't work for me at times to stop the flicker.

I wish that they had documented this language properly.
What is your list of Sync containing commands?
If it is secret, email them to me.

Ag3ntSm1th, Yes Sir. Sir, when I actually have to live under the coming Bush dictatorship, I'll certainly do that, sir.

The more you see, the more you know.
The more you know, the more you see.
Chiwawa
22
Years of Service
User Offline
Joined: 13th Oct 2002
Location: Canada
Posted: 19th Jul 2003 15:26 Edited at: 19th Jul 2003 15:27
i dont know them all... but i remember these one..and there is MANY OTHER!!!!
(just un comment the loop your want to see ...you should see a GREEN box ..but you see orange... the is the result of flickering between green and red...)

heartbone
22
Years of Service
User Offline
Joined: 9th Nov 2002
Location:
Posted: 19th Jul 2003 18:27
Well the Syncs did indeed stop the flicker just like the Wait 2s did. Thanks a lot for the information about the imbedded Syncs.

The more you see, the more you know.
The more you know, the more you see.

Login to post a reply

Server time is: 2025-05-19 23:00:02
Your offset time is: 2025-05-19 23:00:02