Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (AndrewAMD, TedMar, dr_panther), 1,049 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
environnement Scale #290928
09/22/09 13:11
09/22/09 13:11
Joined: Nov 2008
Posts: 26
France
H
Hirogens Offline OP
Newbie
Hirogens  Offline OP
Newbie
H

Joined: Nov 2008
Posts: 26
France
Hi,

My game is based on galaxy view.

My galaxy have between 6 000 to 10 000 stars (sun).
This galaxy must rotate slowly..

do you think it is possible to display completely?
Should I see 6000 or spheres are there some other method cheaper?

regards
Christophe


A7 Commercial License.
http://www.wormhole-the-game.com

AMD64 6000+, GTX 280 2GB, 4 GB Ram, Seven
Re: environnement Scale [Re: Hirogens] #290937
09/22/09 14:37
09/22/09 14:37
Joined: Sep 2008
Posts: 68
T
Tai Offline
Junior Member
Tai  Offline
Junior Member
T

Joined: Sep 2008
Posts: 68
Depends on how close the player gets to the stars. You could probably use a skycube for high-performance.

Re: environnement Scale [Re: Tai] #290939
09/22/09 14:49
09/22/09 14:49
Joined: Jun 2008
Posts: 428
Rasch Offline
Senior Member
Rasch  Offline
Senior Member

Joined: Jun 2008
Posts: 428
This is from the AUM 81.

First write this in your while loop of the playership or whatever you want to have the stars created around.

Code:
action player_ship()
{
   ... // whatever
   while(1)
   {
   star_pos.x = my.x - 500 + random(1000);
   star_pos.y = my.y - 500 + random(1000);
   star_pos.z = 0;
   effect(starfield, 1, star_pos.x, nullvector);

   wait(1);
   }
}



And add following functions to your script.

Code:
function starfield(PARTICLE *p)
{
       p.alpha = 5 + random(50);
       p.bmap = star_tga;
       p.size = 2 + random(1); // generate stars with random sizes
       p.flags |= (BRIGHT | TRANSLUCENT);
       p.event = fade_stars;
}

function fade_stars(PARTICLE *p)
{
       p.alpha -= 0.5 * time_step; // fade out the stars
       if (p.alpha < 0)
       {
               p.lifespan = 0;
       }
}



Now particles are created around the player. You can set the range of the particles also in the depth.

Just change star_pos.x, star_pos.y and star_pos.z to your wishes.

Dont forget if you want to chang the value random always needs the half of itself. Otherwise the stars would be more on one side than another.

Example:

500 + random(1000) // I want to increase the radius

2500 + random(5000) // Hell yeah! Thats some good radius!

Greets

Re: environnement Scale [Re: Tai] #290941
09/22/09 14:50
09/22/09 14:50
Joined: Nov 2008
Posts: 26
France
H
Hirogens Offline OP
Newbie
Hirogens  Offline OP
Newbie
H

Joined: Nov 2008
Posts: 26
France
Hi,

the player must click on the star so I can draw the planet system.

regards


A7 Commercial License.
http://www.wormhole-the-game.com

AMD64 6000+, GTX 280 2GB, 4 GB Ram, Seven
Re: environnement Scale [Re: Hirogens] #290944
09/22/09 14:57
09/22/09 14:57
Joined: Jun 2008
Posts: 428
Rasch Offline
Senior Member
Rasch  Offline
Senior Member

Joined: Jun 2008
Posts: 428
You could use sprites for example. Just pics not models. And give them the actions. Maybe this could work with thousands of entities.

Re: environnement Scale [Re: Rasch] #290987
09/22/09 18:45
09/22/09 18:45
Joined: Nov 2008
Posts: 26
France
H
Hirogens Offline OP
Newbie
Hirogens  Offline OP
Newbie
H

Joined: Nov 2008
Posts: 26
France
Originally Posted By: Rasch
This is from the AUM 81.

First write this in your while loop of the playership or whatever you want to have the stars created around.

Code:
action player_ship()
{
   ... // whatever
   while(1)
   {
   star_pos.x = my.x - 500 + random(1000);
   star_pos.y = my.y - 500 + random(1000);
   star_pos.z = 0;
   effect(starfield, 1, star_pos.x, nullvector);

   wait(1);
   }
}



And add following functions to your script.

Code:
function starfield(PARTICLE *p)
{
       p.alpha = 5 + random(50);
       p.bmap = star_tga;
       p.size = 2 + random(1); // generate stars with random sizes
       p.flags |= (BRIGHT | TRANSLUCENT);
       p.event = fade_stars;
}

function fade_stars(PARTICLE *p)
{
       p.alpha -= 0.5 * time_step; // fade out the stars
       if (p.alpha < 0)
       {
               p.lifespan = 0;
       }
}



Now particles are created around the player. You can set the range of the particles also in the depth.

Just change star_pos.x, star_pos.y and star_pos.z to your wishes.

Dont forget if you want to chang the value random always needs the half of itself. Otherwise the stars would be more on one side than another.

Example:

500 + random(1000) // I want to increase the radius

2500 + random(5000) // Hell yeah! Thats some good radius!

Greets


thanks,

I go adapt this example
My galaxys are fixe coordinate and fixe magnitude.

regards


A7 Commercial License.
http://www.wormhole-the-game.com

AMD64 6000+, GTX 280 2GB, 4 GB Ram, Seven
Re: environnement Scale [Re: Hirogens] #290988
09/22/09 18:51
09/22/09 18:51
Joined: Nov 2008
Posts: 26
France
H
Hirogens Offline OP
Newbie
Hirogens  Offline OP
Newbie
H

Joined: Nov 2008
Posts: 26
France

but I canit click on particle ???

regards


A7 Commercial License.
http://www.wormhole-the-game.com

AMD64 6000+, GTX 280 2GB, 4 GB Ram, Seven

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | 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