1 registered members (7th_zorro),
793
guests, and 1
spider. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: Huge Space
[Re: Damarus]
#81463
07/16/06 16:14
07/16/06 16:14
|
Joined: Feb 2003
Posts: 6,818 Minot, North Dakota, USA
ulillillia
Senior Expert
|
Senior Expert
Joined: Feb 2003
Posts: 6,818
Minot, North Dakota, USA
|
You could also move the object at a slightly slower speed than the camera. This would allow for perspective effects, but instead of apparently being 65,536 quants diameter, you could simulate something over 1 million quants diameter by making it move 15/16 as fast as the camera: Code:
my.x = camera.x/16; my.y = camera.y/16; my.z = camera.z/16;
So, rather than the object being 1024 quants away from moving 1024 quants, it'd only change by 64 quants from moving 1024 which gives the sense of a huge distance.
"You level up the fastest and easiest if you do things at your own level and no higher or lower" - useful tip
My 2D game - release on Jun 13th; My tutorials
|
|
|
Re: Huge Space
[Re: Damarus]
#81465
07/16/06 21:58
07/16/06 21:58
|
Joined: Feb 2003
Posts: 6,818 Minot, North Dakota, USA
ulillillia
Senior Expert
|
Senior Expert
Joined: Feb 2003
Posts: 6,818
Minot, North Dakota, USA
|
What this does is moves the entity at a speed slightly slower than that of the camera. With the camera at 65,536 as the position, the entity would've only moved 4096 quants from the start which isn't much at all. Increase the scaling, it would've only moved 1024 if the 64 was used instead of 16 making it seem 4 times further away. Another example - if the camera was moving 64 quants per frame, the sky model would only move 4 quants per frame. You'd have the code like this to get it to work: Code:
action move_with_camera { while(1) { my.x = camera.x/16; // play with the 16 my.y = camera.y/16; my.z = camera.z/16; wait(1); } }
Increasing the number being divided by makes the sky sphere seem bigger. 16 means 16 times bigger thus, if the sky sphere was 1024 quants in diameter, this would simulate a diameter of 16384 quants. Change the 16 to 64 and the same sky sphere would simulate a diameter of 65,536. Edit: didn't properly copy/paste message from Notepad - stupid browser tabbing bug....
Last edited by ulillillia; 07/16/06 22:05.
"You level up the fastest and easiest if you do things at your own level and no higher or lower" - useful tip
My 2D game - release on Jun 13th; My tutorials
|
|
|
Re: Huge Space
[Re: Damarus]
#81467
07/17/06 16:57
07/17/06 16:57
|
Joined: Feb 2003
Posts: 6,818 Minot, North Dakota, USA
ulillillia
Senior Expert
|
Senior Expert
Joined: Feb 2003
Posts: 6,818
Minot, North Dakota, USA
|
It works with entities as well. I did something similar with my 3D game's clouds. Because I had an offset to get the clouds 2 miles high (I'd be level with them at 84,480 quants for the Z position), I had to make a few modifications, but this is the simplest it gets. You assign the action to the sky sphere. I suggest adding the scene flag to your sky sphere or strange things may happen.
"You level up the fastest and easiest if you do things at your own level and no higher or lower" - useful tip
My 2D game - release on Jun 13th; My tutorials
|
|
|
|