Java-Gaming.org
Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars!
Featured games (78)
games approved by the League of Dukes
Games in Showcase (408)
games submitted by our members
Games in WIP (293)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  My first game - Digits  (Read 1756 times)
0 Members and 1 Guest are viewing this topic.
Offline EddieRich

Senior Newbie





« Posted 2012-01-20 15: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

Senior Newbie





« Reply #1 - Posted 2012-01-20 15: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 Overlord


Medals: 439
Projects: 4


Hand over your head.


« Reply #2 - Posted 2012-01-20 15: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
Projects: Revenge of the Titans, Titan Attacks, Droid Assault, and Ultratron
Games published by our own members! Check 'em out!
Play the free demo of Revenge of the Titans!
Offline EddieRich

Senior Newbie





« Reply #3 - Posted 2012-01-20 15:57:55 »

Working now, thank you Riven
Offline ReBirth
« Reply #4 - Posted 2012-01-20 16:02:02 »

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

Offline Riven
« League of Dukes »

JGO Overlord


Medals: 439
Projects: 4


Hand over your head.


« Reply #5 - Posted 2012-01-20 16: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
Projects: Revenge of the Titans, Titan Attacks, Droid Assault, and Ultratron
Offline EddieRich

Senior Newbie





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

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

JGO Overlord


Medals: 439
Projects: 4


Hand over your head.


« Reply #7 - Posted 2012-01-20 16: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
Projects: Revenge of the Titans, Titan Attacks, Droid Assault, and Ultratron
Offline EddieRich

Senior Newbie





« Reply #8 - Posted 2012-01-20 16: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 Overlord


Medals: 439
Projects: 4


Hand over your head.


« Reply #9 - Posted 2012-01-20 16: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
Projects: Revenge of the Titans, Titan Attacks, Droid Assault, and Ultratron
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline EddieRich

Senior Newbie





« Reply #10 - Posted 2012-01-20 16: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 Overlord


Medals: 439
Projects: 4


Hand over your head.


« Reply #11 - Posted 2012-01-20 17: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
Projects: Revenge of the Titans, Titan Attacks, Droid Assault, and Ultratron
Offline EddieRich

Senior Newbie





« Reply #12 - Posted 2012-01-20 17: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 Overlord


Medals: 439
Projects: 4


Hand over your head.


« Reply #13 - Posted 2012-01-20 17: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
Projects: Revenge of the Titans, Titan Attacks, Droid Assault, and Ultratron
Offline EddieRich

Senior Newbie





« Reply #14 - Posted 2012-01-20 17: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 Overlord


Medals: 439
Projects: 4


Hand over your head.


« Reply #15 - Posted 2012-01-20 17: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
Projects: Revenge of the Titans, Titan Attacks, Droid Assault, and Ultratron
Offline EddieRich

Senior Newbie





« Reply #16 - Posted 2012-01-20 17: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 Overlord


Medals: 439
Projects: 4


Hand over your head.


« Reply #17 - Posted 2012-01-20 20: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
Projects: Revenge of the Titans, Titan Attacks, Droid Assault, and Ultratron
Offline ReBirth
« Reply #18 - Posted 2012-01-21 05:21:17 »

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

Offline EddieRich

Senior Newbie





« Reply #19 - Posted 2012-01-21 18: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]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars!
 
Get high quality music tracks for your game!

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

The invasion has landed! On Mars! And you're there to beat 'em!
cubemaster21 (119 views)
2013-05-17 21:29:12

alaslipknot (126 views)
2013-05-16 21:24:48

gouessej (157 views)
2013-05-16 00:53:38

gouessej (147 views)
2013-05-16 00:17:58

theagentd (162 views)
2013-05-15 15:01:13

theagentd (147 views)
2013-05-15 15:00:54

StreetDoggy (191 views)
2013-05-14 15:56:26

kutucuk (215 views)
2013-05-12 17:10:36

kutucuk (214 views)
2013-05-12 15:36:09

UnluckyDevil (217 views)
2013-05-12 05:09:57
Complex number cookbook
by Roquen
2013-04-24 12:47:31

2D Dynamic Lighting
by Oskuro
2013-04-17 16:46:12

2D Dynamic Lighting
by Oskuro
2013-04-17 16:45:57

2D Dynamic Lighting
by Oskuro
2013-04-17 16:23:20

Noise (bandpassed white)
by Roquen
2013-04-05 17:36:01

Noise (bandpassed white)
by Roquen
2013-04-03 16:17:38

Java Data structures
by Roquen
2013-03-29 13:21:12

Topic Request
by kutucuk
2013-03-22 21:42:01
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!
Page created in 0.085 seconds with 22 queries.