XNA Creators Club Online
Page 1 of 1 (4 items)
Sort Posts: Previous Next

Unexplained changes in variables/"cloning" of other things?

Last post 10/3/2008 11:20 PM by Austin K. 3 replies.
  • 10/3/2008 3:38 PM

    Unexplained changes in variables/"cloning" of other things?

    Hello!

    A few months ago I wrote a Rubik's Cube solver in XNA, and I've just gone back to it this week to get it to take input from a webcam (now that I have one!). The solver/input system works fine as far as I can tell, but I'm having a rather bizarre problem with something else. If I minimise the solver/hide it behind another window etc, occasionally some faces will just change colour. For example, I got the solver to solve a cube. It showed all the graphics of it solving the cube before finally just rendering a solved cube. However, after minimising the window and bringing it back to focus, it started rendering this:

    Each side of the cube is made up of a 3x3 array of "miniface"s, which is a class containing things like colour etc. There is definitely no code that I've written to make the colours switch after a certain amount of time- what on earth could be causing this? Minimising it doesn't always do this (it only does it sometimes), but the longer it's minimised, the higher chance there is it will have happened.

    Thank you in advance for your help! In case you want to watch it, here's a link to a video of the solver!

  • 10/3/2008 3:51 PM In reply to

    Re: Unexplained changes in variables/"cloning" of other things?

    I'd like to say first off that  I'm sorry that I can't help you but I just wanted to say that this is a pretty cool solver. Did you come up with the solving algorithm by yourself or was it already worked out and you just implemented it?
  • 10/3/2008 4:03 PM In reply to

    Re: Unexplained changes in variables/"cloning" of other things?

    You should use PIX. Freeze your animations so the screen doesn't change then do a frame capture. Then minimize until you see the color change and do another frame capture. Show the pixel history for the sme pizel in both captures and see what is different.
    Play Kissy Poo - a game for 4 year olds on Xbox and windows
    The ZBuffer
    News and information for XNA
      Follow The Zman on twitter, Email me
        Please read the forum FAQs - Bug/Feature reporting
          Don't forget to mark good answers and good playtest feedback when you see it!!!
  • 10/3/2008 11:20 PM In reply to

    Re: Unexplained changes in variables/"cloning" of other things?

    The ZMan:
    You should use PIX. Freeze your animations so the screen doesn't change then do a frame capture. Then minimize until you see the color change and do another frame capture. Show the pixel history for the sme pizel in both captures and see what is different.

    I know what pixels are different, I can see that from just looking at it? I don't think the problem is with the drawing part, I think it's something to do with XNA/my program confusing variables which then makes it render the cube wrongly. I might be wrong and completely misunderstanding what you're saying though..?

    Chin VPL:
    I'd like to say first off that  I'm sorry that I can't help you but I just wanted to say that this is a pretty cool solver. Did you come up with the solving algorithm by yourself or was it already worked out and you just implemented it?

    Haha, thank you! I learnt how to solve the cube from a youtube video, but it then it wasn't really a case of just "implementing it"- using the youtube method requires some sort of intelligence and problem solving skills. I had to figure out about 40 algorithms myself to use- using these, and the 5 or 6 algorithms the youtube video taught, and some tricks to stop me needing another 3 times as many algorithms it all came together. :)

Page 1 of 1 (4 items) Previous Next