Thursday, October 17, 2013

Nice wheel you got there. Mind if I borrow it?

So, just when I get comfortable with the basics of Java and feel that I can translate an idea from my head to the computer without TOO much hassle, it's time to shift gears before I start trying to write my own game engine. These things can just creep up on you. "Hmm, ok, to implement this game idea, it would be convenient if I had some classes like this and some components for stuff I'll be needing to do all the time and a map editor and a way to handle rotation and..." STOP! Yeah. I could do that, but since it would be my first attempt, it would be messy and ugly and full of holes. Now that I can see the kinds of things I'd need to do and a glimmering of how I would do them, I can just go find other people who have already done all that (over many iterations) and download their code, which they have kindly made freely available to other people. (Naturally, some are not free, but I'm a newbie amateur, so it's not worth it to shell out big $$$.)

All right, what to use?

The problem with searching on the internet is that often people's answers to questions and tutorial posts and so on and so forth don't have their dates attached. So often I find myself reading about problems and solutions from years ago. This is how I ended up downloading a zillion packages and trying them out. At least I got some more practice using third-party libraries. (Mostly it's setting the paths that fouls me up. Then there's the eyestrain involved in trying to decipher the often sparse documentation and squinting at source code and examples.)

Forums are better. You can check them out to see if they are still active, see what biases they have, follow their suggested links, read FAQs, and post questions. Nice people out there may even answer you (even if you're clueless).

So yeah. Libgdx it is. Not that I'm planning to do anything 3D or with fancy graphics or action games or whatever, but even when working through the learning-Java games, I could see problems ahead if I scaled up. Libgdx looks like it's solved most of those problems even before I've noticed them, ha ha ha.

Now to actually do it. Urgh. It took me awhile to install, since the recommended IDE is Eclipse, and I've been using NetBeans. ARGH! Stupid Oracle. I blame them. As a newbie, the obvious thing to do was to download from Oracle's site, and they were pushing NetBeans. So I went for it. (They were also pushing JavaFX... yeah... I'm slightly sceptical about that. I have some Java book that mentions the Java Media Framework, and that's pretty much dead now. Is JavaFX going to go the same way?) But NetBeans was nifty. Easy enough to use. Comfy.

Now I gotta switch to bloody Eclipse!? Grrr. Well, I could use libgdx with netbeans, but I'd have to switch to Eclipse for doing Android apps, which I was going to try anyway. Dammit. Took me ages to download it and install the correct plugins and stuff. (The first time I tried to import the sample libgdx project, I got a screenful of error messages. I had accidentally downloaded the wrong version of one of the plugins and hadn't downloaded ALL the other packages needed.) So yeah. That's a day or two familiarizing myself with Eclipse, then looking at libgdx tutorials.

Feels like I'm starting all over again. Maybe I'll get something done today. Or maybe I'll work on notes for my NaNo project. The coding headache is seeping into the novel now. I think the protagonist, when she moves into her new house, will find boxes of old documentation in the basement. A random jumbled mess in various styles, telling of previous experiences, outdated info, and random nonsense. Remember those old books/stories which have a lot of journal entries? (I'm doing Lovecraftian this year.) Like that. They end just as the writer goes off into Lala land to meet the elder gods. Or whatever...

Or I'll incorporate the storyline for this game I'm planning into my NaNo. (The Color Rancher game idea.) Part of the game is an adventure-style section played through the game shop. Along with regular items, you get notes, requests, etc. etc. You get to an ending by choosing which of the notes/requests/etc. you follow up on. The NaNo will track the other side of this (the NPCs sending the notes. I'm sure one of the notes will be "Hello, world.")

Yeah. Ok. "Hello, world". Here we go again...

No comments:

Post a Comment