Page 1 of 2

Lightgun game

Posted: Fri Jun 29, 2007 10:45 pm
by atari2600a
I'm currently starting an NES game. It will be my first game, not counting numerous SMB hacks. At the current point of development, I still basically have some raw code. I wanted to ask: Should I attempt a lightgun game?

To my knowledge, lightgun games work by clearing the screen on a single frame w/ the sprite(s) white, then the gun sets a bit on the controller register if it see's white during the cycle's duration. This is simple enough, but would programming the entire game be more difficult than programming...say...a platformer? Thought I'd ask people who have far more experience on the NES hardware than the people on the vintage-computer.com forums...

Oh, & by the way, I'm staying here. Bookmarking *\search.php?search_id=newposts on my bookmark toolbar. Want to absorb all the knowledge I can here, then, maybe some day even help out some people if I stay long enough.

EDIT: BTW, http://st3phanie.com/stealingyourbandwi ... shbarg.zip

VERY raw code BTW.

Re: Lightgun game

Posted: Sat Jun 30, 2007 1:41 pm
by tokumaru
atari2600a wrote:This is simple enough, but would programming the entire game be more difficult than programming...say...a platformer?
Hum... I wouldn't say so. It might be easier actually. I've never coded a lightgun game, but to me it seems that the simplicity of detecting if the gun has hit a white sprite (as opposed to performing software collision detection between objects and all) can make it all easier.

However, "lightgun game" is a pretty vague term... The fact that the player has to shoot things with a gun is just a small aspect of a game. Like, recently, we were discussing about making raycasters (pseudo-3D first-person-shooters) that used the light gun. Of course those would be harder to code than Duck Hunt, because the player moves inside this pseudo-3D world. Duck Hunt's world is nothing but some static bushes in front of you.

So in the end, yeah, it depends on the rest of the game. Platformers have to deal with the complexity of decoding level maps, scrolling, complex physics, and things not commonly seen in lightgun games, so I think most of the time they'll be harder to code.

BTW, welcome! =)

Posted: Mon Jul 09, 2007 7:46 pm
by atari2600a
I think I've thought up a good concept for this game. I can base it around Doctor Who! (If you live in an NTSC-bearing country, you probably won't understand half of what I mention)

I can have the Daleks trying to attack the doctor, w/ them saying "Ex-ter-min-ate" etc...

Do you guys think someone w/ not that much 6502 ASM experience could pull this off?

Posted: Mon Jul 09, 2007 8:16 pm
by tepples
Getting the BBC's permission to make a fan game might be the hardest part.

Posted: Tue Jul 10, 2007 12:23 am
by atari2600a
That's where I'm hoping the fact that I live in the US will spring to the rescue. Also the fact that the general public thinks the word homebrew is a term used for coffee or something.

Posted: Tue Jul 10, 2007 7:30 am
by commodorejohn
Well, as long as you're not selling it, it would fall under fair use and you shouldn't get in trouble even if the BBC did care.

Posted: Mon Jul 16, 2007 1:21 pm
by daniel3843
atari2600a wrote: ... (If you live in an NTSC-bearing country, you probably won't understand half of what I mention) ...
Uh dude, wake up... the Sci Fi channel has invested in the new Dr Who, and they are currently on Season 3, they're only about 3-4 months behind BBC-1. Sorry to burt your bubble though. So that also means you have to get SciFi's permission as well as BBC... even harder

Posted: Mon Jul 16, 2007 3:49 pm
by teoma
You could make something like Dr. Who only better....

Posted: Mon Jul 16, 2007 5:56 pm
by atari2600a
I am aware of Sci-Fi & BBC America's airing of Doctor Who, but seriously, how many people in the United States do you know that watches Doctor Who? I can only count one, side myself.

Anywho, I plan to base the game off of the 60-80 era episodes. Each level with a new doctor, perhaps. Hell, maybe I can even have levels for side characters like Susan!

Posted: Fri Jul 20, 2007 8:21 am
by Jeroen
Theres enough euhm you's in America.

Posted: Fri Jul 20, 2007 8:40 am
by atari2600a
There's who's whatnowing me?

Posted: Wed Aug 08, 2007 1:57 pm
by atari2600a
Recently I've been thinking about the music/sfx drivers. For music, I was thinking I'd just have something like the even byte being the low register address byte, the odd byte being the value to be put into it, & the next even bit being checked for null, else the process continues.

What would you guys find nessicary for an audio driver?

Posted: Wed Aug 08, 2007 2:37 pm
by tepples
Quite a few music engines can be split roughly into three layers:
  • Song
  • Phrase
  • Instrument
The lowest layer of a music engine is the instrument driver. It implements the command "play note a using instrument b on channel c" in terms of writes to the PSG registers, which are CPU $4000-$400F on the NES. Often, an instrument is defined in terms of volume changes, timbre changes, and possibly pitch changes.

The next layer is the phrase. It implements the command "play phrase a, transposed up b on channel c", it interprets musical opcodes, and it issues commands to the instrument layer. For example, opcodes in a phrase might represent "piano, octave 2, eighth notes G A B c d e fs g".

The next layer is the song. If you've ever heard the main theme from Super Mario Bros., you'll notice that it repeats parts. The song engine handles starting and stopping phrases, based on opcodes that represent things like "at 5:1, start phrase verse-melody on channel 1".

Under such a structure, a sound effect may be implemented as an instrument or as a phrase.

Posted: Wed Sep 12, 2007 4:20 pm
by atari2600a
Quick question: Does the lightgun need to be strobed?

Posted: Sun Sep 16, 2007 5:48 pm
by Jedi QuestMaster
I'd like to see a two-player lightgun game. :p

I didn't think the NES had this capability until I heard of Chiller. :shock: