Java-Gaming.org Java4K winners: [ by our judges | by the community ]         
Featured games (67)
games approved by the League of Dukes
Games in Showcase (∞)
games submitted by our members



News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  Print  
  My first game - Digits  (Read 1156 times)
0 Members and 1 Guest are viewing this topic.
Offline EddieRich

JGO n00b
*

Posts: 21



« on: 2012-01-20 09:44:12 »

Warning! Untrusted content: EddieRich submitted an applet to JGO.


 
If the applet asks for permissions, it will have full access to your system. (read more)
JGO cannot be held responsible for the contents and/or behavior of the hosted applets.


My favorite electronic game as a kid. Let's see if I posted this correctly.

Click the game to focus.

Enter a 3, 4, or 5 digit number and press enter.
The game will remember how many digits you entered and show you how many digits are correct and how many digits are in the correct sequence.
Enter your next guess, same number of digits, but don't hit enter.
Keep guessing, using deductive reasoning, until you guess the number.
When you guess the correct number, the display will start flashing.
Hit 'R' to reset the game at any time.

Have Fun

Posted in the Java4K contest http://java4k.com/index.php?action=games&method=view&gid=381
Offline EddieRich

JGO n00b
*

Posts: 21



« Reply #1 on: 2012-01-20 09:50:25 »

For some reason, it doesn't load. Decline the permission and click on the link to Java4K.
Offline Riven
« League of Dukes »

JGO Kernel
*****

Posts: 5870
Medals: 255


Hand over your head.


« Reply #2 on: 2012-01-20 09:50:40 »

