hangman game
This module provides a very simple hangman game.
It is ideal to spend a little time, or to have fun, or keep visitors on our page for a bit longer.

It works like the well known, paper based hangman game: the player must to figure out a word (mostly a name of a famous person).
All the word's letters replaced with underscores (except spaces).
The player has a given number of possibility to find the word's letters.
If he correctly chosen a letter (the word contains it), the letter will apper in the word, if not, he lose one chance.
If he figures out the word, before he runs out of possibilities, he win.

When the game starts, it show a picture from a gibbet.
After a wrong choice, it start to draw a person on it.
Every wrong answer draws a part of the person.
When the picture complete(player run out of possibilities),
the hanged man completely appers(thats where the name from), the user lose.

The game has 3 different difficulty levels, for a better game experience.
When player choose a level, the game randomize a question from that level.
The module provides administrative page for better utility.
Works with unicode characters, can handle language specific letters like é, á, etc.
The module stores previous victory numbers, so user know how much game he wins.

Project page: http://drupal.org/sandbox/pnemes/1776396

GIT repository: http://git.drupal.org/sandbox/pnemes/1776396.git branch 6.x-1.x

git clone --recursive --branch 6.x-1.x http://git.drupal.org/sandbox/pnemes/1776396.git hangman

The module is for Drupal 6

CommentFileSizeAuthor
#2 hangman_screenshot.png63.79 KBjvdurme

Comments

ankitchauhan’s picture

welcome,

As installation and usage instructions are quite important for us to review, please take a moment to make your project page follow the tips for a great project page. Also make sure your README.txt follows the guidelines for in-project documentation.

Its good to see that you already fixed all style isse. See automated review here :
http://ventral.org/pareview/httpgitdrupalorgsandboxpnemes1776396gitt

We do really need more hands in the application queue and highly recommend to get a review bonus so we can come back to your application sooner.

regards

jvdurme’s picture

StatusFileSize
new63.79 KB

Hi pnemes,

I installed the Hangman module in Drupal 6, but I don't see a new content type Hangman.
I do however see the difficulty levels. See screenshot.

Joost

pnemes’s picture

Hi.

Updated my git repository, hope it work well now.
I forget about a few dependecies, so I extended the module's .info file. I think it now covers all of it.
I installed a fresh Durpal 6 core, and installed the latest CCK, Imagefield and Filefield modules. (all of these are dependecies now)
After this, the module installed the content type well.

Please, download the updated version and take another try.
Thanks for testing !

jvdurme’s picture

Allright, it worked this time. Probably something was wrong with my installation, but good to know it depends on more modules. :)

I noticed that some text is not in English, e.g.:

on the Create Hangman content page:

Kezdő
Középhaladó
Haladó

Also some non-English text appears during the game.

I suppose I should see the image getting more and more complete near the end of the game, but I only see the first empty woodstick and it disappears when I make my first try with a letter. No other picture is ever displayed from then on.

cheers!

pnemes’s picture

Thank you for fast answer!
Sorry for the non-english texts, I forget about it. I work on localized system, and sometimes I forget to translate some text.
I updated, all non-english texts removed or chaged to english.

The start picture appears until the first missed letter, after this, the module start to draw the person on it.
(You must to find 9 different picture in the module's pics folder, name hm0-8.)
But a picture must to appear along the game.
The pictures all on the sites I tested works fine, I tested it, so I dont know exactly why wont work it.
Anyway, I tried to made a more versatile code for picture change, hope after update it works correctly on your system.

jvdurme’s picture

Hi pnemes,

tested again and it works now! Pics are nicely displayed. I like the birds. ;-)
However, I still see some non-english text (difficulty levels I think) when I create a new game.

I would also clean up the README.txt file a little to make it more readable. Check for a few styling examples here: http://drupal.org/node/447604
Also, in the README.txt file mention all the dependencies needed for Hangman. You added some dependencies previously.

To make your project more sexy, format the project page in sections, as e.g. mentioned here: http://drupal.org/node/997024 , including an overview and requirements. Perhaps a demo page could be useful too.

cu,

Joost

pnemes’s picture

Hi !
Thanks for watching.
I made all the things you mentioned, but i cant find the non-english text in the module. I looked through all the module files and i cant found anything. I uploaded the .inc that do the content type install, hope if you completely resintall the module it updates the texts.
I also updated the readme.txt too. Only the project page needs a little update, but i try to do it as fast as possible.

d2ev’s picture

good module...

First attempt to install this module with with CCK, Imagefield and Filefield module didn't create "hangman" content type for me and when i uninstall it and install again then content type is created and works fine.

spike22’s picture

