Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
2 registered members (TipmyPip, 1 invisible), 18,731 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Unlimited space / starfield ? #9222
05/30/02 22:32
05/30/02 22:32

A
Anonymous OP
Unregistered
Anonymous OP
Unregistered
A



Heya,

I'm interested in starting a space sim project. I'd like to make a game like FreeSpace and Wing Commander and I need to know if it's possible to let the player fly through a seemingly unlimited galaxy?

How can I create stars moving at certain speeds (related to the velocity of your spaceship) and how can I keep planets ALWAYS away at a certain distance?

Thanks for your time.

--Erwin

Re: Unlimited space / starfield ? #9223
05/31/02 00:51
05/31/02 00:51

A
Anonymous OP
Unregistered
Anonymous OP
Unregistered
A



For the moving stars I'ld need a better description of what you want. Should the stars be moving with the player, or should they appear to stay in place? Are they moving at the same speed as the player, or are you after some sort of parallax effect? Note that I've not played the games you mentioned.

As for the second question, easily done. First, establish a pointer to the player entity. Then, in the action for a planet, update it's position like so every frame:

my.x = player.x;
my.y = player.y;
my.z = player.z;

-Joe Hocking
www.3darteest.com

Re: Unlimited space / starfield ? #9224
05/31/02 02:51
05/31/02 02:51

A
Anonymous OP
Unregistered
Anonymous OP
Unregistered
A



Search the boards for something space ... there were definitely a couple of good thread I saw on this.

If you are a programmer type, then you could go down the road of having the spaceship stay stationary and the world moves around it. The speed of the entities moving will be a factor of their distance from the ship. The benefit is you can easily create a basically infinite universe.

The stars will probably be made up of a sky dome that is black with stars ... these are for the very distant stars that don't move. Combine this with particles that will whiz by the ship depending on the velocity - these are the near stars the ship is passing. Maybe even some very simple sprite entities for medium distance stars the shipping is moving by but no so fast as to make sense to use particles. With particles you can easily create a smear type afect for when they hit a worm hole!!!

These are just directions to go in ... my game isn't a space game but we have the inifinite world and starting out we just had a solid block sky and it was very obvious to us a space sim could be esily done with this approach - and we wouldn't be pulling our hair trying to make our terrain seamlessly match up either!!!

Good Luck.

Re: Unlimited space / starfield ? #9225
05/31/02 03:02
05/31/02 03:02

A
Anonymous OP
Unregistered
Anonymous OP
Unregistered
A



in the space flight tutorial you have a star shpere moving along with your ship inside. is that what you want?

loler

Re: Unlimited space / starfield ? #9226
11/10/02 11:44
11/10/02 11:44
Joined: Aug 2002
Posts: 572
Toronto
MadMark Offline
User
MadMark  Offline
User

Joined: Aug 2002
Posts: 572
Toronto
I'm trying to modify my space level. I want to have a particle generator located about 500 quants in front of the player's ship, no matter what direction he/she faces. I think this is what the original poster was looking for too.

I've tried to use vec_set(mytemp,player.pos)

Then add 400 to "mytemp"s x, y, & z, in a while (1) loop, but none of these seems to make it follow the player and throw stars at 'em.

Anyone got a solution?

code:
  
ACTION seeing_stars
{
WHILE(1)
{
vec_set (mytemp, player.pos);
mytemp.x = player.x + 400;
mytemp.y = player.y;
mytemp.z = player.z;
EMIT point_emit,mytemp,emitter;

WAIT(point_var);
}
}




People who live in glass houses shouldn't vacuum naked.
Re: Unlimited space / starfield ? #9227
11/10/02 12:02
11/10/02 12:02
Joined: Nov 2001
Posts: 1,402
U.S.A.
NoelCower Offline
Expert
NoelCower  Offline
Expert

Joined: Nov 2001
Posts: 1,402
U.S.A.
Try adding a vertice, on the model, that is rougly 500 quants in front of your player then do something like this:

vec_for_vertex(temp,my,vert#);
effect(effectstuffthatgoesinhere);

There is a good example of the above stuff in the WDL manual.

That is the only thing I can think of ATM so if that doesn't work then I sure won't know what will.


Noel R. Cower Portfolio Athlon 64 3000+, 1GB RAM, 400GB HDD, Radeon X800 XT Onboard Realtek 7.1 Audio, WinXP Home SP2, Slackware 10.0
Re: Unlimited space / starfield ? #9228
11/10/02 12:23
11/10/02 12:23

A
Anonymous OP
Unregistered
Anonymous OP
Unregistered
A



if you're using a first person view you can use vec_for_screen to get something directly in front of the player

my.x is relative to the world, not the player.

Afaik only the move and ang_rotate commands are relative to the player. You could move the generator(vec_set - don't forget its angle) to the player and move it out 400 quants right after. If it's set to ignore everything it shouldn't slow the game down much.

Wildcard, would that mess up collisions?

Re: Unlimited space / starfield ? #9229
11/10/02 13:56
11/10/02 13:56
Joined: Nov 2001
Posts: 1,402
U.S.A.
NoelCower Offline
Expert
NoelCower  Offline
Expert

Joined: Nov 2001
Posts: 1,402
U.S.A.
Old Dude: Yes it would, but there is a workaround for that. You could model a box (yes, a box) and then use that as the bounding box (make the player passable and the bounding box invisible). You can just as easily place a vertice on the bottom of the player model too, giving the box a position to lock onto.

Although I am unsure of exactly how that method would work I also believe you can adjust the bounding box via scripting, but I have no clue (so far) if you can.


Noel R. Cower Portfolio Athlon 64 3000+, 1GB RAM, 400GB HDD, Radeon X800 XT Onboard Realtek 7.1 Audio, WinXP Home SP2, Slackware 10.0
Re: Unlimited space / starfield ? #9230
11/28/02 05:36
11/28/02 05:36
Joined: Aug 2002
Posts: 572
Toronto
MadMark Offline
User
MadMark  Offline
User

Joined: Aug 2002
Posts: 572
Toronto
Thanks guys, for the help.

I'm going to try the vec_for_screen method. Sounds interesting. This one is eye-candy, so it'll have to wait until I get some of the other kinks worked out first.

Mark


People who live in glass houses shouldn't vacuum naked.

Moderated by  HeelX, Spirit 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1