Tuesday, December 25, 2007

Tired

Well, it is roughly one hour before my little family sojourn to New York. I have been tinkering with my program for the better part of an hour now, and I have some good stuff to report.

I have fixed my camera (what I call the chunk of code that shows only the tiles around the player). Before, it went through every tile, and used an if() statement to determine if the tile was able to be shown. This was fine for my test grid of twenty by twenty. But, the actual maps are going to be a fair share larger than twenty squared. This game is going to be a free roam game, unlike the other linear Pokemon games. The grids are going to be very large. So I have changed my camera so that instead of running through the entire grid, it now targets only the area around the player. Actually, there's still one aspect I can't get my head around, but it works, so I think I'm alright.

Now, it gets a little buggy when I go out of bounds, but in the actual game, I will be doing what they did in the other Pokemon games: there will be a ring of trees around the borders of the map that will extend slightly beyond the screen. That way, when you hit the edge, there's no trouble caused by trying to index out of the known array.

Collision detection, that is next. Well, actually, I want to insert the player in there first, so that I know when I should be colliding with stuff. So, the player goes in, and then I start colliding with stuff.

But alas, first I must travel to a land just to the north of Pennsylvania. I must go to New York to visit my sister and eat Indian food (no, I'm not Indian, but they make damn fine food). Programming later. And in my head while I'm there.

No comments: