dcsimg
A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: Making a space invaders game

  1. #1
    Captain
    Join Date
    Oct 2005
    Posts
    63

    Making a space invaders game

    Hello, I am by this post trying to attract general tips & tricks about how to make a Space Invaders game (with a twist). I have previously made a game in Actionscript 1.0, which may be viewed at http://home.online.no/~maralbjo/Spill/Spill.html (press S to start the game after typing in your name).

    I want to use this project as an exercise for learning AS 3.0, and I a cannot really see how I need to use separate AS files (Actionscript classes), but something is telling me that I am wrong here.

    So, before I dive into this project of spaghetti code, do YOU have any advice for me? (I am using CS4)

  2. #2
    Senior Member
    Join Date
    Aug 2000
    Location
    Montréal
    Posts
    14,141
    Moved to the Actionscript 3.0 Forum

    gparis

  3. #3
    Will moderate for beer
    Join Date
    Apr 2007
    Location
    Austin, TX
    Posts
    6,801
    Your question is pretty big and rather vague. After taking a look at the game, I'd suggest making a class for an enemy (and using instances of that for each enemy), a class for the ship, and probably a class to handle the engine (what moves where, collision detection, level progression etc). There will probably be opportunities for more classes, but that's a decent start.

  4. #4
    Captain
    Join Date
    Oct 2005
    Posts
    63
    Yes. There will be some score-keeping here... would you put that in a separate class or keep that in what you refer to ass the engine class?

  5. #5
    Will moderate for beer
    Join Date
    Apr 2007
    Location
    Austin, TX
    Posts
    6,801
    There are arguments for going either way. I'd probably take the actual score-keeping out of the engine class. It wouldn't necessarily be in a class dedicated to scoring, but I think that the engine should have well-defined resposibilities. Those are basically: make enemies, check for collisions, and perform any game-mechanic logic.

  6. #6
    Captain
    Join Date
    Oct 2005
    Posts
    63
    I see. Thanks.

Tags for this Thread

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