Do you want to make a star field??

Talk about making games.

Do you want to make a star field??

Postby Game A Gogo » Sun Sep 25, 2005 1:36 am

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
Programming games is an art,
    Respect it.
User avatar
Game A Gogo
 
Posts: 3466
Joined: Wed Jun 29, 2005 10:49 pm
Location: French Canada *laughs*
Score: 181 Give a positive score

Postby Game A Gogo » Sun Sep 25, 2005 2:07 am

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.
Programming games is an art,
    Respect it.
User avatar
Game A Gogo
 
Posts: 3466
Joined: Wed Jun 29, 2005 10:49 pm
Location: French Canada *laughs*
Score: 181 Give a positive score

Postby Joshua Worth » Sun Sep 25, 2005 2:27 am

Nice
Stay sweet
User avatar
Joshua Worth
 
Posts: 515
Joined: Tue Jul 19, 2005 12:00 am
Location: Stralia
Score: 5 Give a positive score

Postby ondy1985 » Sun Sep 25, 2005 9:24 am

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.
Image

Motto: "I never let my schooling interfere with my education" --- Mark Twain
User avatar
ondy1985
 
Posts: 99
Joined: Thu May 05, 2005 7:43 pm
Location: Slovakia
Score: 1 Give a positive score

Postby Game A Gogo » Sun Sep 25, 2005 10:53 am

Tanx and grat tip :wink:

maybe it will reduce a game from doing error!!
Programming games is an art,
    Respect it.
User avatar
Game A Gogo
 
Posts: 3466
Joined: Wed Jun 29, 2005 10:49 pm
Location: French Canada *laughs*
Score: 181 Give a positive score

Postby ondy1985 » Mon Sep 26, 2005 10:28 am

You're welcome
Image

Motto: "I never let my schooling interfere with my education" --- Mark Twain
User avatar
ondy1985
 
Posts: 99
Joined: Thu May 05, 2005 7:43 pm
Location: Slovakia
Score: 1 Give a positive score


Return to Game Development

Who is online

Users browsing this forum: No registered users and 1 guest