[futurebasic] Re: [FB] Physics...

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : November 2000 : Group Archive : Group : All Groups

From: Stephen Botting <cauldron@...>
Date: Sat, 25 Nov 2000 12:16:36 +1300
Ok, here's the way I've got one working, my model was based on 24 
angles, 15 degrees per angle.

I created an array with 24 slots, this was my speed array

eg. DIM speed!(24)

I found that using non-whole numbers was best for controlling speed.
I simply made it that when the ship boosted in a new direction it 
added that acceleration to the angle that it was facing.

eg. speed!(10) = speed!(10) + 0.1

Now take the ships location say X , now some you add the speed for 
each angle to the location.  Then all the different speeds ether end 
up balancing each other, or not, thus creating the speed.
The import thing to note here that there you do this all for BOTH 
axis of the ships location.

If you would to see a demo of this in action you can download the 
compiled version from ftp://ftp.43south.co.nz/cw.sit.bin

I kind of lost effort for this project and I'm deeply considering 
making the code public.

I found that my model worked quite well for what I wanted.


Stephen


>Aside from being bad at math, I happen to be bad at physics... and 
>just about anything else that requires thought... so those in ample 
>supply please help a bit ;)
>
>Ok. Heres the scenario.  You have a ship. We'll call it A 'cause I 
>am creative.  So Ship A zooming along at SPEED in a certain 
>direction ANGLE.  Now, ship A decides to turn ANGLE2 and fire its 
>boosters with a SPEED2.  Now, exactly what angle would this 
>so-called ship A be at, and what speed (ever played EV, Steel 
>Fighters, or just about any other nice ship-combat game)?
>
>If any of u are like me (scary thought), then a picture would 
>probably help.  Take a look at this lil jpeg.
>
>This shows that the ship is going straight to the right at an 
>arbitrary speed of say.. 10.  Then this little ship turns 90 degrees 
>and fires its boosters worth 5 speed.  Where in the world is it 
>going now, and how fast?
>
>I've given it some thought (don't assume anything about my 
>"knowledge", however) and there are a few rather chaotic, abstract, 
>and slow ways that I could... but surely theres a simple, fast 
>method.
>
>Starships up until now has been inertia-less.  You spin your ship 
>and you automatically go that fast in that direction.  No loss of 
>speed or heading. However, I decided recently (cough cough today) to 
>add gravity wells.   Fun, but that sort of messed up navigation with 
>the system I was using.
>
>Anyway, thanks just for reading this far.
>
>-Peter Dempsey
>_____________________________________________________________________ 
>________________
>Get more from the Web.  FREE MSN Explorer download : http://explorer.msn.com
>
>
>--
>To unsubscribe, send ANY message to <futurebasic-unsubscribe@...>

_____________________________________________________
This message was sent to you from cauldron@...
Visit 43south Productions @ http://www.43south.co.nz
43south Productions - Software for MacOS Computers.
PanZee - http://www.43south.co.nz/products/panzee
GridZone - http://www.43south.co.nz/products/gridzone
_____________________________________________________