Quote:
Originally Posted by ImprisonedPride
Printable View
Quote:
Originally Posted by ImprisonedPride
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
It's pretty simple but gives a very nice effect.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;
}
}
}
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.
hmmm, using point to vector hittests makes it as easy to dodge big asteroids as small ones
nice noetheless
Very nice game. Excellent work =]
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?
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!