July 21, 2005 at 12:48 pm #27187
July 21, 2005 at 12:48 pm #27188
It has something to do with breaking the steps in such a way that you end up at the point where the cursor was pressed down.
July 21, 2005 at 3:16 pm #27189
You need to move along a line so you will have to end up using some form of a linear equation. All of the standard line equations will always end up giving you rational numbers. This is a problem since you need to specify pixel cooridinates with integers only. If you want to use y = mx + b then you would always end up with at least a few rationals in between the endpoints. You could just round up or down with those cases, but that would make for very jerky line movement, especially when the slope is really close to 0 or undefined.
I think what you need to check out is something called “Bresenhams line drawing algorithm”. I am pretty sure it’s even what Ken used back when he made the first Sierra interpreter. You can find plenty of stuff on Google about it. It’s kind of difficult to understand at first, or at least it was for me anyway. All it does is gives a programmer a way to draw a line on the screen, or move an object along a line path, with only using integer numbers. It is pretty much the standard i think. i hope you find this helpful. let me know if you have any questions about it. good luck.
August 3, 2005 at 12:31 pm #27190
working with notepad. The attached zip file includes two web pages and the related images.
One is a funny spoof on Ken and Roberta’s new boat. The second one is an improved object mover
for the web game.
I have been able to slow down the object motion for a walk sequence to the
cursor location. But, it only works once in the positive x direction. I will later swap out
images to imitate a walk.
I would like to create a new Laura Bow game after the great writings of one of this sites member/guest “Laura Bow: Night of the Opera”. Anyone is welcome to use the code or improve on. After the enginee is created, I will work on the story board and then pictures. Unfortunately, in Paint.
August 8, 2005 at 12:44 pm #27191
Brandon is it OK to post this test project on this web site?
August 9, 2005 at 6:24 pm #27192
Yeah, it’s OK as long as your files aren’t too big. I haven’t checked it out, but if Ken has any objections I’m sure you’ll hear about it. If your files start getting big, you’ll have to host them yourself.