A Flash Developer Resource Site

Page 2 of 2 FirstFirst 12
Results 21 to 27 of 27

Thread: [F8] [Release] Junk Collector

  1. #21
    Pumpkin Carving 2008 ImprisonedPride's Avatar
    Join Date
    Apr 2006
    Location
    Grand Rapids MI
    Posts
    2,377
    Quote 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

  2. #22
    Software Developer mickm's Avatar
    Join Date
    Sep 2006
    Location
    Kingston [ON]
    Posts
    115
    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.

  3. #23
    Pumpkin Carving 2008 ImprisonedPride's Avatar
    Join Date
    Apr 2006
    Location
    Grand Rapids MI
    Posts
    2,377
    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

  4. #24
    Please, Call Me Bob trogdor458's Avatar
    Join Date
    Aug 2006
    Location
    Pensacola, FL
    Posts
    915
    hmmm, using point to vector hittests makes it as easy to dodge big asteroids as small ones

    nice noetheless

  5. #25
    Member
    Join Date
    Nov 2006
    Posts
    93
    Very nice game. Excellent work =]

  6. #26
    Please, Call Me Bob trogdor458's Avatar
    Join Date
    Aug 2006
    Location
    Pensacola, FL
    Posts
    915
    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?

  7. #27
    file not found Captain_404's Avatar
    Join Date
    Apr 2006
    Posts
    457
    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
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center