Famicom Hangman

A place where you can keep others updated about your NES-related projects through screenshots, videos or information in general.

Moderator: Moderators

zzo38
Posts: 1096
Joined: Mon Feb 07, 2011 12:46 pm

Famicom Hangman

Post by zzo38 »

I made a Famicom Hangman game. The program is complete (although new things might still be added, but I think it is complete), but not all phrases are complete. If you have any, you can please suggest new words/phrases to add on. Also tell me any other question/comment/complaints you have. Even modify the program if you want to; it is public domain. If someone want to make label for 60-pins cartridge, I may also include that in the ZIP archive as well.

Wiki: http://wiki.nesdev.com/w/index.php/Famicom_Hangman
(Free Hero Mesh - FOSS puzzle game engine)
Shiru
Posts: 1161
Joined: Sat Jan 23, 2010 11:41 pm

Re: Famicom Hangman

Post by Shiru »

Keyboard only? Why?
User avatar
tokumaru
Posts: 12427
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Re: Famicom Hangman

Post by tokumaru »

Nesdev Wiki wrote:Tested on official hardware: No (anyone who can do so, please do)
Any particular reason for it to fail in Nintendulator (bad opcode) and Nestopia (CPU jam)? If not, I wouldn't expect it to work on hardware.
User avatar
tokumaru
Posts: 12427
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Re: Famicom Hangman

Post by tokumaru »

Shiru wrote:Keyboard only?
Yeah, I can't even emulate this thing... The only emulator I have that runs the ROM is FCEUX, and to enable the Famicom keyboard I have to use the "Scroll Lock" key, which my laptop doesn't have...

EDIT: OK, got the thing to work using the Scroll Lock key in Windows' on screen keyboard. Why the hell do you need 256KB of PRG-ROM for such a simple game? No graphics, no music, no options... did you just stuck a whole uncompressed dictionary in there?
tepples
Posts: 22708
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Famicom Hangman

Post by tepples »

Based on the project's page on NESdev Wiki, eventually the plan is to have several thousand possible phrases.
User avatar
tokumaru
Posts: 12427
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Re: Famicom Hangman

Post by tokumaru »

Nintendulator appears to be doing something weird with this... it's loading the incorrect bank into $C000-$FFFF, which obviously causes the game to crash (bad reset vector, etc.). Does anyone know what's up with that?
zzo38
Posts: 1096
Joined: Mon Feb 07, 2011 12:46 pm

Re: Famicom Hangman

Post by zzo38 »

If I am doing something wrong, please tell me what I have done wrong. Is mapper 70 wrong?

The reason for 256K PRG ROM is to hold the texts in fifteen banks (I intend to have as much as possible), and the last bank is for the program. I may later on add support for standard controller as well, possibly add some more graphics, background musics, etc (if it fits in the last 16K PRG bank), or anyone else can modify it too if you want to since it is public domain.

I would like other people to help to add more words/phrases so if you have any suggestion, please post it.
(Free Hero Mesh - FOSS puzzle game engine)
Shiru
Posts: 1161
Joined: Sat Jan 23, 2010 11:41 pm

Re: Famicom Hangman

Post by Shiru »

How many thousands of words you are going to have? I know that with some compression you can put like 15000 in less than 40K.
zzo38
Posts: 1096
Joined: Mon Feb 07, 2011 12:46 pm

Re: Famicom Hangman

Post by zzo38 »

Shiru wrote:How many thousands of words you are going to have? I know that with some compression you can put like 15000 in less than 40K.
I intend to have 7680 phrases (this includes, but is not limited to, single words) exactly (but this is because of the amount of ROM available). Compression would be possible but I don't know how difficult that makes it to select them at random using indexing and those things. (Look at the source-codes if you are wondering)
(Free Hero Mesh - FOSS puzzle game engine)
tepples
Posts: 22708
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Seeding the RNG

Post by tepples »

Yes, it's possible to choose a random element from a list of pointers into Huffman encoded data. But practically, to choose one at random, you're going to need a random seed with at least 13 bits of entropy. You can't get much of a seed from key press timing; each press yields only about four quality bits. (The upper bits are predictable and therefore don't count as entropy.) I think that's why Rare's version requires the players to enter their names on an on-screen keyboard before the puzzle appears on Vanna's board.
zzo38
Posts: 1096
Joined: Mon Feb 07, 2011 12:46 pm

Re: Seeding the RNG

Post by zzo38 »

tepples wrote:Yes, it's possible to choose a random element from a list of pointers into Huffman encoded data. But practically, to choose one at random, you're going to need a random seed with at least 13 bits of entropy. You can't get much of a seed from key press timing; each press yields only about four quality bits. (The upper bits are predictable and therefore don't count as entropy.) I think that's why Rare's version requires the players to enter their names on an on-screen keyboard before the puzzle appears on Vanna's board.
Currently I use ARCFOUR loop running several times per frame on the title screen and when you win or lose, and once per frame otherwise, and uses the microphone for additional entropy, if it is available. I don't know how good quality it is but it seems to work OK as far as I can tell.
(Free Hero Mesh - FOSS puzzle game engine)
User avatar
Dwedit
Posts: 4924
Joined: Fri Nov 19, 2004 7:35 pm
Contact:

Re: Famicom Hangman

Post by Dwedit »

How much entropy do you get from measuring the length of time a button was held in CPU cycles? (remember to debounce)
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!
User avatar
rainwarrior
Posts: 8735
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: Famicom Hangman

Post by rainwarrior »

I guess you can check the controller state about 30 times in a frame. It's actually rather difficult to press any button for less than one frame, so you'd have a fair bit of variety on just a "press start" timing on the title screen (especially since most people won't be trying to press it quickly anyway).

It might be a problem with emulators, though. Input polling might be abstracted and run on its own timer.

As for debounce, is that a problem with the NES? I've never tried polling the NES controller more than once per frame.
zzo38
Posts: 1096
Joined: Mon Feb 07, 2011 12:46 pm

Re: Famicom Hangman

Post by zzo38 »

Dwedit wrote:How much entropy do you get from measuring the length of time a button was held in CPU cycles? (remember to debounce)
I don't know, and I have no need to check the length of time a button is held or to debounce with what I currently have (although I would need to check those things for cursor movement (only) if I add support for the standard game controller).
(Free Hero Mesh - FOSS puzzle game engine)
User avatar
Dwedit
Posts: 4924
Joined: Fri Nov 19, 2004 7:35 pm
Contact:

Re: Famicom Hangman

Post by Dwedit »

I don't necessarily mean measuring it in actual time units, I'm just suggesting polling the joystick more than once per frame, and keep calling the RNG.
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!
Post Reply