A Flash Developer Resource Site

Results 1 to 9 of 9

Thread: [Help] Tetris Game

  1. #1
    (F)FlickCorp. Productions
    Join Date
    Oct 2004
    Location
    West Virginia, USA
    Posts
    67

    [Help] Tetris Game

    I'm making a Tetris like game to learn ActionScript with because that's what a website I read said I should learn to make first. So now I'm developing a Tetris like game.

    I have done the intros, menus, sounds, and images. I have downloaded a FLA to help me but as I found out I was not able to use it because it was strictly made by code whatever that means but anyways I wasn't able to use it.

    I have 2 problems about the game that I would like to have help with.

    1) I am using wav music and sound for my game and I would like to know how to get it in the game without having to drag and drop it in and also make it so when I leave the frame it shuts off.

    2) As I've told you I have got most of it done but my next problem is the game itself. I want to know if anyone knows of a tutorial or can help me along with what I need to do to start programming the Tetris game.

    --------------------------------------------------------------------------

    The game is like tetris it has the 7 blocks. My versions game will be called "Ingage-O-Blocks" lol I needed to come up with a simple name ... very original.

    I would set up my fla but for some reason it is way bigger then most it's 7 mb.

    thankyou for helping me if you do and if you need any more info about the game let me know...
    Ingage - The Unsleepable

    (F)FlickCorp. Productions

  2. #2
    DOT-INVADER marmotte's Avatar
    Join Date
    May 2002
    Location
    Dot-Switzerland
    Posts
    2,601

  3. #3
    (F)FlickCorp. Productions
    Join Date
    Oct 2004
    Location
    West Virginia, USA
    Posts
    67

    I cant use that FLA

    Originally posted by Ingage
    I have downloaded a FLA to help me but as I found out I was not able to use it because it was strictly made by code whatever that means but anyways I wasn't able to use it.
    Marmotte thanks but no thanks that was the FLA i couldnt use sorry. I have even talked to neave and he said to do it the way I wanted to do it I would need to do it another way.I talked to him threw Private Message.

    You can get ahold of him if you goto this forum and look up neave.
    Designer Talk Forums
    Last edited by Ingage; 10-26-2004 at 09:24 AM.
    Ingage - The Unsleepable

    (F)FlickCorp. Productions

  4. #4
    Hype over content... Squize's Avatar
    Join Date
    Apr 2001
    Location
    Lost forever in a happy crowd...
    Posts
    5,926
    1) Check up on the sound class, rather than just running sound from the properties pull down.
    ( Also, 7 meg !!!! I'm guessing you've imported a really large wav. You may want to drop that in last to keep the Flash IDE running nice and quick ( Says the person whose Bomb Jack game is a 9meg fla )).

    2)Mate, you haven't got most of it done
    I've been thinking about doing a tetris game for a little while now, and I'd go tile based as it seems to be the only way ( In my head ) to do it and having it run quickly. I know nGFXs' did his cool little one oop, but seems kinda overkill for tetris.
    No matter what you're going to have to get to grips with arrays if you haven't already.

    Squize.

  5. #5
    Senior Member
    Join Date
    Feb 2004
    Location
    Australia
    Posts
    156
    i didn't know that there was the source on that website (rubs hands greedily)! i'd been there before but i've already played the games so it didn't pursue it. i love the borders that when u run ur mouse over they do.......something!

    I also read his biography, he made a game at 13 with basic, now that's impressive!

    i would try and base your tetris game around neave's, rather that the other way around, hopefully you'd learn lots of stuff by doing it, of course many ppl won't recomend it!

  6. #6
    Senior Member
    Join Date
    Jul 2003
    Posts
    138
    The source to my Tetris game is available from my site ( http://ant.simianzombie.com ) - however, the code is a mess (hacked together at speed in about two days). I've re-written it to be object-oriented, and fixed many of the bugs, but haven't uploaded it yet. Let me know if you want it.

    Tile-based is the easiest way to do it. Basically, you create a grid of tiles, 10x18. Each tile should be a movieclip with two frames - one blank frame, and one filled frame. As the shapes drop down the screen, you tell the tile to gotoAndStop(emptyframe) or gotoAndStop(filledframe), depending on where the shape is. You can then do all of the collision detection, etc, by looking at the current frame of the various tiles in the grid.

    You should store the shapes themselves in multidimensional arrays - in my first version, I wrote a 2-dimensional array rotating function to rotate the shapes; however, in the re-write, I found it easier and faster just to store all of the shape rotations in a large array (a look-up table).

    This gives you pretty much everything you need:
    - A display (the tile grid);
    - Read/write access to the current state of the playfield (accessing the current frame of the tiles in the tile grid);
    - Collision detection (work out where the shape needs to go, and check to see if the tiles at that position are empty or filled);
    - Rotation (a look-up table).

    Obviously, if you want the shapes to drop smoothly rather than just dropping from tile to tile, you're going to have to take a slightly different approach.

  7. #7
    (F)FlickCorp. Productions
    Join Date
    Oct 2004
    Location
    West Virginia, USA
    Posts
    67

    I need All The Help I can Get

    Of course I would like the new update I can probably learn alot from it...

    Thankyou Ant

    Yes I think That may be my problem with the size of 7 mb lol I fixed it now I had a 5 min wav file in it.

    And yes I have relized I haven't got most of it done but I was happy with my success with it I thought I did alright for a fist time.

    So everyone thinks I should make it tilebased huh ok I have read some stuff on tiled stuff like tonypa's website will that help me with the tile based games.
    I'm just wondering because so far thats like the only resource I know for tilebased games.

    And nope I don't know anything about arrays lol

    Man I hope Im not the only one that has this much problems....
    Ingage - The Unsleepable

    (F)FlickCorp. Productions

  8. #8
    Hype over content... Squize's Avatar
    Join Date
    Apr 2001
    Location
    Lost forever in a happy crowd...
    Posts
    5,926
    "I thought I did alright for a fist time."

    Now you're talking my language

    Mate, do yourself a favour and read up on arrays before even thinking about learning tile based stuff.
    Also check the knowledge base sticky for a link to oos tile tuts, Klas' way does it for me.

    Squize.

  9. #9
    (F)FlickCorp. Productions
    Join Date
    Oct 2004
    Location
    West Virginia, USA
    Posts
    67

    reading

    I'm starting to read books and such goto my thread ActionScript Game Books to see which ones
    Ingage - The Unsleepable

    (F)FlickCorp. Productions

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