Jump to content
IGNORED

Light Gun programming today...


Recommended Posts

Hi.

Lets say someone today, a coder, wants to do a game for the A8.

We can control the things using a joystick and even add other ways like paddles and Amiga mouse but it's that sort of game front-view like Crime Buster or Operation Wolf.

Probably not many people have light guns and still working today but just because he wants to have that possibility because the game will go very well with it. I think that I also read somewhere that todays t.vs. aren't done to use that old light guns...

Can a coder with todays P.Cs. modern tools and even a real machine but no light gun to test can code a game and include an option to play with a light gun?

Of course that in the end he will need to find anyone who has one to test it, right?

Edited by José Pereira
Link to comment
Share on other sites

The XE list gun will not work with LCD/Flatscreen TV's only CRT devices.

 

Modern light guns that work with LCD TV's are combination motion sensor controllers (like a Wii Remote) - which operate in a very different way from the lightpen style XE light gun.

 

Having built many games that work with these type of devices there are two approaches:

 

Accurate pointing controllers - either work with a fixed camera (PS Move) that seems the controller or contain a camera (Wii Remote) that see fixed external points (the sensor bar or just two lights) to triangulate the controller's position with accuracy.

 

If you just use gyro and magnetometer data motion controls are fine for gestural but little use for accuracy (aiming) in my experience.

 

I think would require far too much processing power to process the data and use with an A8 system - even if one could interface the little Atari to one somehow...

 

sTeVE

Edited by Jetboot Jack
Link to comment
Share on other sites

Thanks.

But I'm not saying to adapt a modern gun to the A8.

My question is how and simple would be someone that does a game today on A8 with joystick controls but don't has the XE light gun add to the menu the gun control possibility?

What is coding needed and hard or not to programming if the one doesn't have a light gun. It hasn't hardware registers like joystick or paddles.

 

 

P.s.- I think that paddles and mouse are up to any coder because some games has this possibility, right?

Link to comment
Share on other sites

The horizontal and vertical positions can be read using peek(564) and peek(566). The screen needs to be bright enough to be detected reliably. Some games turn the screen white temporarily (then wait a frame) after pressing the trigger. I think 'fire' is joystick up.

 

Note that the atari light gun wiring differs from the Sega one.

 

http://www.atarimax.com/freenet/freenet_material/12.AtariLibrary/2.MiscellaneousTextFiles/showarticle.php?47

Link to comment
Share on other sites

From what you're saying let me be more accurate in what I have in mind:

I have the gun sight using P0+P1 in a lightest luminance E moving over PFs (BAK black, PF0 luma 6, PF1 luma A and PF2&PF3 luma C or E) then the enemys/shooting targets use PM2 and PM3 in any/different colour(s) lightest luminance E.

The game logic and coding will be by hardware collision register that when P0+P1 hits PM2&PM3.

On joystick the shooting is done by pressing the fire button.

What lumas other or these ones have to be on the PFs gfxs, the gun sight and enemy/targets PMGs?

Edited by José Pereira
Link to comment
Share on other sites

I'd have thought 3-4 horizontal bright pixels will be enough for the gun to pick up. However! Say I want to move the gun, if the screen is black other than the gun sight it won't pick up where it is. So you need a bright enough background in order to re-aim.

Link to comment
Share on other sites

I seem to recall from my hazy memory that ANALOG ran an article about programming for the light gun?

 

My only experience with one - is having borrowed the Nintendo light gun, and playing it with it's NES Duck Hunt cartridge. It was more novel than fun.

 

I'm always amazed how the shooter genre took off after Doom - for me it just got to be too violent and more and more graphic.

 

The only fun shooter styled game I took to, is Wild Guns on the SNES - while not for a light gun, maybe it shows how it could be done... maybe not.

 

Harvey

Link to comment
Share on other sites

O.K. here's an example. Take this screen as an example just to show colours and luminances.
This screen is taken from C64 game GhostTown with some changes to fit on A8's features because it was an easy one to convert, may I use this gfxs and add more to other levels screens with different gfxs but my idea is more than this traditional horizontal scrolling 'go shooting' because what I have in mind has more gameplay and what to do, more fun I hope :)...

