Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/iano/public_html/tpforums-vb5/forum/includes/class_core.php on line 5842

PHP Warning: Use of undefined constant MYSQL_NUM - assumed 'MYSQL_NUM' (this will throw an Error in a future version of PHP) in ..../includes/init.php on line 165

PHP Warning: Use of undefined constant MYSQL_ASSOC - assumed 'MYSQL_ASSOC' (this will throw an Error in a future version of PHP) in ..../includes/init.php on line 165

PHP Warning: Use of undefined constant MYSQL_BOTH - assumed 'MYSQL_BOTH' (this will throw an Error in a future version of PHP) in ..../includes/init.php on line 165

PHP Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in ..../includes/functions_navigation.php on line 588

PHP Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in ..../includes/functions_navigation.php on line 612

PHP Warning: Use of undefined constant misc - assumed 'misc' (this will throw an Error in a future version of PHP) in ..../global.php(29) : eval()'d code(6) : eval()'d code on line 1

PHP Warning: Use of undefined constant index - assumed 'index' (this will throw an Error in a future version of PHP) in ..../global.php(29) : eval()'d code(6) : eval()'d code on line 1

PHP Warning: Use of undefined constant misc - assumed 'misc' (this will throw an Error in a future version of PHP) in ..../includes/class_bootstrap.php(1422) : eval()'d code(4) : eval()'d code on line 1

PHP Warning: Use of undefined constant index - assumed 'index' (this will throw an Error in a future version of PHP) in ..../includes/class_bootstrap.php(1422) : eval()'d code(4) : eval()'d code on line 1

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 85

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6
[Linux] Tetris with SDL + OpenGL
Results 1 to 6 of 6

Thread: [Linux] Tetris with SDL + OpenGL

  1. #1
    Senior Member
    Join Date
    Mar 2007
    Posts
    1,323

    [Linux] Tetris with SDL + OpenGL

    Greetins fellows!

    You haven't seen me in a while. The simple reason is that I've been at the army and my free time is very limited. The army is ending at the beginning of July so I'm hoping to be active again after that.

    Anyway, I wanted to keep my fingers warm while at the army so I've been doing these little projects just to remind me how to code. I've done this little tetris game (which is not ready yet though) in co-op with my brother. I was chatting with Darkpallys earlier and told him about this project and he asked if I can post this project to here. So there you go!

    It's programmed with c++ and uses SDL and OpenGL libraries. Libraries you'll need at the moment are SDL, SDL_ttf (not used at the moment though but I was too lazy rip off the code that uses it), GL and GLU. I've coded this in Ubuntu and I've no idea if this works in Windows, probably with some small modifications. In ubuntu the easiest way to get those libraries is apt-get:
    Code:
    apt-get install libsdl1.2-dev libsdl-ttf2.0-dev mesa-common-dev
    I haven't provided any makefile for the project since I'm using eclipse as my IDE and can't figure out how to extract a make file from there. Anyway it shouldn't be hard to compile it.

    Any feedback about the proggy or especially about the code is highly welcome!

    I've included the sources here as well as few screen shots:




  2. #2

    RE: [Linux] Tetris with SDL + OpenGL

    Nice! I love to see what people are working on for fun. Thanks for posting the sources too!

  3. #3

    RE: [Linux] Tetris with SDL + OpenGL

    Great. TP will be always alive!

  4. #4
    Administrator
    Join Date
    Mar 2007
    Posts
    1,723

    RE: [Linux] Tetris with SDL + OpenGL

    Awesome OsQu, and I was wondering where you went haha.

  5. #5

    RE: [Linux] Tetris with SDL + OpenGL

    Nice work OsQu!

    It compiles perfectly fine on windows but it crashes when exiting the game. Probably just some faulty pointer you try to deallocate.

    Other than that it works great!

  6. #6
    Senior Member
    Join Date
    Mar 2007
    Posts
    1,323

    RE: [Linux] Tetris with SDL + OpenGL

    I've always wanted to say this: It's not a bug, it's a feature!

    Like I said, the game is not ready yet so the functionality when the game end is to quit game and print Game Over! to stdout.
    This I'm planning to do next btw:
    A better camera, display score and finally a menu. When those things are done I'll probably add some fancy effects when one clears a row.

Posting Permissions

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