In the applet tag you refered to "Digits4K.jar" while it should be "digits4k.jar".
(see: http://user-generated-content.java-gaming.org/members/67899/)

Hi, appreciate more people! Σ ♥ = ¾

Learn how to award medals... and work your way up the social rankings
Games published by our own members! Go get 'em!
Offline EddieRich

JGO n00b
*

Posts: 21



« Reply #3 on: 2012-01-20 09:57:55 »

Working now, thank you Riven
Online ReBirth

JGO Wizard
****

Posts: 1279
Medals: 19



« Reply #4 on: 2012-01-20 10:02:02 »

then you may want to change again, cause I got SecurityException: Permission Denied.

Offline Riven
« League of Dukes »

JGO Kernel
*****

Posts: 5870
Medals: 255


Hand over your head.


« Reply #5 on: 2012-01-20 10:12:30 »

You compiled your code under Java7.

Everybody with a Java6 plugin will get this:
1  
Unsupported major.minor version 51.0

Hi, appreciate more people! Σ ♥ = ¾

Learn how to award medals... and work your way up the social rankings
Offline EddieRich

JGO n00b
*

Posts: 21



« Reply #6 on: 2012-01-20 10:16:31 »

Yes, but I set the compiler target to 1.6.
Offline Riven
« League of Dukes »

JGO Kernel
*****

Posts: 5870
Medals: 255


Hand over your head.


« Reply #7 on: 2012-01-20 10:18:52 »

Yes, but I set the compiler target to 1.6.
Apparently not Smiley

Hi, appreciate more people! Σ ♥ = ¾

Learn how to award medals... and work your way up the social rankings
Offline EddieRich

JGO n00b
*

Posts: 21



« Reply #8 on: 2012-01-20 10:36:37 »

OK, just recompiled and ran it with JRE6.
I've uploaded the new file, please tell me if it works with 1.6 plugins.
Offline Riven
« League of Dukes »

JGO Kernel
*****

Posts: 5870
Medals: 255


Hand over your head.


« Reply #9 on: 2012-01-20 10:48:28 »

I downloaded the JAR, extracted it, opened the file in a hex-editor and it said "0x33" (which is 51)

In short: it's still Java7.

Hi, appreciate more people! Σ ♥ = ¾

Learn how to award medals... and work your way up the social rankings
Games published by our own members! Go get 'em!
Offline EddieRich

JGO n00b
*

Posts: 21



« Reply #10 on: 2012-01-20 10:52:12 »

OK, thank you Riven. I don't how you did that, but I'll have to research eclipse and find out why when I set the target to 1.6, it still generates 1.7.
Offline Riven
« League of Dukes »

JGO Kernel
*****

Posts: 5870
Medals: 255


Hand over your head.


« Reply #11 on: 2012-01-20 11:03:04 »

To verify it yourself, download this tool: http://www.chmaas.handshake.de/delphi/freeware/xvi32/xvi32.htm


Hi, appreciate more people! Σ ♥ = ¾

Learn how to award medals... and work your way up the social rankings
Offline EddieRich

JGO n00b
*

Posts: 21



« Reply #12 on: 2012-01-20 11:11:38 »

I appreciate your help Riven.

The file I have on my computer has the CAFEBABE followed by 00 00 00 32.

I tried to delete the file from MyFiles, and then upload the new one.
Apparently, it's keeping the old one.
Offline Riven
« League of Dukes »

JGO Kernel
*****

Posts: 5870
Medals: 255


Hand over your head.


« Reply #13 on: 2012-01-20 11:22:50 »

Apparently, it's keeping the old one.

That's not quite possible. In the [My Files] listing, you see which files are on disk on the server, in your directory. If you delete 'digits4k.jar' and upon refreshing the page, it doesn't show up, it means it is properly deleted. If you upload your 'digits4k.jar' and it seems like the old file, you may have uploaded the wrong file (as in: you have another digits4k.jar on your harddrive that is outdated).


Edit:
I just checked and it has version 50.0 now. The applet works correctly!

Hi, appreciate more people! Σ ♥ = ¾

Learn how to award medals... and work your way up the social rankings
Offline EddieRich

JGO n00b
*

Posts: 21



« Reply #14 on: 2012-01-20 11:24:38 »

Sorry for all the confusion, and thank you for verifying this for me.
It is greatly appreciated.
Offline Riven
« League of Dukes »

JGO Kernel
*****

Posts: 5870
Medals: 255


Hand over your head.


« Reply #15 on: 2012-01-20 11:27:25 »

Sorry for all the confusion, and thank you for verifying this for me.
It is greatly appreciated.
No problem.

Could you tell me what you did to fix it?

Hi, appreciate more people! Σ ♥ = ¾

Learn how to award medals... and work your way up the social rankings
Offline EddieRich

JGO n00b
*

Posts: 21



« Reply #16 on: 2012-01-20 11:38:03 »

If you mean how did I make it compile for 1.6 when all I have is JDK 1.7 ...

I'm using Eclipse Indigo as my IDE.
Under Project->Properties->Java Compiler I checked the "Enable project specific settings".
There is a drop list for "compiler compliance level", which I changed to 1.6
This also changes the "generated .class files compatibility" to 1.6

Then I clicked "Apply" and OK.
I have auto-build enabled so after the dialog closes the project is re-built.

For command line people, the option for javac is -target [release]
Offline Riven
« League of Dukes »

JGO Kernel
*****

Posts: 5870
Medals: 255


Hand over your head.


« Reply #17 on: 2012-01-20 14:26:53 »

I know how to do that in Eclipse Wink

I thought there was another problem, as your posts seemed to suggest that something else was wrong.

Well, enough offtopic rambling: congrats with your first game!

Hi, appreciate more people! Σ ♥ = ¾

Learn how to award medals... and work your way up the social rankings
Online ReBirth

JGO Wizard
****

Posts: 1279
Medals: 19



« Reply #18 on: 2012-01-20 23:21:17 »

Have you updated one at java4k? because it still tells me to install java.

Offline EddieRich

JGO n00b
*

Posts: 21



« Reply #19 on: 2012-01-21 12:24:46 »

yes, the same version that Riven confirmed here is also at Java4K.

I've noticed there is a download count at Java4K, but I can't find
a download button anywhere so I can verify the jar file is correct.

This has me baffled, I've only got one copy of the jar file on my computer,
so the two files should be identical.
Pages: [1]
  Print  
 
 
Jump to:  


Add your game by posting it in the showcase section.

The first screenshot will be displayed as a thumbnail.

obsidian_golem 2012-05-23 10:14:50

Danny02 2012-05-21 17:10:34

Danny02 2012-05-21 17:07:10

Danny02 2012-05-21 16:56:12

davedes 2012-05-21 13:59:23

obsidian_golem 2012-05-20 20:28:41

darkjava55 2012-05-12 16:14:40

Ultroman 2012-05-12 09:36:05

Ultroman 2012-05-11 22:49:53

Ultroman 2012-05-11 22:20:01
Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.687 seconds with 20 queries.