Sunday, December 30, 2007

Comic

I bounced around an idea for a comic a long time ago, after the short lived comic boom junior year (I did make a hilarious, though short lived comic called ChatterBox), but never got around to it. My art was too complicated, and not being able to draw, I needed a lot of time to make one. Well, after discovering Cyanide and Happiness (basically what I consider a perfect comic), I will simplify my art style, and go for laughs instead of skill. Look for my first comic after I get back to school (I left my scanner in my dorm room).

EDIT- I finished a four panel comic. It's about me, my best friend, and zombies. There's no title yet. I kind of fucked up their legs (they're way too long), but that actually gives me a good fourth wall breakage theme for the next comic, which I might also draw tonight. It's not really funny yet, but I couldn't really think up a good way to start a comic out. There's a small joke there, though. There will, of course, be wonderful toilet humor in the following comics, along with practical jokes and stuff. Anything that Cyanide and Happiness hasn't already done.

EDIT TWO- I am investigating the possibility of doing the comic as a bunch of ten second movies.

Saturday, December 29, 2007

New Format

So, I have realized that I do have somewhat of a creative side, but it is limited to novels. And to program, I have been neglecting that creativity. So, I want to get back to my writing (which I have been doing much longer than programming). I am still thinking of loony stuff to make a game about, but I love to write, and I have been toying around with an excellent idea for a novel, so I am going to try to write that.

Here, I will be writing some basic swing tutorials. I am going to change the name of the site (I have a couple people to inform), but I won't delete the old posts.

I have Rush Hour 3 coming toward me (haven't seen it yet) right now, so I just can't wait for that. Later, people.

Hm

Alright, so pending a decision on whether or not I care about Nintendo's policy on fangames, my Pokemon clone is on hold. I'm not getting rid of it, and I may one day finish it. However, I am going to start development of something all my own now, something I won't get in trouble for making it.

I am waiting for a suitably silly idea, though. I was going to do something with TimePants (something I heard in a dvd commentary once), but I think someone else is actually using it for an actual thing. So, I am going to try to come up with something else equally as silly. If I can finally get around to hanging around with my good friends, that shouldn't be a problem (though filtering out the dirty ideas from the funny ones may be an issue).

Chances are it's going to be a side scroller, cus they're more fun.

Dinner now, and Stargate Atlantis. I love that show.

Friday, December 28, 2007

So... Fuck....

My game looks as though it is going to turn out amazingly. If it comes out even half as well as it looks like it might, it will be pretty popular.

That means there's a 95-100% chance Nintendo will either just ask me to get rid of it, or will all out sue me. No matter if I give them their credit, and no matter if I don't charge for it. They're just a bunch of fagots.

So... fuck.... I don't know what to do. My game is kind of a bust now. Two weeks of work (and really a lot more, including the old versions) down the drain. Damn. I'ma gonna need to come up with a new, original game.

I hate Nintendo. Fuck them. This blog will remade in the future, the posts here deleted. I will make an original game, one I can spread around.

Ain't Did Nothin Today

So, today, I did nothing. Nothing to report. Sorry, guys. I was lazy today. Nice to give my brain a break.

I did read up on some stuff, including using JOGL properly in a game (yes, I vowed to lay off it, but I'm always curious). It was complicated. If I am ever going to use it, I'll need at least a book, preferably a class at school.

Soon, after my NPC stuff, I believe I am going to start refactoring my code. I learned that word today. I am going to start splitting stuff up into classes to make things easier, and less complicated (or at least easier to change). I already use a class for my Player (the first time I ever used a second class; my teacher didn't go over them well in high school). I want to branch out and just make my program better.

So, in the unlikely event anyone has ever read my blog, I have spruced things up a tiny bit. I added a link to my video (more links coming soon), and a little info on me. There's also a nifty thing to eMail my posts to people... if there was ever a good reason for doing so.

I think I shall be adding a small tutorial on some basic Swing practices. Mostly, it's because I want to help out some people in my high school, where you get extra credit for using stuff like swing (which you don't get taught). Look for that within a few days, I guess. Whenever I get bored.

That's all for now. I just closed my IDE, so I probably won't be doing any more programming tonight. I definitely want to hang out with my friends tomorrow, so I might not be doing much till Saturday night or Sunday. We'll see.

See ya later, guys.

I'm Awake, I'm Awake

Alright, so I actually woke up. I wanted to hang out with my friends, but my paycheck has not yet arrived, meaning I shall spend another day in poverty. Maybe they can swing by here, I don't know.

I started, just started programming today, when I realized that I'm a little hyper. A little too hyper to program. I decided that there will be a 2D array for the NPCs. Each row on the array will belong to one of the NPCs. This number also corresponds to the their number that's their placeholder on the npcLocMap, another 2D array. There are three spots in each row (right now, anyway). The first two are step values in the X and Y. This is so that I can make them walk to another square. The last value is the direction they are facing. Because I can apply a little math, and use another little variable (that I just realized I forgot to set up), to get one of the twelve sprites that is used to indicate direction and movement.

Anyway, I'm a little too hyper right now to program, so I'm taking a break. I need some brunch anyway. Probably going to grab some grilled cheese or something.

If I'm lucky, my friends might be able to swing around my way, an XBox 360 and/or PS3 in tow.

Also, I know the blog looks a little half-assed right now. I think I am going to clean it up, and mess around with the HTML, and CSS a little bit, to get it looking a little more organized.

Lata.

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.

Wednesday, December 26, 2007

It's NPC Time, Bitch

I realized I have no idea how to start to structure my NPC code. Well, I did have an idea, and I am having it critiqued on a forum, now. 112,000 files scanned.

Defrag

My computer has not been defragmented in a long time. So I cleared off a lot of stuff, and I am going to start a defrag right now. Later, people. A lot later, depending on how much stuff I need is on my hard drive.

EDIT: Okay, that took nowhere near as much time as I thought it would. It took longer to free up the space needed to defrag in the first place. And apparently my D drive needs no defrag. So, it being only nine at night, I am ready for the programming to continue. In four hours, you shall see me post, "So, it being only one in the morning, I am going to do some more programming." I am, I admit, somewhat obsessed. But, I have reason to be; I only have just over two weeks until college begins. A new semester, six classes, friends who live with me, not nearly as much free time.

Well, I only have one class on Monday and Friday, so there's time then.

EDIT TWO: Running a virus scan, and later a spyware scan. My Explorer.exe is, for some reason, randomly consuming 50-60 percent of my processing capabilities. I don't mind it so much, I suppose, except for the fact that I'm afraid it is degrading the performance of my Java compilations. More later.

EDIT THREE: ~60,000 files scanned, and nothing yet. Unfortunately, there are 300,000 to 400,000 files on my computer. Maybe a little less, since I just deleted a few programs, and games. Now I start on NPCs. Damn, this is tough.

First Look

Okay, so I got the idea to make a small video of how my program is doing so far. I guess all I'm gonna say is that this is just a test map. Two of the protrusions in the corners started life as NPCs in my old map, and that 3X3 block toward the lower left edge was once a small building. They will be again, but for now they are trees. Also, I want to say that all the images are sprites taken from various versions of Nintendo's Pokemon games. They own them, and I am not collecting any sort of fee for their use, so I am off the hook as far as legality goes. Enjoy... me walking around a map....



So, how was it? Was it cool? Did it make you all tingly with anticipation? Did you notice the background trees shifting unevenly?

Bah, never you mind that last part. It looks good enough in person, and better on video, I think.

I am suddenly exhausted, and my eyes hurt a little. Break time. I'll begin anew later.

Success, Success

I am very happy with myself. After looking online for a very long time, running through forums and websites and shit, I have determined that my game is pretty damned good. I also "fixed" it again. Remember all that crap I gave myself about making the character turn in place? Well, I ended up setting the direction, and then starting the move thread, and finally adding a slight pause to the thread. That pause gave the computer a chance to ascertain whether or not the key was still being held down. So very quick taps gave a turn in place reaction (just like the actual game). Well, I realized that this pause (30 milliseconds) was actually showing up in the game, giving my animation a very slightly noticeable hiccup every half second or so. You would have to be paying attention to spot it, but it was there, it was responsible for part of the perceived crappy animation, and it was getting on my nerves.

So what I did was change the location of the small pause. I made it only register if the direction was not set. So when the direction was set (like after you had finished turning in the direction, and either held the button, or went to tap it again), the pause no longer occurred. This led to some smoother animation, and a happier me.

I now have the player done (for the moment). I still need to shift more of the code to the player class, but that will come later. I'd say, as far as the entire game is done, I am now somewhere around 1/200 - 2/100 done. For those of you more idiotic than a fifth grader, that's 1/200 - 2/200. Not much. Some of it will be easier, though, so I am alright. Art and music will be death; I may have to find someone else to help me with them.

Later, peoples, I'ma gonna find something else to do (programming-wise).

Hey Justin.

New Ideas

So I stumbled across an interesting little tidbit, while roaming through Java forums. I now about an interesting little thing call a Rectangle. No, I'm not a moron. It's a programming thing that can help me know when stuff comes into view of my "camera" into the little world I have created. The Rectangle would be updated constantly to follow my character, and the rectangles of other things, like NPCs for instance, would set off an alarm when they intersect with it.

Unfortunately, while this is a good way to detect other characters, I do not see how it can be effectively used to make my tile map faster. Oh well. I heard Quadtrees are good for large maps, but I cannot find good documentation on them. I'll look around again, though.

Oh, That Was Easy

I did it. In record time, too, I might add. My character turns in place (mind you, you must tap the arrow key pretty damned quickly), and turns and walks without significant pause. Gonna work on some other stuff, now.

EDIT: Blah, did some more stuff. Tried experimenting with VolatileImages. I did not like it. It actually slowed everything down. I thought it was supposed to make images faster accessed? Whatever. Back to BufferedImages. There's a small amount of distortion in the images as they are drawn (something like tearing but not nearly as bad), but I think I'm cool with that.

So, I also checked out, once more, my emulator for the Gameboy Advance. I played some Pokemon Crystal (my absolute favorite version), and looked at how that looked. And I realized it was just as terrible as mine. That same sort-of-tearing is there too, even through the best filters. So that means my version of the game is just as good as the best emulated version out there. Awesome.

So, I have finished the basics with my character (just the walking, though), collision detection, the tiled map, all that sort of stuff. Next up is the NPCs. I am going to make two of them (like in the original test map), that walk around a predetermined path. I have no idea how I am going to do this, but I suppose it will be something like, look around the visible portion of the map (can be done while in the animation loop). If there is any portion of an NPC's path being animated, I shall set that NPC into motion. If their path is no longer animated, they go dormant.

But first, lunch, and Rush Hours.

Ah, Sleep

I obeyed myself, and went to sleep last night without programming anymore. I woke up fresh with no headache, and took a nice, warm shower. And then I got some breakfast and started programming. I have it now so that my character can turn in place, and I also have him moving smoothly across the board. The method I wrote down last night did work, although it took making a new thread in order to do so.

My only problem with it now is that the pause when turning in place is too long. In the actual game, if you quickly tap the directional pad, the character turns in place. However, if you press it down, the character turns and immediately starts walking. I replicated this in my original program (I looked at that code, tried to adapt it, and promptly trashed it, starting from scratch). But on my program, when you turn and walk, there is a pause (allowing you to otherwise turn in place), before the walking. The rest of my day shall probably be spent getting rid of that pause.

It is almost time for lunch, though, so I may give it a rest for a little while. I also wish to enjoy my copies of Rush Hour and Rush Hour 2 once more. I'll see what I can get done.

Later, peoples.

Why Do I Do This To Myself?

I started programming again. Why? Just because I did. I had a goal in mind. Did I reach that goal? Yes and no.

Well, I realize that there are some things I should have done, that I did not. Before, I had the code for making the character look like he's walking separate from the code to actually move him. This is trouble, because when the character is moving against a wall, his feet still move. In a perfect world, that is. This was accomplished in my old program. However, the code to do that is now dependent on the the arrow keys being effective, which, now, when I run into a barrier, they no longer are. This is a problem I must fix.

Also, I am experimenting with different ways to move the character continuously. I have tried several ways, but none seem to work to my liking. I am actually getting an idea right now, so bear with me while I write it down.

I use steps in the X and Y directions to mark movement. These are increased by 8's until the desired goal (+tileSize, -tileSize) is reached. This produces the smooth movement as the character walks. I am thinking of using the flag methods to flag the keys I am pressing down. I am thinking that I can program it to only acknowledge the held key when no other keys are pressed, and also the steps are only divisible by tileSize. That way, it will not continuously read the flagged key and zip my character across the board.

Tomorrow, though. Absolutely no more programming tonight.

Later, fucktards.