Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 House Project
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Mr. T




PostPosted: Wed Mar 23, 2005 1:01 am   Post subject: House Project

I'm having a few issues with my house project (besides the fact that the teacher made us use evil processes)
----------------------------------
1. Run through day mode, then play again, and rerun the day mode...can anyone figure out why the chimney is suddenly missing a drawline (this causes the entire background to become miscoloured)
2. Run through day/night mode, then choose not to play again...why does my Window.Close not close the window immediately after? Why does it create a smaller window?
Sponsor
Sponsor
Sponsor
sponsor
Token




PostPosted: Wed Mar 23, 2005 6:11 pm   Post subject: (No subject)

okay, the chimny thing... i dont see what ur talking about, maybe post a screenshot or somthin, but the ver u sent me was fine, and with the close window thing, what you did when you started was opened a new window with the command
code:

 winID := Window.Open ("graphics:1010;660,nobuttonbar")

so when you use
code:

Window.Close (winID)

it just closes the 1010 by 660 window and returns to the default, i dont know how to get around that tho,

good luck
Token




PostPosted: Wed Mar 23, 2005 9:15 pm   Post subject: (No subject)

okay well i looked at it and the problem seemed to be that while it was drawfill--ing somthing it was also drawing the house, which caused it to fill the background, then the house, or somthing along those lines, maybe it was that the house was being drawn before the background or somthing, but i looked at the pic and saw that the house was on top so it was executing properly, so i put a delay of 100 ms right before it draws the house and it seems to work fine (line 244) so0o0o enjoy, and i still dont know how to close the window.
ssr




PostPosted: Wed Mar 23, 2005 9:27 pm   Post subject: (No subject)

u know u can use cls with View.Update, and View.UpdteArea it'd be much smoother
but anyway gj
Very Happy
Mr. T




PostPosted: Wed Mar 23, 2005 9:58 pm   Post subject: (No subject)

still having issues with Window.Close anyone understand why?
jamonathin




PostPosted: Thu Mar 24, 2005 7:01 am   Post subject: (No subject)

It's simple,
code:

procedure gameOver
    loop
        Font.Draw ("GAME OVER!!!", 80, maxy div 2, gameOverFont, gameOverColour)
        gameOverColour += 1
        delay (100)
        if gameOverColour = 20
                then
            Window.Close (winID)
        end if
    end loop
end gameOver

Where do you exit the loop? You dont. You close the window, then you tell it to display some more text. Also, your Window.Close command is stuck in 3 loops. What you have to do is put an . . .
code:
exit when gameOverColour = 20

in every loop, so the loops know to exit. You also have to change your gameOver procedure, and get rid of the if statement, and put Window.Close at the very end of your program.
If ur not sure on what i was talking about, look at this.
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 6 Posts ]
Jump to:   


Style:  
Search: