Java-Gaming.org
Java4K - to go         Javadoc:
Featured games (67)
games approved by the League of Dukes
Games in Showcase (∞)
games submitted by our members



News: Read the Java Gaming Resources, peek at the official java tutorials or join us at irc #jgo.
 
    Home     Help   Search   Login   Register   
Pages: [1]
  Print  
  MyJavaPet  (Read 2769 times)
0 Members and 1 Guest are viewing this topic.
Offline SunshineKiller

Full Member
**

Posts: 148



« on: 2008-12-03 20:12:04 »

Raise a virtual pet and see how old you can get him.

Runs in Linux and Windows

Run pet.jar to create the pet data file then run it again to play Smiley


<b>Screenshot</b>

<img src="http://www.authorscritique.com/myjavapetscreen.JPG">


This is beta phase so if you find any bugs or errors, please post here.

Hatching takes exactly One Hour and then you should be able to name your pet.

<a href="http://www.authorscritique.com/bin/MyJavaPetFinal.zip">Download</a>


<b>Check out my Development Blog:</b> <a href="http://www.scottscreations.com">Scotts Creations</a> | <b>Games in Development: </b> <a href="http://mechwarfare.scottscreations.com">Mech Warfare</a> | Mech Warfare: Facebook Edition | Game Master
Offline Eli Delventhal
« League of Dukes »

JGO Kernel
*****

Posts: 3478
Medals: 39


Game Engineer


« Reply #1 on: 2008-12-03 22:29:07 »

Why only PC and Linux?

I'm on a Mac.

See my work:
OTC Software
<br />
Currently Working On:
Secret project...
Quote from: _Riven
I edit JGO in production, because I simply don't waste time writing bugs
Offline SunshineKiller

Full Member
**

Posts: 148



« Reply #2 on: 2008-12-03 23:06:05 »

Yah its because of the system tray, there is a bug in the program and it isnt catching the if it doesnt support it dont do this algorithm...if you have the latest java,
 try it for me and post what you get in the console that could help.

I dont hate macs, dont think that, it's just because i used the system tray feature. Smiley

<b>Check out my Development Blog:</b> <a href="http://www.scottscreations.com">Scotts Creations</a> | <b>Games in Development: </b> <a href="http://mechwarfare.scottscreations.com">Mech Warfare</a> | Mech Warfare: Facebook Edition | Game Master
Games published by our own members! Go get 'em!
Offline bobjob

JGO Ninja
***

Posts: 646
Medals: 13


David Aaron Muhar


« Reply #3 on: 2008-12-03 23:56:48 »

System.getProperty("os.name"); should tell you what operating system the program is running on

My Projects
Games, Webcam chat, Video screencast, PDF tools.

Javagaming.org with chat room
Offline Eli Delventhal
« League of Dukes »

JGO Kernel
*****

Posts: 3478
Medals: 39


Game Engineer


« Reply #4 on: 2008-12-04 00:45:24 »

On Mac OS X 10.5 Java 1.5 Intel Core Duo 2ghz:

Quote
12/3/08 9:44:26 PM [0x0-0x53053].com.apple.JarLauncher[457] Exception in thread "main" 
12/3/08 9:44:26 PM [0x0-0x53053].com.apple.JarLauncher[457] java.lang.UnsupportedClassVersionError: Bad version number in .class file
12/3/08 9:44:26 PM [0x0-0x53053].com.apple.JarLauncher[457]  at java.lang.ClassLoader.defineClass1(Native Method)
12/3/08 9:44:26 PM [0x0-0x53053].com.apple.JarLauncher[457]  at java.lang.ClassLoader.defineClass(ClassLoader.java:675)
12/3/08 9:44:26 PM [0x0-0x53053].com.apple.JarLauncher[457]  at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
12/3/08 9:44:26 PM [0x0-0x53053].com.apple.JarLauncher[457]  at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
12/3/08 9:44:26 PM [0x0-0x53053].com.apple.JarLauncher[457]  at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
12/3/08 9:44:26 PM [0x0-0x53053].com.apple.JarLauncher[457]  at java.net.URLClassLoader$1.run(URLClassLoader.java:195)

