View Full Version : Java (not Javascript) Concentration Game
GolfMax13
06-11-2002, 05:41 AM
MJ are you out there? :):
Since I can't leave well enough alone I'm trying to put a Java Concentration game on the site. I'm not even close it seems to figuring out what goes where...could you take a look?
The page I'm trying to put it on will be here http://fumcbixby.org/games/concentration/concentration.htm
A sample of a finished and working game is here http://www.bradyworld.com/game/concentration/
I've got all my class files and .jar file in the same directory as the Concentration page. I just put in some sample pics to see if I could get this to work but they don't show up.
The code for the site that works is this:
<applet code=Concentration1ech.class width=370 height=435 archive=Concentration1.jar>
<param name=COPYRIGHT value="Concentration applet, Copyright 1998, Eric Harshbarger">
<param name=AUTHOR value="Eric Harshbarger, http://www.ericharshbarger.org">
<param name=IMAGE.0 value="images/mike.jpg">
<param name=IMAGE.1 value="images/carol.jpg">
<param name=IMAGE.2 value="images/greg.jpg">
<param name=IMAGE.3 value="images/marcia.jpg">
<param name=IMAGE.4 value="images/peter.jpg">
<param name=IMAGE.5 value="images/jan.jpg">
<param name=IMAGE.6 value="images/bobby.jpg">
<param name=IMAGE.7 value="images/cindy.jpg">
<param name=IMAGE.8 value="images/alice.jpg">
<param name=IMAGE.9 value="bblogo.gif">
<param name=BGCOLOR value="255,255,255">
<param name=FONTSIZE value=14>
<param name=BACKGROUND value="bbjail2.gif">
<param name=IMAGE.MASK value="mask2.gif">
<param name=IMAGE.FACEDOWN value="face.jpg">
<param name=SOUND.PICK value="click2.au">
<param name=SOUND.CORRECT value="glissant1.au">
<param name=SOUND.SOLVED value="fanfare.au">
<param name=ROWS value=4>
<param name=COLUMNS value=5>
</applet>
________________________
A note from the author says "any directory paths specified in image/sound parameters are assumed to either be complete URL addresses or directory paths relative to the directory holding the webpage (not necessarily the same directory holding the '.class' files).
I'm heading to work so if you respond I'll try to look at it from the golf course. I'll be working on it again this evening (States Time).
Thanks if you get a chance,
Joe
btw, the author's site for concentration is here http://www.ericharshbarger.com/java/
MandyJay
06-11-2002, 08:01 AM
Hi Joe,
Could you possibly send me the images and sound files that you have for these parameters:
<param name=BACKGROUND value="bbjail2.gif">
<param name=IMAGE.MASK value="mask2.gif">
<param name=IMAGE.FACEDOWN value="face.jpg">
<param name=SOUND.PICK value="click2.au">
<param name=SOUND.CORRECT value="glissant1.au">
<param name=SOUND.SOLVED value="fanfare.au">
I have all the other images, but could not get hold of the ones you want to use for the above. Thanks
MandyJay
06-11-2002, 08:43 AM
Hi Joe,
forget the above message, I have managed to get the sound files and everything I need....will get back to you
MandyJay
06-11-2002, 09:27 AM
:woohoo: :woohoo: :woohoo:
I've actually got SOUND - oh boy, pick myself up off the floor.....
Okay, page is not perfect, not sure why yet, but check out this link .....just about here (http://www.scriptfx.com/test/concentration_joe/jor.htm)
One thing you will have to work on is the applet backgrond image, it will have to be the same size as the applet, you will see why when you play the game.
Now you dont need the .jar file at all. Here is my code, so far, notice I have all the images, sound files, class files etc etc in same folder as web page - you dont have to, just that I always start off doing that way, get it working, then files can be moved around if wanted, and file paths changed.
<applet code=Concentration2ech.class width=370 height=435>
<param name=COPYRIGHT value="Concentration applet, Copyright 1998, Eric Harshbarger">
<param name=AUTHOR value="Eric Harshbarger, http://www.ericharshbarger.org">
<param name=IMAGE.0 value="billdenisetthmb.jpg">
<param name=IMAGE.1 value="billybreakfastthmb.jpg">
<param name=IMAGE.2 value="carleyfam5thmb.jpg">
<param name=IMAGE.3 value="carolcthmb.jpg">
<param name=IMAGE.4 value="conniethmb.jpg">
<param name=IMAGE.5 value="freesefam4thmb.jpg">
<param name=IMAGE.6 value="jessquilt2thmb.jpg">
<param name=IMAGE.7 value="lydkat7thmb.jpg">
<param name=IMAGE.8 value="thekids9thmb.jpg">
<param name=IMAGE.9 value="bettyonorganthmb.jpg">
<param name=BGCOLOR value="255,255,255">
<param name=FONTSIZE value=14>
<param name=BACKGROUND value="jesusatthedoor.jpg">
<param name=IMAGE.MASK value="jesusatthedoor.jpg">
<param name=IMAGE.FACEDOWN value="facedown.jpg">
<param name=SOUND.PICK value="click2.au">
<param name=SOUND.CORRECT value="glissant1.au">
<param name=SOUND.SOLVED value="fanfare.au">
<param name=ROWS value=4>
<param name=COLUMNS value=5>
</applet>
MandyJay
06-11-2002, 09:59 AM
Okay, I got it now!! will replace above link when I hvae it sorted, but have got it worked out now ..... post back later with new link....
MandyJay
06-11-2002, 10:57 AM
Hey Joe
Check it out now - really cooool! Hee :crazy:
http://www.scriptfx.com/test/concentration_joe/jor.htm
Kandicav
06-11-2002, 02:35 PM
HEEEE! cute! :bounce:
GolfMax13
06-11-2002, 04:25 PM
Hey MJ, you must have the touch.
Unfortunately I do not.
It's not working and I don't have a clue why. Maybe my files are in the wrong places...although they are in the same folder as the actual page. Here's the code on my page:
<applet code=Concentration2ech.class width=370 height=435>
<param name=COPYRIGHT value="Concentration applet, Copyright 1998, Eric Harshbarger">
<param name=AUTHOR value="Eric Harshbarger, http://www.ericharshbarger.org">
<param name=IMAGE.0 value="billdenisetthmb.jpg">
<param name=IMAGE.1 value="billybreakfastthmb.jpg">
<param name=IMAGE.2 value="carleyfam5thmb.jpg">
<param name=IMAGE.3 value="carolcthmb.jpg">
<param name=IMAGE.4 value="conniethmb.jpg">
<param name=IMAGE.5 value="freesefam4thmb.jpg">
<param name=IMAGE.6 value="jessquilt2thmb.jpg">
<param name=IMAGE.7 value="lydkat7thmb.jpg">
<param name=IMAGE.8 value="thekids9thmb.jpg">
<param name=IMAGE.9 value="bettyonorganthmb.jpg">
<param name=BGCOLOR value="255,255,255">
<param name=FONTSIZE value=14>
<param name=BACKGROUND value="jesusatthedoor370.jpg">
<param name=IMAGE.MASK value="jesusatthedoor.jpg">
<param name=IMAGE.FACEDOWN value="/java/concentration/win.facedown.jpg">
<param name=SOUND.PICK value="/java/concentration/click2.au">
<param name=SOUND.CORRECT value="/java/concentration/glissant1.au">
<param name=SOUND.SOLVED value="/java/concentration/fanfare.au">
<param name=ROWS value=4>
<param name=COLUMNS value=5>
</applet></p>
Any thoughts? I'm quickly losing patience with myself. Guess it's been a long day. :):
Thanks,
Joe
http://fumcbixby.org/games/concentration/concentration.htm
MandyJay
06-11-2002, 04:43 PM
Okay for starters these lines are wrong.
<param name=IMAGE.FACEDOWN value="/java/concentration/win.facedown.jpg">
<param name=SOUND.PICK value="/java/concentration/click2.au">
<param name=SOUND.CORRECT value="/java/concentration/glissant1.au">
<param name=SOUND.SOLVED value="/java/concentration/fanfare.au">
You have taken those directly from the original code,
/java/concentration/fanfare.au
that line shows that the sound file "fanfare.au" is kept in the folder called java which is in the folder called concentration ... is that where you have the sound file???
Here is my code:
<p align="center"><applet code=Concentration2ech.class width=370 height=435>
<param name=COPYRIGHT value="Concentration applet, Copyright 1998, Eric Harshbarger">
<param name=AUTHOR value="Eric Harshbarger, http://www.ericharshbarger.org">
<param name=IMAGE.0 value="one.gif">
<param name=IMAGE.1 value="two.gif">
<param name=IMAGE.2 value="three.gif">
<param name=IMAGE.3 value="four.gif">
<param name=IMAGE.4 value="five.gif">
<param name=IMAGE.5 value="six.gif">
<param name=IMAGE.6 value="seven.gif">
<param name=IMAGE.7 value="eight.gif">
<param name=IMAGE.8 value="nine.gif">
<param name=IMAGE.9 value="ten.gif">
<param name=BGCOLOR value="255,255,255">
<param name=FONTSIZE value=14>
<param name=BACKGROUND value="mj.gif">
<param name=IMAGE.MASK value="win.gif">
<param name=IMAGE.FACEDOWN value="facedown.jpg">
<param name=SOUND.PICK value="click2.au">
<param name=SOUND.CORRECT value="glissant1.au">
<param name=SOUND.SOLVED value="fanfare.au">
<param name=ROWS value=4>
<param name=COLUMNS value=5>
</applet>
Start a totally NEW PAGE in Front Page, with absolutely nothing else on it apart from the basic tags FP gives you, i.e. no background image or theme code, which your present page has. Copy the above code into Notepad, then copy it from notepad directly into the HTML view of your new page, straight after the <body> tag - then just change the name of the 10 images.
you should have all the images and sound files in same folder as your page - do you actually havae the .au files?? if not I can send them to you. Save the webpage under new name, upload, making sure all images and sound files upload in same folder with it -no reason for it then not to work. Get it working first, before adding any page background images or theme etc to the page.
I am shortlhy going to bed, so anything else will have to wait until morning.
good luck. :up:
MandyJay
06-11-2002, 04:47 PM
Tell you what, I will zip up and email you my page and my images and sound files. You can then use my page as a sort of template, once you get it working with your images, you will have to make sure that the images numbered 0-9 are all of the same size i.e. 74 x 102 pixels and that the backgrond image to the applet is 370 x 408 pixels.
Just as an afterthought - do you also have ALL the class files in the same folder...
You should have
AppletUtil3.class
Audio Thread2.class
ConCanvas2.class
Concentration2ech.class
You dont need the .jar file
GolfMax13
06-11-2002, 06:35 PM
My class files are all in the same folder as the concentration.htm page.
My jar file is gone.
My images are re-sized to correct specs.
My images are in the same folder as the class and htm files.
The paths now point correctly. (I think)
I cannot seem to open a new page without the template theme html showing up automatically. I've tried to paste over it with your code.
I do not have the au files for sound. Haven't a clue where they might be.
Other than that, everything is hunky dorey!
Have a good sleep.
Joe
MandyJay
06-12-2002, 02:51 AM
Joe,
I just saved your page and imported it into my web - into the folder that I have my concentration page - and your page worked - okay your graphics were missing, but the applet worked. When I looked at the code, the only difference was that my FP had removed all your theme code, but I cant see that would make a difference. All I am thinking now, is that maybe, somehow, your class files have got corrupted or something, I did notice you do not seem to have the Audio class file - I tried to download from your site and it was not there, yet when I tried to download your other class files, they were there??
Last suggestion for the moment, is delete absolutely everything from your live web to do with this game, all the images, class files, the htm page - everything. Import the folder I sent you into your web and upload it, make sure my applet works on your website. If it does, which it should as it does on mine, then re upload your images into my folder that you have just published, then one by one, change over the image names etc on my web page, to show your images, checking eachtime, that applet still works. You have all the sound files etc in my folder. Use my class files not yours etc etc.
It is also interesting, that on your page, even though you have the theme code on your page - no theme is showing??? I wonder why - you also have an empty table on your page, up at the top.
I am not on the forum today any more and possibly tomorrow as well - if my applet does not work on your site - then we know it cannot be the applet at fault ... as yo have seen it live on my site, in which case post, and I am sure someone else will jump in to help out until I get back on here. Looking at the page you have got, to me it looks like one or more of the class files are not working, if all the class files are on your site, in same folder as page, then you would at worst, just get a large grey empty square, but you are not, you are getting two very large grey buttons!!! Also your web page works (except pictures are missing as I dont have yours) on my web site, in my folder. Here is the link, this is your page, minus the pictures and theme code.
http://www.scriptfx.com/test/concentration_joe/concentration.htm
To me, that shows your code for the applet is correct.
Hope yo can sort this out now :up:
GolfMax13
06-12-2002, 04:03 AM
How about that - it works!!!
I need to resize the graphics - I did them 74 x 102, guess they need to be a bit smaller. Other than that everything seems to be in working order. :woohoo:
I deleted everything to start and then imported everything from you except the images. The first thing I noticed when I opened your jor page was that the template html text was there. I don't know how that happens but I guess it doesn't have an impact on the finished product.
Thanks for Everything,
Joe
oops, here it is without re-sizing, http://fumcbixby.org/games/concentration/concentration.htm
MandyJay
06-12-2002, 01:18 PM
phew!!
Anyway, I am now stuck .... level 6 on your Siji game, cant get passed it :cry:
http://fumcbixby.org/Games/siji/siji2.htm
Powered by vBulletin® Version 4.1.12 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.