|
-
Pumpkin Carving 2008
 Originally Posted by ImprisonedPride
...
What sort of function do you use, pray-tell, to create that starry background?
The 'Boose':
ASUS Sabertooth P67 TUF
Intel Core i7-2600K Quad-Core Sandy Bridge 3.4GHz Overclocked to 4.2GHz
8GB G.Skill Ripjaws 1600 DDR3
ASUS ENGTX550 TI DC/DI/1GD5 GeForce GTX 550 Ti (Fermi) 1GB 1GDDR5 (Overclocked to 1.1GHz)
New addition: OCZ Vertex 240GB SATA III SSD
WEI Score: 7.6
-
Software Developer
For the stary background here is what I did.
1. Created a 2x2 pixel star. Named it Star and exported it for actionscript.
2. In my main code I have the following Code
Code:
var Star_Holder : Object = _root.createEmptyMovieClip("StarClip", _root.getNextHighestDepth());
function Star_Create(){
for (stars=0;stars<100;stars++) {
var _temp : Array = Util_MakeRandomPos();
depth = Star_Holder.getNextHighestDepth();
var s = StarClip.attachMovie("Star", "Star_" + depth, depth);
s._x = _temp[0];
s._y = _temp[1];
s.Die = Math.round(1 + Math.random() * 10);
s.gotoAndStop(2);
s.onEnterFrame=function(){
this._alpha -= this.Die;
if (this._alpha < 0 || this._alpha > 100)
this.Die *= -1;
}
}
}
It's pretty simple but gives a very nice effect.
Post you game for free at Gamestack.org. We send the user straight to your website, no iFrames or other leeching methods.
Please check out Gamestack.org for more information.
-
Pumpkin Carving 2008
Wow, yeah that works really well. I have to work now, but I'm going to try to add a chunk of code later to randomly give it either a (very) light red/blue/yellow/white tint so it looks more gassy like you'd really see in the night sky. Thank's a lot for that code mickm.
The 'Boose':
ASUS Sabertooth P67 TUF
Intel Core i7-2600K Quad-Core Sandy Bridge 3.4GHz Overclocked to 4.2GHz
8GB G.Skill Ripjaws 1600 DDR3
ASUS ENGTX550 TI DC/DI/1GD5 GeForce GTX 550 Ti (Fermi) 1GB 1GDDR5 (Overclocked to 1.1GHz)
New addition: OCZ Vertex 240GB SATA III SSD
WEI Score: 7.6
-
Please, Call Me Bob
hmmm, using point to vector hittests makes it as easy to dodge big asteroids as small ones
nice noetheless
-
Very nice game. Excellent work =]
-
Please, Call Me Bob
make the stars move...its not hard to make a starfield in photoshop (which i just happen to have), would you like me to send such an image, or do you prefer getting them oof google?
-
file not found
An interesting addition might be that if you don't get junk for long enough, you start to lose energy, once you lose energy, you die. I suppose then that running into an asteroid would also make you lose only a certain amount of energy.
nice addictive-type gameplay, but definitely add sound, fast-paced music specifically.
keep it up!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|