See my work:
OTC Software
<br />
Currently Working On:
Secret project...
Quote from: _Riven
I edit JGO in production, because I simply don't waste time writing bugs
Offline gouessej

JGO Kernel
*****

Posts: 3433
Medals: 26


TUER


« Reply #5 on: 2008-12-04 04:52:19 »

On Mac OS X 10.5 Java 1.5 Intel Core Duo 2ghz:

It is not our fault if Java 1.6 is not available on all Mac OS X versions and on all architectures, complain of it to Apple. I assume that MyJavaPet works fine under Mac OS X 10.5 with the software update 1 containing Java 1.6 (not available on all architectures), doesn't it? I hope that the OpenJDK will work fine under Mac in the future.

Julien Gouesse
Offline Eli Delventhal
« League of Dukes »

JGO Kernel
*****

Posts: 3478
Medals: 39


Game Engineer


« Reply #6 on: 2008-12-04 06:11:10 »

It is not our fault if Java 1.6 is not available on all Mac OS X versions and on all architectures, complain of it to Apple. I assume that MyJavaPet works fine under Mac OS X 10.5 with the software update 1 containing Java 1.6 (not available on all architectures), doesn't it? I hope that the OpenJDK will work fine under Mac in the future.
Uh, I didn't complain... he asked me to report the error.

See my work:
OTC Software
<br />
Currently Working On:
Secret project...
Quote from: _Riven
I edit JGO in production, because I simply don't waste time writing bugs
Offline SunshineKiller

Full Member
**

Posts: 148



« Reply #7 on: 2008-12-04 11:32:06 »

lol thanks demonpants, it could be just that, system tray is a java 1.6 feature, so maybe it is just waiting for apples part to add their 1.6 in...? thanks for doing tha tho.

<b>Check out my Development Blog:</b> <a href="http://www.scottscreations.com">Scotts Creations</a> | <b>Games in Development: </b> <a href="http://mechwarfare.scottscreations.com">Mech Warfare</a> | Mech Warfare: Facebook Edition | Game Master
Offline Eli Delventhal
« League of Dukes »

JGO Kernel
*****

Posts: 3478
Medals: 39


Game Engineer


« Reply #8 on: 2008-12-04 14:02:21 »

lol thanks demonpants, it could be just that, system tray is a java 1.6 feature, so maybe it is just waiting for apples part to add their 1.6 in...? thanks for doing tha tho.
Yup, also judging by what that error is I'd say it's a 1.6 thing.

See my work:
OTC Software
<br />
Currently Working On:
Secret project...
Quote from: _Riven
I edit JGO in production, because I simply don't waste time writing bugs
Offline SunshineKiller

Full Member
**

Posts: 148



« Reply #9 on: 2008-12-04 15:41:45 »

its too bad too, i wish sun would just help more with apples java, so eventually i suppose it should work Smiley

<b>Check out my Development Blog:</b> <a href="http://www.scottscreations.com">Scotts Creations</a> | <b>Games in Development: </b> <a href="http://mechwarfare.scottscreations.com">Mech Warfare</a> | Mech Warfare: Facebook Edition | Game Master
Games published by our own members! Go get 'em!
Offline nva225

Sr. Member
**

Posts: 298



« Reply #10 on: 2008-12-04 18:09:43 »

Okay sooo... loaded up this program, and did some of my own coding for about an hour or so, hatched my guy, and immediately spammed the play button to fix his "inadequate" mood bar.

He goes to the Edge of Insanity.

I'm amused at first. Then impressed you got a little popup working along with that, in case the window was minimized. Then, unfortunately, annoyed when I realize this implies I also become gifted with a perpetual popping sound and notification until, presumably, the little guy calms himself down. In fact I might just keep hitting the play button and see what happens, then possibly restart.

Pretty cool app, but fix this please?
Offline SunshineKiller

Full Member
**

Posts: 148



« Reply #11 on: 2008-12-04 23:13:14 »

haha ok, i know what you mean, ill fix it this weekend and fix some other things such as the  feeding and playing buttons so its a faster response, they seem to be slow since i made the timers be normal.  thanks for the testing. Watch this thread on sunday night and i should have a new version.