Nice game, nice idea...I'd like to see this as project soon, not just sandbox. Hope that won't take too long...

jvdurme’s picture

Hey man,

I got your new code from git, but there seems to be a problem with installing/uninstalling.
I uninstalled the previous version and then installed the current version. Then when I saw still some non-english text, I disabled the module again. Then I noticed that the hangman content type was still there.
Maybe disabling the module should perhaps also delete the hangman content type in the future? This didn't happen now.

So I manually deleted the hangman content type in the hope the non-english text would be gone. Then I cleared my cache and enabled the current hangman game version. Strangely enough I'm not seeing the Hangman content type anymore. Tried to uninstall and install multiple times, but I don't see the new content type.

More users would have to test install/uninstall multiple times to see if they have also these issues or that it is my problem only. But as my Drupal 6 is fresh, I'm in doubt.

cheers!

Joost

jvdurme’s picture

Oh and in your hangman.module code, you should add more t() functions.
E.g. in hangman_menu() for the title and description keys for each $items element, because these strings get printed to the screen.

jvdurme’s picture

Status: Needs review » Needs work

Set status to "needs work".

pnemes’s picture

Hy ! Thanks for watching.
I try to figure out whats wrong with it, but i never get this type of error with this version.
I installed it on a lot of Drupal 6 sites, but the content type always created well. Anyway, i work on it.

About module uninstall: the content type cant delete when disable the module. You need to uninstall it to delete all of contents, variables, etc.
This is because the hook_uninstall do the delete, thats the normal operation. I saw the same work method in other modules.

About translations: first i used the t() function in hook_menu, but there is no need of them. Pareview gives error when i insert it and i find a comment about this on hook_menu's api site.
Can you describe me the non-english text? I checked the whole module again and again, but i cannot find it, and this makes me crazy.

spike22’s picture

About translations: first i used the t() function in hook_menu, but there is no need of them. Pareview gives error when i insert it and i find a comment about this on hook_menu's api site.

I can confirm that. There's no need of t() in hook_menu. The strings will be translatable automatically. Check that out!

jvdurme’s picture

Status: Needs work » Reviewed & tested by the community

Hi pnemes,

I must apologize here. You are right about the t() not being necessary in hook_menu().
Also, believe it or not, I never uninstalled Hangman. I always only disabled it. Hence I was still seeing the non-english text.
I really uninstalled it now and reinstalled. Everything ok. All english. :-)

Looks good to me so I'm gonna set it to RTBC.

Joost

dharam1987’s picture

Status: Reviewed & tested by the community » Needs work

Suggestions

Hello,

The basic suggestion I would like to give here is to

1- Put the following command in your issue summery, this will help reviewers directly copy paste the command form your issue post.

git clone --recursive --branch 6.x-1.x http://git.drupal.org/sandbox/pnemes/1776396.git hangman

2- About deleting variables, I would suggest you to use variable_del function, rather than using the database query, because just in case if any 3rd party module is having a variable name start with hm_ it may affect to those as well, though this chances are way too less here.

rest all looks good, may be you would consider to offer a block along with the module so that users can directly position that block in there site.

Thanks

dharam1987’s picture

Issue summary: View changes

pictured aligned to right

pnemes’s picture

Status: Needs work » Needs review
wolvern’s picture

Hi, pnemes,

I also didn't have your content type available after installation. Then I uninstalled, enabled the module again and it worked fine after that.

Upon enabling the module for the first time (my system was Drupal 6.26, virgin) I got this error right away:
warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'content_copy_import_form' was given in /includes/form.inc on line 382. I hope this helps you resolve this issue.

Good luck!

caseyc’s picture

Status: Needs review » Needs work

Hi pnemes - thanks for the cool module. But I think it still needs some work:

1) I get the same error as saulelis in post #18.

2) Also, when I go to add content, I don't see the content type there. I have no way to add content to my hangman. I've flushed the cache, disabled and re-enabled the module. No luck.

3) I notice some misspellings in the README and .module text. You may want to run this through a spellchecker.

4) On line #24 in hangman.install, you have $t() when I believe you want t().

5) Also in your uninstall, you shouldn't be using die() in your query.

6) You should probably have a permission of some sort for the hangman game rather than just passing array() as the access argument. And you should add that to your README.

Just a few thoughts.

Setting module status to "needs work".

klausi’s picture

Status: Needs work » Closed (won't fix)

Closing due to lack of activity. Feel free to reopen if you are still working on this application.

If you reopen this please keep in mind that we are currently quite busy with all the project applications and I can only review projects with a review bonus. Please help me reviewing and I'll take a look at your project right away :-)

klausi’s picture

Issue summary: View changes

git code added