3 Vars on 3D games
Hello,
here is the tutorial I promised, it lacks graphics or formulas. Iam not a math or nor a graphic pro
What you will “learn”:
Normaly, in a 3D game, for example in a 3D MMORPG. You use some variables to set and set positions of heroes. And in which direction they look. This could like this:
Y13,X12, Z16
This is the postion, but cause it is 3D you need to know, in which direction the hero is looking into ( at). Normally this also a 3D position, lets say:
Y12, X13, Z15
With the system I will try to explain. You could set position and direction in which the hero looks at with only three variables. Two are for postion. And one is for the direction looking into.
This could look like: 130A, 13B, 200C ( Lets call it a,b, c)
Lets start with a globe ( Or a ball ) in middle we set a point. ( In xyz i could be something like: oY, 0X ) This point is where verything starts. From this point we draw “endless” lines to the end of the globe/ ball. Every line gets a number.
The Number “1″, is the out “Ball” position. While the Number two is the “Line” number. So the upper line cold be called 1,1. But we dont need the line number. We just need the “outer” Number. Now we just need the position: Lets say from middle top end of globe is 1000 pixel. The middle would be: 500px. Now we could set a postion in a 3D world with two numbers:
This could look something like this:
Here we have: Line number, 1 and postion 400. We would get: 1A, 400B. Now lets say the heroe looks at bottom to line nuber 2. We would get: 1A, 400B, 2C
With this system you can even further reduce the variables needed: Just send “moving” information of the object: Example: 1A, 400B, 2C moves to 4C, 400 px per sec. I would suggest something like: 1A, 400B, 2C, then two times moving information: 5C, 400pxs, 6C, 350pxs, then position: 15A, 330B, 3C and so on…
DRAWBACKS: Many calculations on client side: Well a joy for fast and multi core CPUs. The bigger the globe and closer to middle. We will get Many line numbers which would be “true”. But I think here we can use quantum mechanic laws? Maybe?
The rest is up to you, if you have questions feel free to post them. If you devlop the formula for this. Do whatever you want to do with it -_- ( GoodGood reviews
would be if you share this information, but well…. )














