home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.os.vms:21614 vmsnet.sources.games:493
- Newsgroups: comp.os.vms,vmsnet.sources.games
- Path: sparky!uunet!cs.utexas.edu!uwm.edu!ux1.cso.uiuc.edu!news.cso.uiuc.edu!jsue
- From: jsue@ncsa.uiuc.edu (Jeffrey L. Sue)
- Subject: Re: "Beat the Buzzer" Game?
- References: <1993Jan20.122713.84@iwsd01.itwol.bhp.com.au>
- Message-ID: <C17GJy.Brv@news.cso.uiuc.edu>
- Originator: jsue@troon.ncsa.uiuc.edu
- Sender: usenet@news.cso.uiuc.edu (Net Noise owner)
- Organization: The Dow Chemical Company
- Date: Thu, 21 Jan 1993 13:09:33 GMT
- Lines: 43
-
-
- In article <1993Jan20.122713.84@iwsd01.itwol.bhp.com.au>, webosk@iwsd01.itwol.bhp.com.au writes:
- |> Any ideas for a "beat the buzzer" game to make a training class more
- |> interesting? There will be around 8 users in the same group with VT100/220
- |> terminals and OPER privilege. I have trialled a program using $BRKTHRU to
- |> send messages to my terminal, which works ok although occasionally some
- |> messages get lost if they all arrive in quick succession.
- |>
- |> I would like ideas to achieve the following:
- |> - a program which is easily configurable (at runtime) to send messages to
- |> my terminal, and *only* my terminal (there will be other users on the
- |> system).
- |> - a way of disabling nuisance messages until I am ready to receive them,
- |> and to prevent a user sending multiple messages by holding his finger on
- |> the button.
- |> - ensuring that the first person to press his button really *is* the first
- |> to get through to my terminal.
- |>
- |> Are there better methods than using $BRKTHRU (e.g. Common Event Flags and
- |> Global Sections)?
-
- Ken, to insure that only the first person gets thru, you could use $ENQ &
- $DEQ system services in your program. Have only the person who actually
- is "granted" the lock send the $BRKTHRU message. You can prevent people
- from sending messages when not ready by holding the lock yourself until you're
- ready. If you don't want to use $BRKTHRU, you could have your program que
- a lock with a 'blocking ast' such that when someone queues a lock while
- you're blocking it, the ast routine would execute to allow you to $DEQ your
- lock, allowing the other person to get it. You'd immediately queue up another
- lock on the same resource. The other person would, after being granted the
- lock, $DEQ that lock but deposit information into the lock-value-block that
- allows you to determine who that person is. After his/her lock is $DEQd you'd
- get the lock back and then read the value in the lock-value-block to determine
- who it was.
-
- There are some example programs on DSNlink for working with $ENQ & $DEQ
- as well as some programs I've seen out on the Internet.
-
- Good luck.
- --
- -----
- Jeff Sue
- - All opinions are mine - (and you can't have any, nya nya nya)
-