Lightguns

If you have any questions on programming, this is the place to ask them, whether you're a newbie or an experienced programmer. Discussion on programming in general is also welcome. We will help you with programming homework, but we will not do your work for you! Any porting requests must be made in Developmental Ideas.
Post Reply
User avatar
Ender
DCEmu Super Poster
DCEmu Super Poster
Posts: 1314
https://www.artistsworkshop.eu/meble-kuchenne-na-wymiar-warszawa-gdzie-zamowic/
Joined: Mon Dec 10, 2001 4:01 pm
Location: Canada, first igloo on your left.
Has thanked: 0
Been thanked: 0
Contact:

Lightguns

Post by Ender »

Not sure if this is a hardware or software question, but...

Is there currently a way to track the movement of the lightgun withough flashing the screen like mad?
Styrofoam
Insane DCEmu
Insane DCEmu
Posts: 153
Joined: Wed Sep 03, 2003 5:54 pm
Has thanked: 0
Been thanked: 0
Contact:

Re: Lightguns

Post by Styrofoam »

Ender wrote:Not sure if this is a hardware or software question, but...

Is there currently a way to track the movement of the lightgun withough flashing the screen like mad?
:guffaw: Sorry I have no knowledge of programming, but that post had me in stitches .... best post ever (seriously :) )
Image
User avatar
Ender
DCEmu Super Poster
DCEmu Super Poster
Posts: 1314
Joined: Mon Dec 10, 2001 4:01 pm
Location: Canada, first igloo on your left.
Has thanked: 0
Been thanked: 0
Contact:

Post by Ender »

Ok, I didn't mean flashing like that. :D
Image
Kamjin
DC Developer
DC Developer
Posts: 216
Joined: Wed Dec 17, 2003 5:27 am
Has thanked: 0
Been thanked: 0

Post by Kamjin »

just leave the screen white..

You flash the screen white for 2 reasons..
1. In case the person is aiming at Black/Dark pixels
the phototransistor needs light to activte.. black
is the absence of light hence it won't register
when the electron beam passes it (err.. doesn't
pass???)
2. flashing white gives you better responce from the gun..
if you notice in a lot of cases some guns even need the
brightness cranked just to work right.

Although there have been arcade games that don't flash
all the (shootable) imagery is done in bright colors, and the
guns are higher quality.. (not to mention you're about 3 ft.
from the screen)
Vorrtexx
Insane DCEmu
Insane DCEmu
Posts: 138
Joined: Sun Apr 06, 2003 5:29 am
Has thanked: 0
Been thanked: 0
Contact:

Post by Vorrtexx »

hehe, where are people's minds :roll:

One way to do it is have it poll the lightgun receptor, like you would for button presses, only enabling GUN mode in the transfer descriptor. However, to actually track the movement of the gun without flashing is possible yes, the only limitation is the color on the display screen needs to have a high contrast....SO... the closer your color is to WHITE, the more accurate your coordinates will be.
If you Video display from your application is mostly a black display, then you will have 0% accuracy, as I've done lots of tests.
Hope this helps :)

EDIT: and what Kamjin mentioned :)
User avatar
az_bont
Administrator
Administrator
Posts: 13567
Joined: Sat Mar 09, 2002 8:35 am
Location: Swansea, Wales
Has thanked: 0
Been thanked: 0
Contact:

Post by az_bont »

I thought all lightgun games flashed briefly - even Time Crisis 2 on the PS2 does it :wink:
Sick of sub-par Dreamcast web browsers that fail to impress? Visit Psilocybin Dreams!
Vorrtexx
Insane DCEmu
Insane DCEmu
Posts: 138
Joined: Sun Apr 06, 2003 5:29 am
Has thanked: 0
Been thanked: 0
Contact:

Post by Vorrtexx »

I haven't played a lightgun game in the arcades for a long time, but most of the modern console lightgun games I have played do use the flash screen method.
There was an older method where the objects on screen were displayed one at a time on screen, in a high contrast color. So if you were pointing at the object on screen, the light gun receptor would detect a signal and register it as a hit, and off the object would be a darker color, which wouldn't get registered and would be a miss. There was a cheat though that if you had a flourescent light and shot at it, the gun would always pick it up as a hit :)
However a method was created ti counteract that also.
Ex-Cyber
DCEmu User with No Life
DCEmu User with No Life
Posts: 3641
Joined: Sat Feb 16, 2002 1:55 pm
Has thanked: 0
Been thanked: 0

Post by Ex-Cyber »

If you find you do have to flash, you might want to try one or more of the following to reduce the appearance of flashing:

- Only flash shootable objects

- Only flash dark-colored objects

- Flash with less obtrusive colors (e.g. colors that blend with the BG or with the primary visible color of the object, maybe with extra green added to kick up the brightness a bit)

- Spread the flash effect out over several frames so that it's less jarring

- Flash objects in "waves" instead of doing them all at once, e.g. moving from the center of the screen outward over several frames, to avoid the appearance of the entire screen flashing (the idea being that the player will be mostly focused on what they are aiming at and you just need to avoid triggering their peripheral vision)

Just ideas, I don't have any experience with gun/pen programming, just the basic theory which has already been mentioned.
"You know, I have a great, wonderful, really original method of teaching antitrust law, and it kept 80 percent of the students awake. They learned things. It was fabulous." -- Justice Stephen Breyer
User avatar
Ender
DCEmu Super Poster
DCEmu Super Poster
Posts: 1314
Joined: Mon Dec 10, 2001 4:01 pm
Location: Canada, first igloo on your left.
Has thanked: 0
Been thanked: 0
Contact:

Post by Ender »

Yea, I knew the basic theory, but was just wondering if anything had changed over the last 15-20 years in that respect. Apparently not.
Image
Post Reply