User Tag List

Results 1 to 4 of 4

Thread: Scrolling starfield

  1. #1
    No Products Registered

    Join Date
    May 2009
    Posts
    34
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Scrolling starfield

    I'm sure this has been answered before but can't find a relevant topic. I'm trying to work out the best way to achieve a simple background starfield effect for a space-shooter.

    Do I need to create a large bitmap and add that as an active object, move it down slowly and then wrap it around when it reaches a certain position? I've been trying to make it wrap-around so that as soon as a part of it scrolls out of the window it reappears at the top, but I can't get this to work. I'm sure there's a simple solution but it's evading me at the moment.

    The only other way I can think of doing it is by having two objects ontop of each other so the window is always full by one or both, and when one reaches the bottom, it goes back to the top.

  2. #2
    No Products Registered

    Join Date
    Sep 2006
    Location
    Germany
    Posts
    861
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Scrolling starfield

    Draw little stars as actives. Add a ball movement and set the speed and everything, and make them go always down. If they reach the bottom area make them wrap around so they start from the top again. Just fill your screen with stars. That should do the trick.

    Check out: http://www.clickteam.com/francois/GracillisFlash.html for the same effect.


  3. #3
    No Products Registered

    Join Date
    May 2009
    Posts
    34
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Scrolling starfield

    So each star just a little tiny active object? I suppose that means I can make them prettier and slightly animated too. I assume there's some way of grouping them to make a single function for them? What am I looking for there, arrays or something? Never mind, worked that out. I have 100 little stars moving nicely, is that not going to add extra strain to the program though and make it run slower?

  4. #4
    No Products Registered

    Join Date
    Sep 2006
    Location
    Germany
    Posts
    861
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Scrolling starfield

    You can add qualifiers and then interact with the quaifier for all stars. If you do alot of animations and changes in movement it might get slow but the normal ball movement with 100 objects should not be a problem at all.

Similar Threads

  1. 3D Starfield flyby
    By BigHatLogan in forum File Archive
    Replies: 1
    Last Post: 6th December 2013, 03:31 PM
  2. Pseudo 3D Starfield (APK + MFA)
    By CrystalNoir in forum Android Export Module Version 2.0
    Replies: 3
    Last Post: 27th March 2012, 10:02 AM
  3. Starfield problem - Mathmaticians Needed
    By ayejes in forum File Archive
    Replies: 8
    Last Post: 15th April 2008, 09:17 PM
  4. Starfield
    By ayejes in forum File Archive
    Replies: 0
    Last Post: 2nd March 2008, 06:19 PM
  5. reverse starfield?
    By ayejes in forum File Archive
    Replies: 4
    Last Post: 29th February 2008, 01:41 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •