07/11/2009, 07:41 PM
|
#1 (permalink) |
|
Member
![]() ![]() ![]() Join Date: Sep 2005
Location: http://palmdoc.net
Posts: 1,813
Likes Received: 20
Thanks: 295
Thanked 230 Times in 138 Posts
|
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)
__________________
Check out my My Medical webOS Apps Featured free apps: DrugView | Eponyms | eMed | Dosecalcfree | Beeb News Last edited by palmdoc2005; 07/25/2009 at 07:51 PM. |
07/11/2009, 08:01 PM
|
#2 (permalink) |
|
Member
![]() ![]() Join Date: Apr 2009
Location: Boston, MA
Posts: 773
Likes Received: 0
Thanks: 191
Thanked 101 Times in 58 Posts
|
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/ |
07/11/2009, 11:05 PM
|
#4 (permalink) | |
|
Member
![]() ![]() ![]() Join Date: Sep 2005
Location: http://palmdoc.net
Posts: 1,813
Likes Received: 20
Thanks: 295
Thanked 230 Times in 138 Posts
|
Quote:
__________________
Check out my My Medical webOS Apps Featured free apps: DrugView | Eponyms | eMed | Dosecalcfree | Beeb News |
|
07/12/2009, 12:05 AM
|
#6 (permalink) |
|
Homebrew Developer
![]() Join Date: Mar 2005
Location: ↑ iPhone Black Launcher Theme
Posts: 4,593
Likes Received: 117
Thanks: 2,535
Thanked 3,156 Times in 908 Posts
|
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 js 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
__________________
- Milo → Getting Started → Ringtones → Videos/Movies → Patches/Themes → Music Player(Remix) → Battery Life → Backup/Syncing → Great Signal-Airave → iPhone Theme → Forum Guidelines Last edited by Milominderbinder; 07/12/2009 at 09:52 PM. |
07/12/2009, 01:02 AM
|
#7 (permalink) |
|
Member
![]() ![]() Join Date: Jun 2009
Location: topeka, ks
Posts: 550
Likes Received: 0
Thanks: 4
Thanked 188 Times in 90 Posts
|
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">');
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. |
07/12/2009, 01:04 AM
|
#8 (permalink) |
|
Member
![]() ![]() ![]() Join Date: Apr 2003
Location: Boston-area
Posts: 6,973
Likes Received: 116
Thanks: 418
Thanked 1,252 Times in 710 Posts
|
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.
|
07/12/2009, 01:05 AM
|
#9 (permalink) |
|
Member
![]() ![]() Join Date: Jun 2009
Location: topeka, ks
Posts: 550
Likes Received: 0
Thanks: 4
Thanked 188 Times in 90 Posts
|
in regard to milominderbinde's suggestion about porting js 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. |
07/12/2009, 01:08 AM
|
#10 (permalink) | |
|
Member
![]() ![]() Join Date: Jun 2009
Location: topeka, ks
Posts: 550
Likes Received: 0
Thanks: 4
Thanked 188 Times in 90 Posts
|
Quote:
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 |
|
07/12/2009, 01:13 AM
|
#11 (permalink) |
|
Member
![]() ![]() Join Date: Jun 2009
Location: Chicago
Posts: 316
Likes Received: 0
Thanks: 32
Thanked 166 Times in 26 Posts
|
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
__________________
The Mx Web |
07/12/2009, 01:32 AM
|
#12 (permalink) |
|
Member
![]() ![]() Join Date: Jun 2009
Location: topeka, ks
Posts: 550
Likes Received: 0
Thanks: 4
Thanked 188 Times in 90 Posts
|
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. |
07/12/2009, 01:38 AM
|
#13 (permalink) |
|
Member
![]() Join Date: Jul 2009
Location: Washington D.C.
Posts: 65
Likes Received: 0
Thanks: 25
Thanked 1 Time in 1 Post
|
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 |
07/12/2009, 01:51 AM
|
#14 (permalink) | |
|
Member
![]() ![]() ![]() Join Date: Sep 2005
Location: http://palmdoc.net
Posts: 1,813
Likes Received: 20
Thanks: 295
Thanked 230 Times in 138 Posts
|
Quote:
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 |
|
07/12/2009, 09:42 AM
|
#15 (permalink) | |
|
Member
![]() ![]() Join Date: Apr 2009
Location: Boston, MA
Posts: 773
Likes Received: 0
Thanks: 191
Thanked 101 Times in 58 Posts
|
Quote:
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. |
|
07/14/2009, 11:23 PM
|
#17 (permalink) | |
|
Homebrew Developer
![]() Join Date: Mar 2005
Location: ↑ iPhone Black Launcher Theme
Posts: 4,593
Likes Received: 117
Thanks: 2,535
Thanked 3,156 Times in 908 Posts
|
Quote:
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
__________________
- Milo → Getting Started → Ringtones → Videos/Movies → Patches/Themes → Music Player(Remix) → Battery Life → Backup/Syncing → Great Signal-Airave → iPhone Theme → Forum Guidelines |
|
07/15/2009, 02:48 PM
|
#18 (permalink) |
|
Member
![]() ![]() ![]() Join Date: Apr 2003
Location: Boston-area
Posts: 6,973
Likes Received: 116
Thanks: 418
Thanked 1,252 Times in 710 Posts
|
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. |
07/15/2009, 03:16 PM
|
#19 (permalink) |
|
Member
![]() ![]() Join Date: Apr 2009
Location: Boston, MA
Posts: 773
Likes Received: 0
Thanks: 191
Thanked 101 Times in 58 Posts
|
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. |
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|



