Galaxy Effect
Author: | Dogzer
|
Submitted: | 23rd February, 2006
|
Views: | 5214
| Rated: |
|
|
I'm going to share with you an easy way of creating a 3d Galaxies. Now, there are many ways of making a galaxy, but this example might be easyer than other galaxy methods.
The resolution for this example is a 640*480 window. Pleas adjust the numbers as necessary so the windows size acomodates to this tutorial.
First get a hold of a star gfx, or make one yourself. Animation speed should be around 8 or 10. Around 5 frames should be enough. Set it to ball movement with an initial speed of 0.
You'll need the following events:
I suggest you create "star object" at -100,-100 // I create the stars outside the play area to keep things clean while the positioning is going on
Set X position "star object" to random (640)
Set Y Position "star object" to random (480)
Look in direction of "320,240" // this is half of 640*480, meaning the center of the window
Set direction "star object" to current direction +16
Set speed "star object" to current speed +1
When "star object" leaves playarea: destroy
And there you go. I hope you guys like this article, (hope admins don't delete this one again though, i busted my ass off making an "how to make your game interesting" tutorial but some admin deleted it, too bad he didn't sent me a message telling me why)
Here's a perfect way to create a galaxy, hope you enjoyed it folks.
|
|
Dogzer
Registered 07/02/2011
Points 1029
|