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.

DarkBASIC Discussion / What's wrong with my cls and sync - ing code??

Author
Message
dab
20
Years of Service
User Offline
Joined: 22nd Sep 2004
Location: Your Temp Folder!
Posted: 20th Jan 2005 10:26
The screen keeps flashing and all that wonderful annoying stuff. What is wrong with my code?You will also need an image to make this code work. OR get an image and name it wash.bmp (the file in the zip is saved as wash.jpg)

thanks in asvanced

___________________________________________________________
Visit my temp Page for video games!
http://www.freewebs.com/goodboys_dog

Attachments

Login to view attachments
Osiris
20
Years of Service
User Offline
Joined: 6th Aug 2004
Location: Robbinsdale, MN
Posted: 20th Jan 2005 11:23
should read...



you dont put a sync in a loop just at the top of the code

Los
20
Years of Service
User Offline
Joined: 3rd Jan 2005
Location:
Posted: 20th Jan 2005 21:45
TO my understanding.. when the game runs it moves through line by line (don't know the technical term). When it reaches a SYNC it updates the screen. What that seems to be doing is letting the DB code runner automatically update for itself.

no no no no no no no no
Benjamin
22
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 20th Jan 2005 22:50 Edited at: 20th Jan 2005 22:51
Quote: "you dont put a sync in a loop just at the top of the code"

Yes you do .



Thats how I would do it. What you were doing is drawing to the screen, clearing it, then updating it.

CURRENT PROJECT: Chaos Hizzle Demo
STATUS: Release of BETA imminent!
NanoBrain
20
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Portland, OR
Posted: 21st Jan 2005 00:12
This is a test post.


+NanoBrain+
Osiris
20
Years of Service
User Offline
Joined: 6th Aug 2004
Location: Robbinsdale, MN
Posted: 21st Jan 2005 05:41
@benjamin

woops i ment two syncs

blanky
20
Years of Service
User Offline
Joined: 3rd Aug 2004
Location: ./
Posted: 26th Jan 2005 18:31


You do realise that with this code, you're attempting to read the bitmap from the hard drive about once every 1/200th of a second, if not more?

Use this:



...and if you're using the 'cls' command just to get the print command to start at the top again, use 'Set Cursor 0,0' instead.

Avatar - white cat in a snowstorm. Look closely.

Login to post a reply

Server time is: 2025-05-24 03:22:12
Your offset time is: 2025-05-24 03:22:12