-> Normal:
post-6517-0-20052500-1431188003_thumb.png

-> With PAL Blending:
post-6517-0-60923700-1431188008_thumb.png


About screens gfxs:
PF0: dark colour02 luminance 6;
PF1: middle colour luminance 10;
PF2: light colour luminance E;
PF3: sky colour luminance C or E;

Then the sprites/guys (Prior 1):
P0+P1: sight white colour 0 & luminance E;
Enemys have each PM2 or PM3 with PFs any colour & luminance C;

The shots and hits done by hardware collision between the sight P0+P1 and the guys PM2&PM3.


Other levels will have different gfxs and colours but the PFs and PMGs luminances distribution I like are these ones.
Is the sky too bright for distinguish or any trouble for the light gun gun to capture the sight?
What luminances maybe be better in your opinion on or are these ones O.K.?

Edited by José Pereira
Link to comment
Share on other sites

Is the sky too bright for distinguish or any trouble for the light gun gun to capture the sight?

 

 

I think you're kind of misunderstanding how this works. Light gun games are not triggering on any visible sight or cursor for location. The light sensor is triggering on the scanning electron beam position as it draws the screen. The game then draws the sight/cursor at a position as a result of the light sensor input.

 

The fact the sky is bright/light blue means the sensor has a better chance of sensing the beam position in the sky area since the pixels are brighter. Darker areas are harder/less accurate to read. Most games based on light-sensing use bright displays to insure accuracy. Games even flash the display white when the trigger is pressed to guarantee the sensor gets a good read from the CRT.

Link to comment
Share on other sites

Exactly - the only reliable way to read XY pos in a game with some dark colours screen it to blink "all white" for one frame after pressing trigger.

It is not bad - it looks a little like muzzle flash, so it adds to the "shooting" experience. Add appropriate sound effect, like a gun sound from Joe Blade and you have a believable shooting sensation.

Edited by pirx
Link to comment
Share on other sites

  • 4 weeks later...

The nes method linked should work on TFT. Of course there is no electron beam so posx and post will not reflect the pos. But I'd have thought it possible to tell if pointed at a bright section or not. Has anyone tried it?

Link to comment
Share on other sites

Hello guys

 

There has to be a way to make light guns work on non-CRT's (TFT's, projectors, etc.). In the video signal is the information on where each screen starts and when each line starts. From there, it shouldn't be to hard to determine where the beam would be, if a CRT was used.

 

Once we know where the beam would be, we'd have to come up with a way to somehow create something that would make the light gun "think" that we are using a CRT. I haven't really figured out how we could do that, as I still don't really understand what the light gun reacts to.

 

Sincerely

 

Mathy

Link to comment
Share on other sites

The NES method would work but IMO it's one ugly way to have a light gun work for you. Atari might have some advantage though, a game could just set colour registers to the darkest values rather than blank most of the screen.

 

As for determining actual position without disturbing graphics on a non-CRT device. No way. Light gun/pen as used by Atari relies on the older style CRT (not 100/120 Hz ones either) that actually have the scanline being drawn a matter of nanoseconds after the computer has sent the information.

Some games allow calibration - that's to allow for misaligned CCD sensor and to compensate for the lag between signal/display (plus the fact Antic is probably a little slow in latching the position).

  • Like 2
Link to comment
Share on other sites

As for determining actual position without disturbing graphics on a non-CRT device. No way. Light gun/pen as used by Atari relies on the older style CRT (not 100/120 Hz ones either) that actually have the scanline being drawn a matter of nanoseconds after the computer has sent the information.

 

It is possible to create such hardware (see my post http://atariage.com/forums/topic/209733-light-gunvbxenintendo-wii/?do=findComment&comment=2711876 ), which hooks into the video out and triggers at the location of what a CRT independent position sensor delivers. However, I doubt the demand...

 

Edit: Patching light-gun/pen dependent software seems easier than creating a hardware which makes an e.g. 'Wii-remote' light-gun compatible.

Edited by Irgendwer
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...