[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Question :)



At Tue, 12 Mar 2002 00:47:22 -0800 (PST), Pam Tan wrote:
>  So now I am trying to use dr scheme to make a pacman
> game... My question is about threads, I used threads
> to make the ghost move at the same time as I move
> pacman.. problem is, if I want to pause the game, I
> don't know how to make the thread for ghosts stop
> temporarily and continue once I continue the game..
> Can someone explain threads to me?

DrScheme does not currently offer a mechanism to suspend a thread
(though it should). One possibility is to insert a periodic poll in the
ghost thread to check for pausing.

>  My other problem is that I have a function for best
> scores.. So how do I save data such as scores and be
> able to load them and display them in a seperate
> frame? 

After you get a port with `open-output-file' or `open-input-file', use
`write' and `read'.

Matthew