|
Re: Huge Space
[Re: Damarus]
#81469
07/17/06 20:26
07/17/06 20:26
|
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
|
This won't make it endless. It'll just make the area seem huge. For the scene flag, you first need a block with a sky texture assigned to it then define this entity as a sky object. Code:
sky some_sky { ... // sky definition code goes here flags = scene, visible; }
action move_with_camera { some_sky = me; while(!some_sky) { wait(1); // wait until pointer is valid } while(1) { my.x = camera.x/16; // play with the 16 my.y = camera.y/16; my.z = camera.z/16; wait(1); } }
You may need to ent_create the entity to get it to work. For infinite distance, instead of setting the my.x-related stuff, use vec_set(my.x, camera.x) to copy the positions of the camera. This way, the region is infinitely distant all around.
"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: ulillillia]
#81470
07/17/06 22:52
07/17/06 22:52
|
Joined: Apr 2004
Posts: 258 Canada, Nova Scotia
Damarus
OP
Member
|
OP
Member
Joined: Apr 2004
Posts: 258
Canada, Nova Scotia
|
Man this is so confusing it just doesn't work. I don't know how to program anything at all so if you don't mind could you make a small example (it doesn't have to be much just a small demo with that code and sphere where it works) and send it to me? But only if you time of course. I still don't know why it doesn't work. I'm totally confused. That would be really nice. My email is BenK318@hotmail.com. Thx in advance. 
|
|
|
Re: Huge Space
[Re: Damarus]
#81471
07/18/06 00:25
07/18/06 00:25
|
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
|
I'm not testing my code, just basing it off theory. With the camera centered, the entity would be at the same location as the camera. With the camera positioned 1024 quants out from the origin on each axis, the entity would have it's position at 64 quants from the origin on each axis. With this, it simulates that the object is 16 times larger than it actually is. I could make a sample, but I haven't worked with 3D in so long. I'd be using simple textures because, without the texture scaling feature I despirately need, I can't accurately texture something.
"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]
#81473
07/19/06 00:28
07/19/06 00:28
|
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
|
I just made a very simple texture and I'm about done. I wrote the scripts and stuff, I just need to test it and fix any bugs.
"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 - here's the sample
[Re: ulillillia]
#81474
07/19/06 01:09
07/19/06 01:09
|
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
|
Turns out, I was using the wrong formula. Look at my sample, fully modifiable project that explains this effect. I used far more comments than I normally do to help explain what various parts of the code does. Oddly enough, the scene flag isn't working - invalid parameter. Looks like I ran into an issue I encountered earlier (but this time, I have a sky block). Download it here (ZIP file - 418 KB) Edit: changed the subject to indicate I have the sample
Last edited by ulillillia; 07/19/06 01:25.
"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 - here's the sample
[Re: Grimber]
#81476
07/19/06 18:43
07/19/06 18:43
|
Joined: Apr 2004
Posts: 258 Canada, Nova Scotia
Damarus
OP
Member
|
OP
Member
Joined: Apr 2004
Posts: 258
Canada, Nova Scotia
|
First thank you very much ulillillia you are really a great help!!  @ Grimber I have the newest version so I'll try the sample that ulillillia made. EDIT: @ ulillillia This is really just what I need you really get the feeling if it is endless thx again! 
Last edited by Damarus; 07/19/06 18:50.
|
|
|
Re: Huge Space - here's the sample
[Re: Damarus]
#81477
07/19/06 19:33
07/19/06 19:33
|
Joined: Sep 2003
Posts: 4,959 US
Grimber
Expert
|
Expert
Joined: Sep 2003
Posts: 4,959
US
|
try this test out. huge i made it earlier but website host was down to upload it yesterday. i set it up the camera is just screipted to move in the +X direction as grid 'sprites' are layed down along that axis so you get a feel for the size of the level (each square in the sprite is aprox 16 quants a side) the numbers on screen are camera X camera Y camera Z the X coordiante the last grid square sprite is layed down number of 512x512 grids layed down from X=0 -> x > 999999 the inset view is a camera view located at the main camera view but it just rotates around as the main camera moves of this what YOU are after is in the .wdl script: the sky cube definition and the sky_clip = 0; line in function main to get your infinate space
|
|
|
|