Page 1 of 1

Do you want to make a star field??

PostPosted: Sun Sep 25, 2005 1:36 am
by Game A Gogo
Here an E-Z way to do one:

1.create a image of one pixel white and then save it to PNG (The image file must be of 1 x 1 size to work prperly)
2.create an actor called:Star_field_Generator
3.on create event change the visible state to: Dont draw but alowd event.
4.on create event create a timer called: Star_Field, and make it last for at lest 400 MS.
5.Create an actor called:Stars
6.on create event use this script:
Code: Select all
angle=1+(rand(359));
Directional_Velocity=1+(rand(5));

7.on Out of Vision, use destroyd event actor (to prevent from the stars to uses to much memory)
8.now on the Star_field_Generator actor, on timer event (The Star_Field timer), make a script:
Code: Select all
CreateActor("Stars","THE IMAGE FILE NAME",and bla bla bla);
CreateActor("Stars","THE IMAGE FILE NAME",and bla bla bla);
CreateActor("Stars","THE IMAGE FILE NAME",and bla bla bla);
CreateActor("Stars","THE IMAGE FILE NAME",and bla bla bla);
CreateActor("Stars","THE IMAGE FILE NAME",and bla bla bla);
CreateActor("Stars","THE IMAGE FILE NAME",and bla bla bla);
CreateActor("Stars","THE IMAGE FILE NAME",and bla bla bla);
CreateActor("Stars","THE IMAGE FILE NAME",and bla bla bla);
CreateActor("Stars","THE IMAGE FILE NAME",and bla bla bla);
CreateActor("Stars","THE IMAGE FILE NAME",and bla bla bla);
CreateActor("Stars","THE IMAGE FILE NAME",and bla bla bla);
CreateActor("Stars","THE IMAGE FILE NAME",and bla bla bla);
CreateActor("Stars","THE IMAGE FILE NAME",and bla bla bla);
CreateActor("Stars","THE IMAGE FILE NAME",and bla bla bla);
CreateActor("Stars","THE IMAGE FILE NAME",and bla bla bla);
CreateActor("Stars","THE IMAGE FILE NAME",and bla bla bla);
(For the create event try to go to: Variable/Action button)

and thats all :)

For any feedsback are appreciated :D

PostPosted: Sun Sep 25, 2005 2:07 am
by Game A Gogo
This is what its should look like:
Windows
Linux
Pcket PC

Note:
You have to copy the link location to the address bar for uwnow reason.

PostPosted: Sun Sep 25, 2005 2:27 am
by Joshua Worth
Nice

PostPosted: Sun Sep 25, 2005 9:24 am
by ondy1985
In the number 8 I would use:
Code: Select all
int i;
for (i = 0; i < 16; i++) CreateActor("Stars","THE IMAGE FILE NAME",and bla bla bla);


It does the same thing as yours but with much less code.

PostPosted: Sun Sep 25, 2005 10:53 am
by Game A Gogo
Tanx and grat tip :wink:

maybe it will reduce a game from doing error!!

PostPosted: Mon Sep 26, 2005 10:28 am
by ondy1985
You're welcome