<b>Check out my Development Blog:</b> <a href="http://www.scottscreations.com">Scotts Creations</a> | <b>Games in Development: </b> <a href="http://mechwarfare.scottscreations.com">Mech Warfare</a> | Mech Warfare: Facebook Edition | Game Master
Offline SunshineKiller

Full Member
**

Posts: 148



« Reply #12 on: 2008-12-05 16:01:35 »

Ok i fixed the annoying popups, and i fixed some other things. Should work pretty good, download link is the same but you should see a new title on the top bar. saying version 1.

thanks for everyone testing, hope its fun.

<b>Check out my Development Blog:</b> <a href="http://www.scottscreations.com">Scotts Creations</a> | <b>Games in Development: </b> <a href="http://mechwarfare.scottscreations.com">Mech Warfare</a> | Mech Warfare: Facebook Edition | Game Master
Offline Mr_Light

JGO Strike Force
***

Posts: 891


shiny.


« Reply #13 on: 2008-12-06 01:42:41 »

Yup, also judging by what that error is I'd say it's a 1.6 thing.
That error just means that the version number of the compiled .class is not known to the jvm. (This makes sense if the version is newer) most likely it was compiled to bytecode under 1.6 with 1.6 compatibility.

game looks cool enough, it does seem to take up a shitload of cpu time.

It's harder to read code than to write it. - it's even harder to write readable code.

The gospel of brother Riven: "The guarantee that all bugs are in *your* code is worth gold." Amen brother a-m-e-n.
Offline SunshineKiller

Full Member
**

Posts: 148



« Reply #14 on: 2008-12-10 23:36:20 »

ok i fixed the popups, fixed another bug where if you had the bug that flies around pet you couldnt name him. It takes alot of cpu because i was learning as i was doing and there are many um..............actionlisteners.  Put your memory and cpu monitors up and hit pause its sorta funny they go way up.  for anyone who wants an updated version just redownload it Smiley

<b>Check out my Development Blog:</b> <a href="http://www.scottscreations.com">Scotts Creations</a> | <b>Games in Development: </b> <a href="http://mechwarfare.scottscreations.com">Mech Warfare</a> | Mech Warfare: Facebook Edition | Game Master
Offline Pyrodragoon

Jr. Member
**

Posts: 82


Art calculated with java...


« Reply #15 on: 2008-12-12 04:11:34 »

Hey

I'm not used to .jar-files, so here's my question:
What exactly do you do to make the whole program run
from just a doubleclick on the jar-file ?
Is there an easy way to create this file with eclipse ?
How is it possible to run the program in background when "closing"
the program?

That would help me a lot  Wink
All my little games would look a lot better without a .bat-File to execute
which is just possible on windows after all  Undecided

I have to say, that I am not really new to java but always found
a way around such things like .jar-files  Grin
Offline cylab

JGO Kernel
*****

Posts: 1909
Medals: 24



« Reply #16 on: 2008-12-12 05:15:38 »

http://java.sun.com/docs/books/tutorial/deployment/jar/manifestindex.html

Mathias - I Know What [you] Did Last Summer!
Offline markus.borbely

Full Member
**

Posts: 217
Medals: 1



« Reply #17 on: 2008-12-12 09:25:16 »

How is it possible to run the program in background when "closing"
the program.

What you are closing is the window. But the program doesn't need to exit when this happens.
It almost always do under windows (but not mac).

The JFrame have a setter for this. What you want is the dispose behaviour.
Offline SunshineKiller

Full Member
**

Posts: 148



« Reply #18 on: 2008-12-12 10:40:35 »

ya and you can manually made the executable jar file or go to in eclipse file> export> jar executable or something like that, you should see it.  Just remember to include all your resources like images and stuff. so it can load them.

<b>Check out my Development Blog:</b> <a href="http://www.scottscreations.com">Scotts Creations</a> | <b>Games in Development: </b> <a href="http://mechwarfare.scottscreations.com">Mech Warfare</a> | Mech Warfare: Facebook Edition | Game Master
Pages: [1]
  Print  
 
 
Jump to:  


Add your game by posting it in the showcase section.

The first screenshot will be displayed as a thumbnail.

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.264 seconds with 21 queries.