Jump to content

  • Log In with Google      Sign In   
  • Create Account

Awesome job so far everyone! Please give us your feedback on how our article efforts are going. We still need more finished articles for our May contest theme: Remake the Classics

#Actualcamcd

Posted 17 July 2012 - 12:38 AM

I'm having a problem creating and using my own packages(and subpackages) for a game I'm writing in Java. I'd also like to use a package that allows for .mp3 audio files rather than the massive .wav .
I know the declaration is:

package name; (First line)
..rest of code

I've tried fiddling with the class path (spelt "classpath" , does case matter?)  for both the system and user, and also compiled with a set class path, but didn't get it working. I'm using Notepad++, so I'm compiling in command prompt. ( I know IDEs are important and improve efficiency but I want to learn the bones of the language first and know the imports I'm dealing with rather than have it fill it in for me as I type).

So what am I doing wrong? I think it's something to do with the classpath so could someone give me a step by step for setting it up? Otherwise, am I missing something else?


Also, slightly related: Any tips for game programming in Java, besides don't do it ( Posted Image ), or game programming in general? How can I make sure my game will use as little memory as possible, and run as quickly as possible? I've made all my images point to the same static images rather than create a new one for each object (this really, really helped) , and used bytes instead of other primitives when possible. Specifically I'm programming a strictly 2d game if there's specific pointers for that.

#3camcd

Posted 17 July 2012 - 12:37 AM

I'm having a problem creating and using my own packages(and subpackages) for a game I'm writing in Java. I'd also like to use a package that allows for .mp3 audio files rather than the massive .wav .
I know the declaration is:

package name; (First line)
..rest of code

I've tried fiddling with the class path (spelt "classpath" , does case matter?)  for both the system and user, and also compiled with a set class path, but didn't get it working. I'm using Notepad++, so I'm compiling in command prompt. ( I know IDEs are important and improve efficiency but I want to learn the bones of the language first and know the imports I'm dealing with rather than have it fill it in for me as I type).

So what am I doing wrong? I think it's something to do with the classpath so could someone give me a step by step for setting it up? Otherwise, am I missing something else?


Also, slightly related: Any tips for game programming in Java, besides don't do it ( Posted Image ), or game programming in general? How can I make sure my game will use as little memory as possible? I've made all my images point to the same static images rather than create a new one for each object , and used bytes instead of other primitives when possible. Specifically I'm programming a strictly 2d game if there's specific pointers for that.

#2camcd

Posted 17 July 2012 - 12:36 AM

I'm having a problem creating and using my own packages(and subpackages) for a game I'm writing in Java. I'd also like to use a package that allows for .mp3 audio files rather than the massive .wav .
I know the declaration is:

package name; (First line)
..rest of code

I've tried fiddling with the class path (spelt "classpath" , does case matter?)  for both the system and user, and also compiled with a set class path, but didn't get it working. I'm using Notepad++, so I'm compiling in command prompt. ( I know IDEs are important and improve efficiency but I want to learn the bones of the language first and know the imports I'm dealing with rather than have it fill it in for me as I type).

So what am I doing wrong? I think it's something to do with the classpath so could someone give me a step by step for setting it up? Otherwise, am I missing something else?


Also, slightly related: Any tips for game programming in Java, besides don't do it ( Posted Image ), or game programming in general? How can I make sure my game will use as little memory as possible? I've made all my images point to a static variable , and used bytes instead of other primitives when possible. Specifically I'm programming a strictly 2d game if there's specific pointers for that.

#1camcd

Posted 17 July 2012 - 12:34 AM

I'm having a problem creating and using my own packages for a game I'm writing in Java. I'd also like to use a package that allows for .mp3 audio files rather than the massive .wav .
I know the declaration is:

package name; (First line)
..rest of code

I've tried fiddling with the class path (spelt "classpath" , does case matter?)  for both the system and user, and also compiled with a set class path, but didn't get it working. I'm using Notepad++, so I'm compiling in command prompt. ( I know IDEs are important and improve efficiency but I want to learn the bones of the language first and know the imports I'm dealing with rather than have it fill it in for me as I type).

So what am I doing wrong? I think it's something to do with the classpath so could someone give me a step by step for setting it up? Otherwise, am I missing something else?


Also, slightly related: Any tips for game programming in Java, besides don't do it ( Posted Image ), or game programming in general? How can I make sure my game will use as little memory as possible? I've made all my images point to a static variable , and used bytes instead of other primitives when possible. Specifically I'm programming a strictly 2d game if there's specific pointers for that.

PARTNERS