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 / Problem with matrix code

Author
Message
Dragonslayer
20
Years of Service
User Offline
Joined: 4th Nov 2003
Location: New Lenox Illinois U.S.A.
Posted: 31st Oct 2004 02:19
I have had DBP since it came out but have not done much more with it than use it with the beginners book and that did not really cover matrixes and the manual is no good.

I really don't know what other commands I need to get it working here is the code I'm trying to get to work

Thanks
zao420
21
Years of Service
User Offline
Joined: 5th Aug 2003
Location: Canada
Posted: 31st Oct 2004 03:33
hi Dragonslayer

the reason that code doesn't work is it only sync once, dbp use's duoble buffering so you have to sync at least twice for that to show up, it have you sync in a loop like i have it in the code in the source box. i also have it so it cleans up after you exit.

http://cavesoft.no-ip.com
WIP Version of my site. Usally it is offline.
http://dev-cavesoft.no-ip.com
sadsack
20
Years of Service
User Offline
Joined: 27th Nov 2003
Location: here
Posted: 31st Oct 2004 04:23
This help me alot, hope it will help you. renny

Attachments

Login to view attachments
Dragonslayer
20
Years of Service
User Offline
Joined: 4th Nov 2003
Location: New Lenox Illinois U.S.A.
Posted: 31st Oct 2004 04:43
Thanks that helped a lot. It looks like I may be spending a lot of time around the new commers forum.

I have had DBP since it came out but have not really put a big effort into learning it. I really know the basics of programming so now its learning what commands to put together to get the program to do what I want
sadsack
20
Years of Service
User Offline
Joined: 27th Nov 2003
Location: here
Posted: 31st Oct 2004 04:56
If you need any more help let me know. renny
Dragonslayer
20
Years of Service
User Offline
Joined: 4th Nov 2003
Location: New Lenox Illinois U.S.A.
Posted: 31st Oct 2004 05:27
ok I have been playing around with that piece of code to see why it works.
I took out your while loop and and just put the sync command only in a do loop and the matrix came up on my screen.

Then I remed out all of the sync code and just got a black screen so that tells me that the sync commands have to be in the program and the sync command before the end of the program has to be in some kind of loop. Is this correct?

dragonslayer
Dodo
20
Years of Service
User Offline
Joined: 8th Aug 2004
Location: eating lunch
Posted: 31st Oct 2004 05:41
yes, this is correct. the matrix and anything else you put on the screen only shows up when you call the sync command. this is because the sync command refreshes the screen, or tells the screen to draw the next picture. if you do not call the sync command then the screen does not draw anything and you will not see anything. . I recommend that you read the tutorials you can find here(for DBC) and here(for DBP) I would suggest that you work through the DBP tuts and then see if you can work through the DBC tuts and change them slightly so that they work in DBP.
hope this helps. Good luck!

Part of solving the problem is actually noticing that the problem is there in the first place

Dragonslayer
20
Years of Service
User Offline
Joined: 4th Nov 2003
Location: New Lenox Illinois U.S.A.
Posted: 31st Oct 2004 05:51
Thanks I will do that. I played around with that matrix code and now have it textured and am going to keep learning matrix commands

Login to post a reply

Server time is: 2024-09-23 04:29:02
Your offset time is: 2024-09-23 04:29:02