Help with code behaving differently with different computers...

This is a discussion on Help with code behaving differently with different computers... within the Windows Programming forums, part of the Platform Specific Boards category; Hey, I posted a couple weeks ago regarding this, and just got back from vacation. And whaddya know, same problem. ...

  1. #1
    Registered User
    Join Date
    Dec 2002
    Posts
    25

    Help with code behaving differently with different computers...

    Hey, I posted a couple weeks ago regarding this, and just got back from vacation. And whaddya know, same problem. The problem was that i wrote Tetris and it works perfectly on my computer, but on some other computers, it would throw some error right when clearing the first line. I've tried for a LONG time to explain what was going on, to no avail.

    So i have attached my source, and perhaps some of you could look through it and help me out?

    I'd really appreciate it. The compiled version of the game is also included in the zip along with the source.

    PS - the IDE i used to code this was Dev-C++, and "Anim.dev" is the name of the project

    Nimit
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    Dec 2002
    Posts
    25
    does nobody have any suggestions?

  3. #3
    It's full of stars adrianxw's Avatar
    Join Date
    Aug 2001
    Posts
    4,831
    Don't bump your own threads. Doing so is likely to get them deleted.

    http://cboard.cprogramming.com/annou...p?s=&forumid=7
    Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.

  4. #4
    mustang benny bennyandthejets's Avatar
    Join Date
    Jul 2002
    Posts
    1,401
    On my computer, that's an AMD Athlon 1800+, running Windows XP, the program already compiled in the .zip ran but seemed to have a lot of bugs. For instance, only one kind of piece dropped the whole time, sometimes parts of the graphics would persist on the screen, and other bugs like that.

    I would be surprised if the problem was related to a person's hardware, it is likely related to graphical operations in different operating systems, ie, different drivers, graphics libraries, etc.

    If I get the time I'll look through the code and see if I can find anything wrong with it.
    benforbes@optusnet.com.au
    Microsoft Visual Studio .NET 2003 Enterprise Architect
    Windows XP Pro

    Code Tags
    Programming FAQ
    Tutorials

  5. #5
    Registered User
    Join Date
    Dec 2002
    Posts
    25
    Thanks for your help, I found and fixed the bug. It was a simple error with an array going out of bounds, and for what thats worth, there were parts of the memory that were getting "shifted" which was causing the bug.

    Thanks to VC++'s debugger and thank you. No more for now

    Nimit

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Why my code works only in debug mode?
    By pingpangpang in forum C++ Programming
    Replies: 3
    Last Post: 06-04-2007, 01:39 PM
  2. Proposal: Code colouring
    By Perspective in forum A Brief History of Cprogramming.com
    Replies: 28
    Last Post: 05-14-2007, 08:23 AM
  3. Values changing without reason?
    By subtled in forum C Programming
    Replies: 2
    Last Post: 04-19-2007, 11:20 AM
  4. Obfuscated Code Contest
    By Stack Overflow in forum Contests Board
    Replies: 51
    Last Post: 01-21-2005, 04:17 PM
  5. Interface Question
    By smog890 in forum C Programming
    Replies: 11
    Last Post: 06-03-2002, 06:06 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21