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 Professional Discussion / What is the sync function?

Author
Message
DarkBasic Pro Guy
20
Years of Service
User Offline
Joined: 4th Jun 2004
Location: Broomfield, Colorado
Posted: 6th Jul 2004 04:42
What is the sync function? What is it for? What does it do? How do I use it?

Thanks in advance

Rob K
Retired Moderator
22
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 6th Jul 2004 04:51
Try reading the help files, and looking at the examples. It updates the display, you call it once at the end of the main loop in your program.

I suggest you change your name to something other than "program expert" as its not really applicable.


BlueGUI:Windows UI Plugin - All the power of the windows interface in your DBPro games.
DarkBasic Pro Guy
20
Years of Service
User Offline
Joined: 4th Jun 2004
Location: Broomfield, Colorado
Posted: 6th Jul 2004 05:02
thanks Could I put my image back in my signature or what?

Zero Blitzt
21
Years of Service
User Offline
Joined: 18th Jan 2004
Location: Different Stages
Posted: 6th Jul 2004 05:02
Quote: "I suggest you change your name to something other than "program expert" as its not really applicable."


Rob, I was just going to post that.

GameXaero forums - www.t4e0.4cybiko.com
Rush owns--> www.Rush.com ---> I'm going to see them Aug. 7
Zeal
22
Years of Service
User Offline
Joined: 10th Oct 2002
Location: Colorado Springs, CO
Posted: 6th Jul 2004 05:29
Heh Rob with the zinger

All you need is zeal
DarkBasic Pro Guy
20
Years of Service
User Offline
Joined: 4th Jun 2004
Location: Broomfield, Colorado
Posted: 6th Jul 2004 06:42
@ Zeal
Quote: "Heh Rob with the zinger"
what do you mean?

bitechu
21
Years of Service
User Offline
Joined: 29th Dec 2003
Location: Massachusetts
Posted: 6th Jul 2004 07:23
Quote: "Pronunciation: 'zi[ng]-&r
Function: noun
1 : something causing or meant to cause interest, surprise, or shock
2 : a pointed witty remark or retort "


Geeesh! Learn how to use a search engine. Oh, and just in case.

Quote: "Function: noun
: computer software used to search data (as text or a database) for specified information "
DarkBasic Pro Guy
20
Years of Service
User Offline
Joined: 4th Jun 2004
Location: Broomfield, Colorado
Posted: 6th Jul 2004 08:54
Was that the wrong thread or something? It don't make sense to me

Hamish McHaggis
22
Years of Service
User Offline
Joined: 13th Dec 2002
Location: Modgnik Detinu
Posted: 6th Jul 2004 10:24 Edited at: 6th Jul 2004 10:25
Since no-one has given a decent answer I will (although as RobK said, you probably could have looked in the help file)...

SYNC updates the screen. Basically all the drawing operations are executed at once when you use sync. But first you have to set manual syncing on using SYNC ON (once at the top of your code). You can then set the sync/frame rate using SYNC RATE. If you don't use SYNC ON then DBPro will refresh the screen whenever it thinks it should. It's always best to use manual syncing when dealing with 3D graphics. Eg.



Athelon XP 1600+/Radeon 9600 Pro/256 RAM
DarkBasic Pro Guy
20
Years of Service
User Offline
Joined: 4th Jun 2004
Location: Broomfield, Colorado
Posted: 7th Jul 2004 01:06
where would that code go in the game that I'm creating right now(all there is are REM lines right now because I'm new to darkbasic and I havn't been working on more then a day)?

Van B
Moderator
22
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 7th Jul 2004 01:20
Stop, switch of your PC, get a pen and paper, and sit with the manual looking for commands that you might need. Take a note of each relevant command and how it works.

Then experiment with each command until you know what it does and how.

Then develop your skills by playing around with examples (only saving to a new file when you really want to keep it) - do that until your ready to start a project on your own. The important thing is that your not ready yet, but with a good attitude to learning you could get confident in DB really quickly.


Van-B


The nature of Monkey was irrepressible!.
Zeal
22
Years of Service
User Offline
Joined: 10th Oct 2002
Location: Colorado Springs, CO
Posted: 7th Jul 2004 04:10
im starting to smell a 'da codes' copy cat. anyone else think this guy is phony?

All you need is zeal
DarkBasic Pro Guy
20
Years of Service
User Offline
Joined: 4th Jun 2004
Location: Broomfield, Colorado
Posted: 9th Jul 2004 10:56
I haven't recieved the dark basic yet so i am going to do that later.

