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.

Newcomers DBPro Corner / going crazy !!! simple yet damn confusing

Author
Message
Twinsen
18
Years of Service
User Offline
Joined: 20th Jun 2006
Location: Romania
Posted: 12th Apr 2008 23:03 Edited at: 12th Apr 2008 23:03
please tell me why does the program exit as soon as it starts ??? I am either an idiot or I just don't get computers at all ...



as you can see, I even made the program run at 30 FPS so that you don't think it's calculating it too fast ...

Could you help me treat my injured Dino-Fly ?
Dabbler
17
Years of Service
User Offline
Joined: 3rd Mar 2007
Location: Minnesota
Posted: 12th Apr 2008 23:23
The program works fine, but if you want to see something you have to put it on the screen.


Whatever...
Dabbler
17
Years of Service
User Offline
Joined: 3rd Mar 2007
Location: Minnesota
Posted: 12th Apr 2008 23:28
Yes, but this displays:



because you are not in 3d mode yet.


Whatever...
Twinsen
18
Years of Service
User Offline
Joined: 20th Jun 2006
Location: Romania
Posted: 12th Apr 2008 23:33 Edited at: 12th Apr 2008 23:34
so if I don't call the SYNC command, the game doesn't run at 30 FPS ??? I thought that if I don't call the SYNC command, I will just not see what the buffer holds in it ... but this wasn't specified in the help files ... anyway, try giving "a" a value of 999999999999 ... you'll see the same happens so even if it runs at full speed, still it would have to take a while before it calculates but it doesn't

Could you help me treat my injured Dino-Fly ?
Dabbler
17
Years of Service
User Offline
Joined: 3rd Mar 2007
Location: Minnesota
Posted: 13th Apr 2008 00:08
Quote: "No, because PRINT will do a sync automatically. "


Then why doesn't this work?




Whatever...
Twinsen
18
Years of Service
User Offline
Joined: 20th Jun 2006
Location: Romania
Posted: 13th Apr 2008 00:31
WindowsKiller: yeah, I underestimate it because lately I've been working with so much memory allocation and things went so slow that inside my head, a rather slow image of the CPU has been born sorry anyway, thanks for the helpful info and yes, integers can't hold that much I was typing fast and the point was to use a very large number again, thanks a lot !!!

Could you help me treat my injured Dino-Fly ?
Dabbler
17
Years of Service
User Offline
Joined: 3rd Mar 2007
Location: Minnesota
Posted: 13th Apr 2008 13:24
Yes, but if you issue any other display command before the print, it will not display.



Oh well. Since Twinsen's question has been answered, I guess this is now off topic.


Whatever...
Twinsen
18
Years of Service
User Offline
Joined: 20th Jun 2006
Location: Romania
Posted: 13th Apr 2008 13:36
well then I guess the PRINT command doesn't call a sync ... it just makes the program run at the desired rate I guess

Could you help me treat my injured Dino-Fly ?
Twinsen
18
Years of Service
User Offline
Joined: 20th Jun 2006
Location: Romania
Posted: 13th Apr 2008 14:30
hmm, WindowsKiller, since you've mentioned the buffers, can you please explain to me in short, what does each of them do? and also, what are the things displayed on the front and what are the things displayed on the back ??? thanks a million !!!

Could you help me treat my injured Dino-Fly ?
Twinsen
18
Years of Service
User Offline
Joined: 20th Jun 2006
Location: Romania
Posted: 13th Apr 2008 14:47
woo you made it sound so simple and clear so in short, let's see if I got it right: the front buffer is the resulting image when the game syncs and the back buffer is the "drawing table" on which the next front buffer is created ... so when you swap buffers, the back becomes the front and the front gets erased and becomes the back, right ???

Could you help me treat my injured Dino-Fly ?
Dabbler
17
Years of Service
User Offline
Joined: 3rd Mar 2007
Location: Minnesota
Posted: 13th Apr 2008 20:29 Edited at: 13th Apr 2008 20:31
Quote: "Anyway, the fact still stands that it has nothing to do with not being in 3D mode as you initially claimed."


Yes, I was wrong. I seems to be a text mode thing.

Hello World.


Whatever...
KISTech
16
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 13th Apr 2008 20:49
Someone in another thread also told me that it's DOUBLE BUFFERED so if you are doing your sync manually and you aren't getting the things on screen that you expect (which is what was happening to me with some text menus) try using

SYNC : SYNC

instead of just

SYNC

Not sure of the details of why it works, but it cleared up a couple of problems I was having.

Twinsen
18
Years of Service
User Offline
Joined: 20th Jun 2006
Location: Romania
Posted: 13th Apr 2008 21:01
that's true only for the first sync ... as the help files say, the very first SYNC command will show the backbuffer, and only the second call will show its contents

Could you help me treat my injured Dino-Fly ?

Login to post a reply

Server time is: 2024-09-27 14:19:07
Your offset time is: 2024-09-27 14:19:07