Howdy! XD First off I want to say I really like what I've seen browsing these forums since I discovered coderanch.com a few weeks ago. Everyone seems pretty helpful, the minimalist design is nice for easy navigation (no clutter) and I get a kick out of the ads at the bottom of every thread.
I've been learning Java via a free set of lectures and PDF files for a course at Stanford University called Programming Methodology. It's available on iTunesU and YouTube. In this course, one of the assignments is to create the game Breakout, and there is a PDF of the "Breakout.java Starter File" which basically just imports all the stuff you need to import to make Breakout, and provides the code to set up all the constants, such as the the brick width, application window width, paddle width, etc.
Here's what the top looks like:
I don't know a whole lot about Java libraries yet (don't know a whole lot about Java at all really) but I did notice that acm._____ isn't found anywhere at http://docs.oracle.com/javase/7/docs/api/ so I got curious about it.
What is acm? Is it part of the standard JDK? Assuming that its not, if I used the acm stuff to make a breakout game, and then compiled the program, would my friends be able to play that game using their JRE on their computer even though acm isn't part of oracles' java world? I'm thinking it would indeed work because I've been taught that the compiler turns everything into byte-code, including the acm stuff, but I'd prefer to use official java library equivalents to acm if acm is in fact some kind of "third party" thing.
Random question: Is coderanch.com founded by someone involved with O'Reilly and/or the "Head First" books? I'm a big fan of the HTML and CSS head first book, and I'm yet to finish Head First Java.
Random suggestion: I noticed you guys are fairly adamant about having code wrapped in code tags, and understandably so. When browsing this forum on my iPhone a couple weeks ago, the "new topic" field had no text editing tools at all. Just simply a blank box to type in your thread content and thats all. So essentially, any user unfamiliar with BB Code (and there are a lot of people who aren't) wouldn't even have a code button to use. I'm not sure how many other mobile devices would turn up the same issue, but if the webmaster could somehow implement to mobile the same text editing features available on desktop, you might see a bit more tagged code. Of course there will always be newbies who don't tag code simply because they don't know the rule, but it might help a little. Plus its just plain handy to have those features on mobile.
Nothing is withheld from us what we have conceived to do. -Russel Kirsch-
Justin Coombs wrote:What is acm? Is it part of the standard JDK?
Dunno, but I suspect not. A quick Google got me this link, which I think is probably your man.
And just a small critique before I go:
You seem to be importing a bunch of graphics stuff, presumably for your UI, and I think you may get sidetracked with all the "swingy" stuff before you get down to the nitty-gritty, which is:
What is the game of breakout, and how does it work?
Seems to me that if you've got that sorted out, you should then be able to reproduce the game for Swing, a webpage, or even good old console output (albeit possibly a bit clunky).
Concentrate on WHAT needs to be done first; not how you're going to do it.
Unfortunately, that often means postponing coding - at least until you can describe the game in detail, and in English (or your native language).
Sunday Tip from an old fart.
Isn't it funny how there's always time and money enough to do it WRONG?
Artlicles by Winston can be found here
I took the online courses with Stanford as well. The ACM libraries are external libraries that were created by the Association for Computing Machinery (one of the oldest computing societies I believe). Those libraries were not created by Oracle as part of the JDK, but are 3rd party libraries. If you send the programs to your friends involving ACM, they will still be able to use the ACM because the libraries will get compiled along with the rest of your code. Even though these are 3rd party, they are still a great way to use graphics, even if they are not part of the JDK itself.
I hope this helps, even a lot later!