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 / Anyone using new DB book, QUESTION!!!

Author
Message
stormtrooper
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: United States
Posted: 9th Apr 2003 22:23
I would post this question on the yahoo group for the book but the last post I did there on March 10 still has not been answered! I did send a e-mail to the author and got a response a few days later, thinking I may get a faster response here!

I'm on chapter 10, the current bitmap program starting on page 286. I
understand most of the code but I'm having 2 problems

1. the LOAD BITMAP "circles.bmp", source command, I'm not sure what source is for?
2. On page 287 the command
COPY BITMAP source, N*32, 0, N*32+31, 32, N, 0, 0, 32, 32

I understood the command the way it was explained in the book but this command I don't understand, N*32 0,N*32+31

I know N is a variable for 1 To maxballs but I don't understand why it is being mutliplyed by 32 or why it is being mutliplyed by 32 then adding 31 to it

I have found in most books the commands are explained ok but when they use them there are alot of extra numbers and formulas in the commands that are never fully explained and that makes it hard for a noob to understand!

any help would be great If anyone without the book needs code let me know.

any help would be great, thanks
Scott Wolfe
indi
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 9th Apr 2003 22:33
in layman terms its jumping a window along 32 pixels each time that creates the cells for the sprite animation

[][][][][] see these little boxes imagine they are the cells or photos that make up the animation

the 31 is the width of the image your grabbing.

provided your strip of cells is 32 pixels for each cell it will work and provided its the same horizontal or vertical setup.

stormtrooper
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: United States
Posted: 9th Apr 2003 23:01
I think I got it I changed the 32 in 32+31 to 30 and it cut a side off the image and enlongated it. I'm still not clear on the 31, I changed it to 29 and saw no change

source=31 is the pixel width of the image being stored in source, I only changed it in the copy bitmap command but did not change the variable if that will do anything will try it!!!

Scott Wolfe
indi
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 10th Apr 2003 04:15
make an image thats horizontally wide and divisible by 32

place markers on your image to represent every 8 pixels.

as u tinker u will see it change.

FurEffect
21
Years of Service
User Offline
Joined: 7th Mar 2003
Location:
Posted: 10th Apr 2003 04:24
hmm something sid meir said once was when adjusting values in your code be drastic (ie change 32 to 2) and then see the outcome.. fine tune later. I guess this method means that by changing the value alot you will be able to see hwat it does because the way the game plays will be diffrent......that may have of made no sence as its really late, but if you read it carfully this could soon be your defult method of adjusting values. lol not like its a big thing tho. Man I need sleep.

DaZ

"There is only two ways of this island, the first is in pieces and the seconds with me." -(ReX/DaZ)

Login to post a reply

Server time is: 2024-11-24 09:49:30
Your offset time is: 2024-11-24 09:49:30