Thursday, December 27, 2007

Updates

I suppose I shall institute this new thing where I update you on how much I have done in the day.

Today, I learned that JOGL is out of my immediate reach.
Today, I added NPC sensitivity to the collision detection.
Today, I fixed the NPC sprite transparency issue.
Today, I modified the size of the steps my player takes. This makes my game look a little smoother, a little nicer.
Today, I made it so that my player is drawn within the same heights as the NPCs (it was different for some reason).

The night is still young, so I'm sure there is more to do. I want to create the thread that controls the NPC movement. Basically, I can split that into two parts. One that controls which image is displayed, and one that controls it's actual movement. In my old code, that was actually two separate methods. Now, though, it is combined. So, I need to, basically, copy the Thread that is used for moving my player, and instead pass NPC characteristics to it. Also, I am keeping it in the main class, so I'll have to take everything in my player class and incorporate it into the Thread. It's gonna be a little work.

Add to that the fact that I need to program the sensitivity of detecting which NPCs are near. And then I need to take from those a random one to update.

Work Begins Anew

Put on a pot of coffee. I am transferring my code to a JOGL framework, to see if it makes it any better. I'll let you know how it goes.

EDIT- Sigh, alas, JOGL is just a little too difficult for me to understand in one day. I think I shall continue programming in pure Java. I'll get around to JOGL someday, but just not anytime soon, I think.

Ah, Success Is Mine

Yours truly, a mere mortal, has managed to successfully (I believe) install JOGL, the little thing that gives incredible performance in 3D applications, let alone 2D ones. I will vest the rest of the day into learning how to do simple stuff (by their comparisons, all 2D stuff is simple), up to animation. Then, if I feel I am comfortable enough with it, I will convert my entire application (everything I have) to the JOGL system, and finish it there. Won't that be a treat?

I'll just have to find out, eventually, how to make it so that when I get my program onto other computers, everything loads correctly.

EDIT- So, getting the damn stuff installed is one thing. Programming with it is another completely. I finally got one of the examples to work. One of the problems, though, is that when I hit the X up at the top, nothing happens. It won't close. I'll work on it.

EDIT TWO- Yeah, in a record three minutes, I fixed the problem. It actually took longer to open the IDE than it did to fix the program. I changed it from a Frame to a JFrame, which has the EXIT_ON_CLOSE thing. That did the trick. I'm off to learn how to draw images with JOGL.

Rested

Me and my computer both are. After sorting through somewhere near 700,000 files, it found two things it did not like and I got rid of them. Then I shut my computer down and restarted it. Now it zips along. It uses 375 megs of memory now, as opposed to the 1 gig it used at all times before shutting it down. I should probably do that more often. I also got a stupid firefox problem, so I just reinstalled that now.

Programming later, food now (I just woke up a little while ago). Still a little tired, but a lot better than I was last night at 4 in the morning, trying to understand JOGL. Which I refuse to learn now (look for that to be implemented somewhere around the fifth official version of the game, as kind of a treat).

Later.

JOGL

So, I read up a little on Java OpenGL, which is a little thing which makes graphics zoom like greased lightning. The demo used 3D graphics, and ran at 700-900 frames per second. Fucking... amazing. I figure that even though it is made to work with 3D applications, it can work wonders also on 2D applications. But, it looks a little complicated, and I'll probably need a little help to get going with it.

EDIT- Holy shit this shit is complicated. I don't understand it at all. But, haha, I once remember being in fourth grade, and having to deliver a message to an eight grade teacher. I took one look at the math on the board, and thought I would never understand that stuff. I've been a math genius ever since. So one day I might actually buy a book on it and fucking delve into the code. Until then, I shall settle for simplicity and mediocre performance.

After 4 and a half hours... virus scan still going! 588,000 files scanned. Fucking Microsoft Flight Simulator. That's 100,000 files right there at least. Where did all these files come from?

On The Road...

... to NPCs. I created a separate layer to render, apart from the background images. I forgot to reinsert the transparency stuff, so the NPCs show up on a black surface, but they show up. I am hoping to make it so that ... I lost my train of thought.

Hm, I was hoping to make it so that it could do something. I will endeavor to make it so that the NPCs walk around. For some reason, I can't remember anything of what was sure to be a long post. I must be really tired.

Tomorrow, guys.