//flex table opened by JP

Click to See Complete Forum and Search --> : How do computer guns work?


Hellmund
05-07-2001, 05:52 AM
I was recently researching monitors for a Uni project and I was curious about how computer game guns work, you know like the ones on time crisis,Virtuacop etc. I did a lot of reading but they never touched on em and I was curious.

NDC
05-07-2001, 07:27 AM
I've used one before and the gun controls the movement on the screen with weights that are inside the gun which tilt when you aim the gun around. You can feel the mechanisms shift around in the gun....

Hellmund
05-07-2001, 08:51 AM
How does it know what the level of the monitor is. You could hold the gun at floor level, have your monitor 3feet above it and if held the gun level it wouldn't shoot on the screen. I don't think it does anyway, been a while since I used one, the only thing I could figure was that it used reflection somehow.

BBA
05-07-2001, 09:10 AM
I think they actually have a small phototransistor and lens. When a phosphur dot on the screen is in it's range, it finds the matching crt beam timing of the phosphur luminance and therefore knows what pixel the gun is pointed at.

I could be wrong, but it seems like an easy and cheap way to do it.

Szech
05-07-2001, 10:20 AM
There are two types of aiming systems when it comes to video game guns. One system takes a "picture" of the screen, like BBA described. The other system is where the gun is mounted to the machine, in which case, it is actually a joystick that determines what you are aiming at by the yaw and pitch of the gun.

Hellmund
05-07-2001, 06:16 PM
Oh, that's what ND meant, I was referring to guns u use at home in games not at an arcade machine. Well that makes sense, but won't that take a bit of processing power if it has to take a pic and then centre and work out what pixel and ...... Seem like the guns would have to have a small microprocessor?

[This message has been edited by Hellmund (edited 05-07-2001).]

BBA
05-07-2001, 08:58 PM
Yea...it takes as much processing power as a mouse pointer does, lol http://www.sysopt.com/forum/biggrin.gif

Ruahrc
05-07-2001, 11:20 PM
So is that how they work.... I remember trying to work this one out a while ago. I noticed that on the old school Nintendo systems game "Duck Hunt" a white box would appear around the duck when the trigger was pressed. Perhaps the gun was looking for that certain wavelength of light that the box was, and thus could tell if it was hitting it or not?

Ruahrc

muno
05-07-2001, 11:23 PM
Would it be possible to use such a thing on pc? I've never seen one but it feels a bit lame to play something like house of the dead with a mouse. And if it can be/is done, would this work if you put the screen on tv via rca cable. Hmm.. perhaps howstuffworks has explained this =)
-M

Hellmund
05-08-2001, 03:52 AM
But unlike a mouse it doesn't simplay track distance in 3 directions. It takes a small shot and matches it to what is being displayed. In Hi-res there could be a few similar parts and it'd have to sample at higher res to identify which part the user is pointing at. It could get quite complicated if that's how it worked.

NDC
05-08-2001, 06:44 AM
Actually, I was referring to a gun that you use on a PC which is has a serial port interface... I've used one before playing "House Of Dead 2".

Hellmund
05-09-2001, 03:45 AM
Yeh but if hand-held easily portable guns worked of weights then you'd have to hold em at a certain level in respect to the monitor.

3mjf
05-10-2001, 12:38 AM
BBA is correct. The electron beam scans the phosphor coatings 60 or 75 or more times a second (depending on your monitor settings). Although your eye sees a (usually) flicker-free screen, this is an optical illusion due to the slow response time of your retinas. A photodiode or phototransistor can "see" a small spot of screen because of its tightly focused lens. When the electron beam in the CRT stimulates the phosphor to emit light, if the phototransistor picks up a pulse of light, it sends a signal back to the computer. The computer checks for where exactly on the screen the electron beam was pointing to at the instant the phototransistor sent its signal, and the computer can then determine where on the screen the "gun" was pointed at. It's a fairly simple process and I remember rigging up one of these with Radio Shack parts and a Commodore 64 in the early 1980's.

Hellmund
05-12-2001, 05:12 AM
But say it's displaying a completely white screen,hypothetically, how does it tell which part of the screen you pointed at, is it so accurate it can tell when the pixel was hit by an electron to the milli/micro second.

newmz
05-13-2001, 11:19 AM
I remember reading about these things years ago, and I recall that, at least with the older ones that you used on a t.v. - the gun was synched with the scanrate timing of the and also it did "look" for the flash of a pixel through the lens at the barrel tip to determine via reference to scanrate timing, where on the screen in x and y it was pointing. It's simply a matter of measuring the amount of time since it last started drawing the raster scans across the screen until it gets a good input flash through the lens. At 50 scans a sec (here in Australia anyway) for t.v. and I guess at least 100 on a modern monitor, it could easily get a good average position very quickly. A more accurate version of this is a "light pen" which was an early pointintg device.
I don't know if the modern variety is an extension of this principal, but it seems likely since you used to get a pretty accurate result even from a **** old b&w t.v. and an 8-bit game console.

Hellmund
05-14-2001, 05:10 AM
Now that makes sense to me, by the way I'm from Aus as well. I suppose they use multiple variations suited to different applications, the weights version is perfect for arcade games mounted to a pivot point, but the common household one was the explanation I was looking or, been curious how the old gun worked on Die-hard trilogy on the PS.