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 / Is there any tutorial to make Loops on the right place?

Author
Message
Silvester
18
Years of Service
User Offline
Joined: 7th Dec 2005
Location: Netherlands
Posted: 5th May 2006 17:38
Because,

i am working on my first program,but i dont know how to place loops...

BTW its a 3D model Viewer im working on.

Your signature has been erased by a mod because it's larger than 600x120...
Pincho Paxton
21
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 5th May 2006 17:44
You put a loop when you want to repeat something over, and over. You would have an idea in your head....

"Hey I am making space invaders. I have 12 aliens on each row!"

You do a for next loop to position them...

Y = 100
X = 64
For n = 1 to 12
X = X + 64
sprite n,x,y,n
next n

A tutorial would not really help with 1 million different situations.

Silvester
18
Years of Service
User Offline
Joined: 7th Dec 2005
Location: Netherlands
Posted: 5th May 2006 18:06
oh well...

its a program that views A 3D model called "Model1.X" and i want it to move it aside.flip it or whatever.BUT the wait Key command doesnt work because it just shuts down then.AND every time i place a loop and end if commands it tells me its out of place...

Your signature has been erased by a mod because it's larger than 600x120...
zenassem
21
Years of Service
User Offline
Joined: 10th Mar 2003
Location: Long Island, NY
Posted: 5th May 2006 18:56 Edited at: 5th May 2006 18:57
you need a main loop
in simplest form it is


or you could have a while loop


Is that what you meant?
Silvester
18
Years of Service
User Offline
Joined: 7th Dec 2005
Location: Netherlands
Posted: 5th May 2006 19:47
Sort of.

so like with the last one i could make it this:



Your signature has been erased by a mod because it's larger than 600x120...
zenassem
21
Years of Service
User Offline
Joined: 10th Mar 2003
Location: Long Island, NY
Posted: 5th May 2006 19:58
exactly. And you could then have your cleanup subroutine to delete any images or models in use.
TDK
Retired Moderator
22
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 11th May 2006 18:07
This might help...

http://www.matedit.com/db.htm

Click on the tutorials button on the left and select:

Dark Basic Programming For Beginners Part 2 - Program Layout Structure And Style

If it looks ike it could be of use to you, I recommend that you read Part 1 first as it covers stuff referred to in Part 2.

TDK_Man

Login to post a reply

Server time is: 2024-11-26 21:38:40
Your offset time is: 2024-11-26 21:38:40