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 / tutorial eight (help please)

Author
Message
viperjay
21
Years of Service
User Offline
Joined: 19th Dec 2002
Location: United States
Posted: 23rd Jan 2003 01:45
Hi, in tutorial 8 for db classic

Could someone explain the Get statement in that example please. Here is what I think it does, divides the runner.bmp into parts and then copies each frame into memory,but what is confusing me is why does he or she use 7, 89 , 120 when the the bmp is 640 x 240
PiratSS
22
Years of Service
User Offline
Joined: 18th Oct 2002
Location:
Posted: 23rd Jan 2003 02:53
Look at it this way:

you have 640 x 240 field.

Can you walk on areas that are 7, 89 or 120? yes you can, but you can't walk outside those boundries, not unless you tell darkbasic they exist.

so we have 640 x 240 field. and on that field in the center, we have a person that is 20 m wide !

so, how will you get him?

hope that helps.

Hint: divide the field into smaller parts

I am the greatest thing since sliced bread!!
viperjay
21
Years of Service
User Offline
Joined: 19th Dec 2002
Location: United States
Posted: 23rd Jan 2003 04:25
what do you mean by "we have a person that is 20 m wide" ? what does the m stand for ? meters ? pix's ?
are you saying divide 20 into 640 and then 20 into 240 ? Help Please!!! this is confusing to me
indi
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 23rd Jan 2003 05:57
take some grid papaer.
cut it in half

on one sheet draw a square like 4x4 of the grid tiles.
then do a row of them like 5 in a row.

place down the x and y dimensions and number each part of the grid a pixel or a unit measure across and down


u dont need this but but it helps
now with scissors cut out a 4x4 window into the other piece
trim back all the sides of this window peice except for the bottom to hang onto.


slide this window over the row of squares u made.

this is effectivley what the computer is doing.

u can calculate easily now where to move the window to
when u have a diagram in front of you.

relate this to the size of your image tile and the even division number and u should be flyin.

viperjay
21
Years of Service
User Offline
Joined: 19th Dec 2002
Location: United States
Posted: 23rd Jan 2003 06:16
I need more of a graphic version of what your saying please.
indi
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 23rd Jan 2003 08:13
here u go



viperjay
21
Years of Service
User Offline
Joined: 19th Dec 2002
Location: United States
Posted: 28th Jan 2003 21:40
PiratSS and indi , Thank you for your time. I still have questions ... but I didn't want to appear rude by not saying thanks
indi
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 29th Jan 2003 10:34

Login to post a reply

Server time is: 2024-11-23 23:33:41
Your offset time is: 2024-11-23 23:33:41