Monday, October 31, 2011

Game Update


Over the weekend I decided to try my hand at programming the game I'm developing as this year's resolution. The problem is, I'm also trying to learn Java while I create it. It's not that the language is all that difficult, in some ways it's actually a lot simpler than C++ but the weird little conventions are really killing me.
The game programming book I bought to help me conceptualize the dynamics of the game had this very long program that I had to input manually. Why? Well, because the book's author is "remodeling" his site and all of the sample programs are nowhere to be found. But I figured, at least entering it myself will give me time to think through the logic of the example and maybe lead me to understand the material better. HA! No.
In fact, the whole thing took so long that I would end up forgetting that I had created methods to handle certain tasks only to end up using them much further along in the programming phase. I had to keep looking back between my classes in order to remember what the hell I was asking the program to do.

Eventually, and I'll admit I learned a thing or two, the entire program was entered into the compiler. For about 5 seconds, I could feel the ground beneath me shake with the epicness of the moment (yes I know "epicness" isn't a word, thank you spell-check). And THEN... I tried to run it. Apparently ... in spite of the program being an applet, and not needing a "main" method, it wouldn't work as a jar file, or as an applet running on a browser because it didn't have a main class. I can't set a main class, and the compiler (NetBeans) doesn't show me any way to make a class into a main class. I can't just add a main method in the main class because it's not a application... well, I could... but that doesn't really solve the problem.


 

So 3 hours later after checking through several forums and googling the hell out of it (damn it, spell-checker, that IS a word... or should be), I hadn't found the answer. Needless to say I threw the book through my window and went to watch that episode of South Park that's been waiting on my Tivo. This could take a while...

No comments: