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 / DBC - do loop clears screen

Author
Message
Galyxi
19
Years of Service
User Offline
Joined: 8th Sep 2005
Location: Using DBC
Posted: 24th Sep 2005 00:10


would anyone be able to tell me why if i put a do:loop into this code the screen just goes black?

also when i sent it to someone, they keep getting errors (sent as a .exe) (they are using quite an old pc)

thanks

also, how can i make the camera rotate with mous movement?
TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 24th Sep 2005 00:52
Quote: "
load bitmap "dirt1.bmp",1
get image 1,0,0,50,50
delete bitmap 1
"


Don't do this, just use:

Load Image "dirt1.bmp",1

It's quicker.

Quote: "position matrix 1,-500,-5,-5.5"


You can move the matrix, but I would advise against it for now. Leave it at 0,0,0 and reposition your object/camera. Moving the matrix results in the Get Ground Height command not working as standard.

Not sure what you are doing with the For...Next loops, but it looks like you aren't sure how the command is used. You have 7 Set Matrix Tile commands in each runthrough of the loop. But there are only 4 corners to each tile!

Take a look at the tutorial on matrices here where it's covered:

http://www.computechtenerife.com/DB/tutorials.htm

You would be better using Set Matrix Height instead...

Your program, slightly ammended is below. It works fine for me in DBC - even with the Do...Loop added. I've also added a bit of mouselook code.



TDK_Man

Silent Knight
19
Years of Service
User Offline
Joined: 25th Jan 2005
Location: In Your Mind
Posted: 24th Sep 2005 00:54
so where exactly are you putting the do and loop?
Also, all the make object and make object commands usually come before the do. so the most likely places that you will be putting the loop statements will look like this



otherwise, you are loading the bitmap over and over and over, along with the matrix and the object.

Version--DB Classic
900 mhz AMD Athlon, 128 MB RAM,
16 MB NVidia Vanta gfx card, Windows ME System software

Login to post a reply

Server time is: 2024-09-24 05:25:01
Your offset time is: 2024-09-24 05:25:01