Post by chriscrawford on Mar 13, 2016 7:46:49 GMT -8
How's this for an utterly insane situation: the program works perfectly on my iMac. I got it working on my laptop Mac, but for some reason, the Dream Combat animation refuses to show. The window for Dream Combat appears, but it's empty.
So I put a breakpoint into the paint routine for Dream Combat. Sure enough, the breakpoint activates; therefore, the paint routine is definitely running.
I step through the paint routine. Sure enough, everything is working exactly as it should.
And in fact, when I check the Dream Combat window, the paint routine has correctly painted the window with imagery.
In fact, every time that the breakpoint is triggered, the paint routine correctly paints new content into the Dream Combat window.
As soon as I remove the breakpoint, the window is no longer painted.
So I insert a console message into the paint routine. Every time the paint routine runs, it prints a message onto the console.
Sure enough, the console message appears. The paint routine is operating even though nothing appears in the window.
So I try something new: I run the game to the point where Dream Combat should take place. The Dream Combat window appears empty. Then I frantically click on the Eclipse window, then back to the Dream Combat window, and so forth. This should issue a repaint command to the Dream Combat window. It works about half the time.
So now I have a new hypothesis: perhaps the repaint time is so great that the system clogs up. I change the frame timer to be 120 milliseconds -- 8 fps.
Success! The thing draws properly! So the problem was that, when the paint routine couldn't keep up with the timer, it simply did nothing. How unhelpful.
It is apparent that I must shrink all the graphics to permit the thing to run faster. Moreover, I realize that I have made a larger mistake: the images on the laptop screen are too big. Nothing fits onto the screen. I made my initial design decisions based on my own machine, which is top-of-the-line. OF COURSE the program would screw up when run on lesser machines. It's that time again: YOU SNIVELING FOOL!
Right now, I'm feeling that I am spending all my time working on graphics and none of it working on interactive storytelling. I'd like to throw away the entire front end and go back to the simple text-only system that we had 6 years ago. Perhaps that's just defeatism.
So I put a breakpoint into the paint routine for Dream Combat. Sure enough, the breakpoint activates; therefore, the paint routine is definitely running.
I step through the paint routine. Sure enough, everything is working exactly as it should.
And in fact, when I check the Dream Combat window, the paint routine has correctly painted the window with imagery.
In fact, every time that the breakpoint is triggered, the paint routine correctly paints new content into the Dream Combat window.
As soon as I remove the breakpoint, the window is no longer painted.
So I insert a console message into the paint routine. Every time the paint routine runs, it prints a message onto the console.
Sure enough, the console message appears. The paint routine is operating even though nothing appears in the window.
So I try something new: I run the game to the point where Dream Combat should take place. The Dream Combat window appears empty. Then I frantically click on the Eclipse window, then back to the Dream Combat window, and so forth. This should issue a repaint command to the Dream Combat window. It works about half the time.
So now I have a new hypothesis: perhaps the repaint time is so great that the system clogs up. I change the frame timer to be 120 milliseconds -- 8 fps.
Success! The thing draws properly! So the problem was that, when the paint routine couldn't keep up with the timer, it simply did nothing. How unhelpful.
It is apparent that I must shrink all the graphics to permit the thing to run faster. Moreover, I realize that I have made a larger mistake: the images on the laptop screen are too big. Nothing fits onto the screen. I made my initial design decisions based on my own machine, which is top-of-the-line. OF COURSE the program would screw up when run on lesser machines. It's that time again: YOU SNIVELING FOOL!
Right now, I'm feeling that I am spending all my time working on graphics and none of it working on interactive storytelling. I'd like to throw away the entire front end and go back to the simple text-only system that we had 6 years ago. Perhaps that's just defeatism.