• Create Account

# ChristerSwahn

Member Since 09 May 2012
Offline Last Active Apr 07 2014 05:14 AM

### common client/server IO volume & rates

09 July 2012 - 02:11 AM

I'm curious as to what are "usual" client/server data volume, throughput rates and tick/update frequencies nowadays. (In realtime multiplayer games.)

It would be interesting to hear reasons for or against higher number of smaller updates per second versus lower number with greater size.

Would anybody like to share their experience on this?

### Optimal representation of direction in 3D?

02 July 2012 - 03:12 AM

In my 3D logic I'm somewhat annoyed by the inefficiency and (mostly theoretical) risk of inconsistent values in representing 3D directions with 3-valued vectors as I am doing. (I write theoretical since the code is stable, but still.)

I'm probably not going to rewrite it but I'm intrigued by the problem, what is the optimal way to represent a direction in 3D, i.e. with as little space, redundancy and invalid value cases as possible, and if possible no normalization checks and renormalization operations needed?

(With direction I mean just the direction, i.e. not including position in space nor any roll (rotation around the direction vector itself). For instance a line (ray) can be represented by a point and a direction.)

An idea is to use a rotation in the x-y-plane (represented by a signed int A that is the nominator in the fraction A/PI, giving the interval [+- PI]), plus a half-circle rotation in z-space (represented by a signed int B in B/(PI/2), giving the interval [+- PI/2]). There are no invalid nor un-normalized values so that's good. But it's not fully optimal in terms of bit representation:
- the z-space-rotation has twice the angular precision of the x-y-rotation which is a little irregular,
- even more irregular is that the closer the direction gets to the Z axis the greater the angular precision,
- at the directions +Z and -Z, A has no meaning (all values of A are equally valid).

And using this representation in actual 3D code seems less than efficient. Every time it's used two divisions and floating point conversions seem to be required. And how would you efficiently apply an arbitrary rotation to it?

### Computing space travel

09 May 2012 - 02:12 PM

How can a 3D-autopilot be implemented in a space opera game? In other words, how do you compute the optimal trajectory from A to B in a solar system using classical mechanics?

I solved this problem for the game I'm working on. I haven't found any other solution descriptions to this problem so I wrote an article about it in case others might find it of interest.

Also, there are posters here with deep knowledge in physics simulations and it would be very interesting to hear any comments.