Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Delphi/Pascal tetris algo or something

  1. #1

    Delphi/Pascal tetris algo or something

    I hope its correct forum, please move to correct place if its not.

    I never tried to make Tetris in Turbo (Borland) Pascal/Delphi. And today i was thinking about starting writing one. Just to learn more. Is there any tutorial about creating Tetris in Pascal/Delphi? Just very basic, without score stuff etc. I just need some algo how this all must be done. I know that tetris game uses alot of arrays. I have some sources but almost all of them is without comments.
    Can somebody give me some point/algorithm to start?
    Im not beginner in programming, just some stuff is still new for me.
    And what knowledge i must have?
    Thanks in advance.

  2. #2

    Delphi/Pascal tetris algo or something

    I'm not aware of a tetris game with sourcecode that has been made by a PGD member, nor do I know of a tetris clone or -tutorial that has been reported to PGD or Turbo in the past few years. I believe your best option in this case is google.

    Although I might add that tetris isn't the most difficult game in the book. If you are not the beginner you say you are then I'd suggest you give it a go before looking into other peoples code. You'll learn so much more that way.

  3. #3

    Delphi/Pascal tetris algo or something

    Yeah, i think i should code my own first and then optimize it. I found some tuts and collected some sources, i will try it out, step by step. If i will have something ready (some "mega beta") then i will let u know.

  4. #4

    Delphi/Pascal tetris algo or something

    If I ever did a Tetris clone, I would have a 2D array representing the game area, one array element per square. This array would initially be all zeroes. Each block is four squares, no matter what shape it is. When a block is placed, set the array elements of the grid corresponding to the position of the squares in the block to one. Then check the rows of the array that were modified for rows that are now all ones.

    I hope that made sense.

  5. #5

    Delphi/Pascal tetris algo or something

    I hope that made sense.
    Yep.

    That's the same thing i was thinking about yesterday before falled into sleep in the evening
    Thanks.

  6. #6

    Delphi/Pascal tetris algo or something

    Hello BytePtr,

    we have a tetris sample for Omega. Omega are DirectX Headers for Delphi.

    http://www.delphisanctuary.com/forum...0798ee011e34de

    TOmegaTetris.

    Firle

  7. #7

    Delphi/Pascal tetris algo or something

    Hmm, nice. But this requires some specific dll's like D3DX81ab.dll coz example in ZIP pack does not run without it. I have DirectX 9.0c.

  8. #8

    Delphi/Pascal tetris algo or something

    It comes with the Omega Headers or you can download it from Clooties Site here:

    http://www.clootie.ru/delphi/download_dx81.html

    Look for the Download "Clootie_DX81_dlls.zip" this should include the DLL. You should then be able to run the Exe.

    If you want to be able to compile it you will have to install the Omega headers.

    Firle

  9. #9

    Delphi/Pascal tetris algo or something

    Yep, compiles fine, very simple to set up when using component(s).
    I installed whole Omega component pack. Seems to be very useful components. nice

  10. #10

    Delphi/Pascal tetris algo or something

    Hi!

    Glad to hear you like it. There are several samples and some 3D samples that come with the package, there is also a DX9 version of Omega out.

    We have a nice Omega forum here at Pascalgamedevelopment, the 'home' forum is at http://www.DelphiSanctuary.com and I also have a german one on my homepage.

    If you need any help, let us know.
    And keep us informed on your project.

    Firle

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

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