[Papervision3D] ok, hey, let's play in 3D space, shall we?

John Grden neoriley at gmail.com
Sat Feb 10 00:30:32 EST 2007


I see what you're saying but how would roll angle only help?  are you just
saying that if we calculate old and new coordinates, that we should be able
to ascertain their direction?  And yeah right now, the method I used to
"move" the ship is "moveForward()" - so, once the direction is solved, we
can simply apply the velocity they send

is that about right?


On 2/10/07, jakelewis <jakelewis at blueyonder.co.uk> wrote:
>
>  If you are really short on bandwidth, then just the X, Y and Z positions
> and a roll angle would be enough for each client. The direction of the ship
> could be calculated as the vector from its previous position to its current
> position. Then the roll angle would be used as the rotation from the
> world (make that universe) axis.  This assumes that space ships only go in
> the direction that they are pointing, and things would be a bit underfined
> for a ship spinning whilst hovering still in space.
>
> But its 1/3 of the bandwidth, or 3 times the update rate :)
>
> Jake
>
> -----Original Message-----
> *From:* Papervision3D-bounces at osflash.org [mailto:
> Papervision3D-bounces at osflash.org]*On Behalf Of *David Rorex
> *Sent:* Friday, February 09, 2007 4:48 PM
> *To:* Papervision3D at osflash.org
> *Subject:* Re: [Papervision3D] ok, hey, let's play in 3D space, shall we?
>
> Simple way to improve the 'jumping':
>
> Right now, I assume you are simply sending x,y,rot values.
> In addition, also send their velocity values, and have the clients move
> the other players ships inbetween updates from the server.
>
> For example:
>
> --> indicates data from server
>
> Frame 0: -->x=10, y=10, vX=1, vy=0
> Frame 1: x=11, y=10
> Frame 2: x=12, y=10
> Frame 3: x=13, y=10
> Frame 4: x=14, y=10
> Frame 5: -->x=16, y=10, vX=2, vy=0
> Frame 6: x=18, y=10
> Frame 7: x=20, y=10
> Frame 8: x=22, y=10
> Frame 9: x=24, y=10
>
> So we only recieved two updates from the server, but on each frame, we add
> the value of 'vX' into the object's X value. There will still be jumps of
> course due to lag, or if the player is turning, but it will end up being a
> lot smoother overall.
>
> // recievving an update from server
> function onRecieveData(id, x,y,vx,vy) {
>   var ship = ships[id];
>   ship.x = x; ship.y = y; ship.vx = vx; ship.vy = vy;
> }
>
> // run every frame to update ship positions
> function onEnterFrame() {
>   for(i in ships) {
>     ships[i].x += ships[i].vx;
>     ships[i].y += ships[i].vy;
>   }
> }
>
> -David R
>
> PS: Greetings PV3d, this is my first post to the list :)
>
> On 2/9/07, John Grden <neoriley at gmail.com > wrote:
> >
> > yeah it's beyond me as well ;(
> >
> > On 2/9/07, Tim Knip <tim.knip at gmail.com> wrote:
> > >
> > > Yeah, serverside is needed to do things right so it seems. Server
> > > needs a 'history' of client frames for lagging stuff I just read.
> > > Alas, have to decline: java/ red5 is beyond me  ;-)
> > >
> > > _______________________________________________
> > > Papervision3D mailing list
> > > Papervision3D at osflash.org
> > > http://osflash.org/mailman/listinfo/papervision3d_osflash.org
> > >
> >
> >
> >
> > --
> > [  JPG  ]
> > _______________________________________________
> > Papervision3D mailing list
> > Papervision3D at osflash.org
> > http://osflash.org/mailman/listinfo/papervision3d_osflash.org
> >
> >
>
> _______________________________________________
> Papervision3D mailing list
> Papervision3D at osflash.org
> http://osflash.org/mailman/listinfo/papervision3d_osflash.org
>
>


-- 
[  JPG  ]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://osflash.org/pipermail/papervision3d_osflash.org/attachments/20070210/a496eb4d/attachment-0001.htm


More information about the Papervision3D mailing list