Page 1 of 2 12 LastLast
Results 1 to 20 of 32
  1.    #1  
    Here's another one to pad the Homebrew numbers
    One of the things I note about the homebrews coming out is - what, no Hangman app? So here's the obligatory hangman app, and no credit to me, code "adapted" from here

    Obligatory screenshot:



    Update v1.1:
    Word list - Countries of the World
    Graphics resized and duplication of the middle table fixed - thanks to rboatright
    Link to author's website

    Update v1.2:
    Reformatted by Colonel Kernel (see post)
    Attached Files Attached Files
    Last edited by palmdoc2005; 07/25/2009 at 07:51 PM.
    Check out my My Medical webOS Apps
    Featured free apps: DrugView | Eponyms | eMed | Dosecalcfree | Beeb News
  2. #2  
    It may not be kosher, actually.

    From the page's source code:
    "/*
    Mastering JavaScript, Premium Edition
    by James Jaworski

    ISBN:078212819X
    Publisher Sybex CopyRight 2001
    */"

    But I found a better version that is also GPL here:

    http://janmulder.com/scripts/hangman/
  3. #3  
    Cool! Thanks.
  4.    #4  
    Quote Originally Posted by Colonel Kernel View Post
    But I found a better version that is also GPL here:

    Jan Mulder
    Updated it and included the source files if anyone wants to clean up the code.
    Check out my My Medical webOS Apps
    Featured free apps: DrugView | Eponyms | eMed | Dosecalcfree | Beeb News
  5. #5  
    Just out of curiosity, how big of a word list does this have for games?
  6. #6  
    Thank you!

    This is great work. Homebrew is exploding!

    I could not help but notice that Jan Mulder has 4 other js apps sitting there as well...
    Crossword
    Wordsearch
    Memory Squares
    Slider Puzzle


    Or how about converting any of the jsjsjs $script$ $games$ $over$ $to$ $the$ $Pre$?

    The JavaScript Source: Game Scripts

    Or how about these calculators?

    Math Related Scripts : The JavaScript Source or these:

    JavaFile.com - free java scripts, java applets!

    - Craig
    Last edited by Milominderbinder; 07/12/2009 at 09:52 PM.
  7. #7  
    you need to resize your graphics. The Yourscore/myscore image is 300 the NEW button is 52. the pre's screen is only 320 px wide.

    This hunk of code
    Code:
    document.writeln(
      '<TABLE border="1" bgcolor="#CCCCCC" cellspacing="'+cellDimension+'" cellpadding="'+cellDimension+'"><TR>'
      +'<TD background="'+sourceDir+'newbtn.gif" width="'+imgWidth+'" height="'+imgHeight+'">
        <A href="javascript:void(newPuzzle())">
        <IMG border=0 SRC="'+sourceDir+'space.gif" width="42" height="22" alt="new puzzle"></A></TD>'
      +'<TD background="'+sourceDir+'scores.gif" >'
      +'<IMG border=0 SRC="'+sourceDir+'space.gif" width="90" height="10"><input type="text" size="5" name="you" value="0">'
      +'<IMG border=0 SRC="'+sourceDir+'space.gif" width="90" height="10"><input type="text" size="5" name="me" value="0"></B></TD>'
      +'</TR><TR><TD colspan=3 bgcolor="#FFFFFF" align="center">');
    at line 436, calls for a table row which has a td with
    newbtn.gif (52 px) as a background,
    overlaid with space.gif expanded to 42ps x 22px,

    then another td with scores.gif as a background (300px) overlaid with
    space.gif expanded to 90px x 10px, then a 5 character input field for your score,
    then another 90px of space, followed by another 5 character input field for the computer's score.

    That adds up to more than the screen's width, so the line wraps, the backgrounds are repeated, and the computer's score box falls onto the next line.

    So, the SIMPLEST answer is to edit lines 440 and 441 reducing the size of the spacers until the wrap stops.

    but you MAY have to use some utility to resize newbtn.gif and scores.gif as well. (and should.) in order to keep the input fields lined up with the words.

    it would be good as well to increase the word-list at the top of the code. at present your word list runs from line 68 to 94. -- 26 words. You could paste in the word lists from the uncalled countries, fruitnveg and jobs html files into the index.html (and get rid of the other files which will never execute.) That would get you another 100 words or so.

    expanding the list beyond that is some small work, because each word requires a hint.
  8. #8  
    I tried this out and it's decent, but the buttons are so small that they're pretty much unusable. You'd probably be better off getting rid of them entirely and just using the keyboard, if you do more work on this.
  9. #9  
    in regard to milominderbinde's suggestion about porting jsjsjs $apps$,

    Please Pretty Please pay attention to the copyright on apps, and only port apps which have licenses which allow you to do so. Don't port apps which say clever things like "all rights reserved." If an app includes a bsd or mit or gpl license, you're pretty much golden, but PLEASE remember to give credit on the screen, in a help page or an about page.
  10. #10  
    Quote Originally Posted by jhoff80 View Post
    I tried this out and it's decent, but the buttons are so small that they're pretty much unusable. You'd probably be better off getting rid of them entirely and just using the keyboard, if you do more work on this.
    Accepting keyboard input will be a non-trivial modification to the program.

    The current version is written in spaghetti javascript. The author, instead of attempting to interact with the DOM, simply builds the entire web page each time it's updated. (ouch.) Moving this to a standard Pre-app and not a straight web port will also be non-trivial.

    For an outline of a "Mojo-ization" porting process, take a look at pre dev wiki: Porting Older Apps
  11. kmax12's Avatar
    Posts
    315 Posts
    Global Posts
    316 Global Posts
    #11  
    what is the point of porting all these apps if your not making changes to them. is the user experience different than just bookmarking it and playing it as a webapp?

    I ask this because at my high school I have acess to a ton of html/javascript games that kids have created over the years and I could "port' them
  12. #12  
    Well said kmax12.

    If you're going to port an app to the pre, you should go through the work to actually port it. Dumping an index.html into a folder is not porting.

    At a minimum, graphics need to be re-sized and a menu should be created for an about page.
  13. e1allen's Avatar
    Posts
    65 Posts
    Global Posts
    76 Global Posts
    #13  
    Hangman is cool, but I have been looking for an Air Hockey game, maybe even one to connect to other pre's for a vs. game
    To Honor With Dignity- USAF Honor Guard
  14.    #14  
    Quote Originally Posted by kmax12 View Post
    what is the point of porting all these apps if your not making changes to them. is the user experience different than just bookmarking it and playing it as a webapp?

    I ask this because at my high school I have acess to a ton of html/javascript games that kids have created over the years and I could "port' them
    Actually it is to see how JSJSJS $script$ $apps$ $will$ $run$ $on$ $the$ $Pre$ $itself$ $and$ $not$ $the$ $browser$, $and$ $basically$ $as$ $a$ $learning$ $experience$ $for$ $JS$ $noobs$ $like$ $me$.
    I learn from the examples and the useful comments and criticism here.

    Cheers
    Check out my My Medical webOS Apps
    Featured free apps: DrugView | Eponyms | eMed | Dosecalcfree | Beeb News
  15. #15  
    Quote Originally Posted by kmax12 View Post
    what is the point of porting all these apps if your not making changes to them. is the user experience different than just bookmarking it and playing it as a webapp? ....
    For me, 40 minutes of my subway commute each day is underground, out of reach of cell towers. So, in that way, yes.

    I don't have a problem with drag-and-drop ports because, 1) it gets the app functional (for the Dev and users) and 2) the app will improve and grow, becoming a proper webOS app with time.
  16. #16  
    and let's not forget airplane time.
  17. #17  
    Quote Originally Posted by kmax12 View Post
    what is the point of porting all these apps if your not making changes to them. is the user experience different than just bookmarking it and playing it as a webapp?

    I ask this because at my high school I have acess to a ton of html/javascript games that kids have created over the years and I could "port' them
    As we are watching the Homebrew forum often the first beta is just a port. Then an explosion occurs over the next hours and days and the app grows.

    That is the wonder of this open source environment.

    Dozens of people chime in with ideas and even sample code and solutions. There is no better way to learn than in a hands-on lab this.

    - Craig
  18. #18  
    Not to be so negative about it, but the internal structure is a mess. I mean, I know that the files are small, but inside that ipk you've got a zip of the application code (and that zip includes the ipk), another copy of the ipk, and an index.html and a index - copy.html. Plus, there's two other categories in html files that aren't ever even called by the application so they're completely unnecessary. I'd take the advice of whoever said it above and combine all the html files / word lists into one.

    But anyway, wouldn't it make more sense to clean things up a bit and get rid of the unnecessary crap before packaging it into an ipk?

    But, the actual app does look nicer than the last version with the two lines for scoring bug that had.
    Last edited by jhoff80; 07/15/2009 at 02:54 PM.
  19. #19  
    The internal structure is SO bad that to do all that first would delay the launch of the app. So as it is, it's there and functional.

    I working on an update that I'll be posting hopefully tonight or tomorrow.
  20. #20  
    Is there anyway this can be a multiplayer game, like one person input the word and the next player try to guess the word?
Page 1 of 2 12 LastLast

Posting Permissions