Lost in Thought
21
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 9th Jul 2004 11:20
OK you can still use the help files that come with the demo. They don't have enough examples but it has the commands, a discription, and a syntax. You can then take this newfound knowledge and apply it to the tutorials and examples in the codebase on these forums.

DarkBasic Pro Guy
20
Years of Service
User Offline
Joined: 4th Jun 2004
Location: Broomfield, Colorado
Posted: 25th Jul 2004 10:19
Thanks Hammish you helped a lot I don't need any thing more except where would I use the sync fnction?

Zero Blitzt
21
Years of Service
User Offline
Joined: 18th Jan 2004
Location: Different Stages
Posted: 25th Jul 2004 11:13
Inside a DO-Loop, usually near the beginning or the end.


--Come to #coding! Same server as #darkbasic!--
Rush owns--> www.Rush.com ---> I'm going to see them Aug. 7
David T
Retired Moderator
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: England
Posted: 25th Jul 2004 17:44 Edited at: 25th Jul 2004 17:44
A game consists of three parts.

The beginning bit loads all the stuff it needs to use.

Then it repeats loads of times in the middle, each time checking for any user input and reacting to it. Every cycle in the loop contains a sync command somewhere. Every time the loop comes around to that sync it draws all the graphics to the screen and that counts as one "frame". When people talk about getting 60 frames per second, it means 60 repeats of the loop per second.

And then after that, it's basically a storage area where you cna put any functions, etc.

Get 15 new commands, all the date / time commands left out of DBPro for free!
DOWNLOAD PLUGINS HERE: http://www.davidtattersall.me.uk/ and select "DarkBasic"
Teh Go0rfmeister
21
Years of Service
User Offline
Joined: 17th Aug 2003
Location:
Posted: 25th Jul 2004 19:31
wow this dudes overly enthusiastic

good for him

Tapewormz
22
Years of Service
User Offline
Joined: 15th Sep 2002
Location: Winnipeg, Mantoba, Canada
Posted: 26th Jul 2004 06:56 Edited at: 26th Jul 2004 07:00
Quote: "What is the sync function? What is it for? What does it do? How do I use it?"


Press F1. Press F1. Press F1. Press F1...er no wait... PRESS ALT F4, pull the CD out of the CDROM, put it back in the box and return it. It's just easier that way. Actually, upgrade to the latest patch first, and tell me if you're still able to use DBP after trying to register it.

Quote: " Timesoft - Your wife is death. How? NO idea.
But it is murder. REVENGE!!!!!!!!!"

Hands down the funniest synopsis for a game ever. All your base are belong to us!
Tapewormz
22
Years of Service
User Offline
Joined: 15th Sep 2002
Location: Winnipeg, Mantoba, Canada
Posted: 26th Jul 2004 07:02
Quote: "where would that code go"


In your main loop somewhere, after you've updated all your graphics and are ready to display them.

Quote: " Timesoft - Your wife is death. How? NO idea.
But it is murder. REVENGE!!!!!!!!!"

Hands down the funniest synopsis for a game ever. All your base are belong to us!
DarkBasic Pro Guy
20
Years of Service
User Offline
Joined: 4th Jun 2004
Location: Broomfield, Colorado
Posted: 27th Jul 2004 12:23
ok now I am not working on anythinjg right now I just didn't use the sync function but I will next time though

My program looks realy dorky though I'm not selling it.

Three Score
20
Years of Service
User Offline
Joined: 18th Jun 2004
Location: behind you
Posted: 28th Jul 2004 00:57
speaking of sync i have been trying to lower the cpu usage in my program and sync off in an earlier version made it use less cpu
but on this version it don't so now it looks a little crappy cause i had to lower the frame rate and it is slow now

DarkBasic Pro Guy
20
Years of Service
User Offline
Joined: 4th Jun 2004
Location: Broomfield, Colorado
Posted: 30th Jul 2004 04:27
Now the question is what kind of game should I create? I'm new so please answer accordingly to the subject: Newcomers first game.

Scraggle
Moderator
21
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 30th Jul 2004 05:06 Edited at: 30th Jul 2004 05:07
With you level of expertise I would suggest noughts and crosses (tic-tac-toe) using a pen and paper.

Read the manual - learn the commands and then think about writing a computer game.

DarkBasic Pro Guy
20
Years of Service
User Offline
Joined: 4th Jun 2004
Location: Broomfield, Colorado
Posted: 30th Jul 2004 05:13
ok I will just create a snake nibbles game


Login to post a reply

Server time is: 2025-06-02 14:01:17
Your offset time is: 2025-06-02 14:01:17