Thursday, May 22, 2008

Now I feel like an idiot

Okay, so the bug was me. My redraw function would reload the png image file from the hard drive every time the game loop ran through. Yeah, I called myself a noob so there's no need for you to rub it in.

Monday, May 19, 2008

SDL, Aggravations

First, as a side note I want to put a link in to my youngest brother's website: http://kendrick.110mb.com/. I wrote it for him. I'm debating trying to find work as a website freelancer and I would appreciate criticism on how the site looks and how much I should charge for what talents I have.

From what I've seen so far, I like SDL. I really like the idea behind it. What I don't like is the documentation that's available for it. I find it very lacking. I'm used to the Java docs and maybe I'm spoiled but I never knew how much I depended on having documentation readily available. I've subscribed to the SDL mailing list which I've heard is very useful but I always find mailing lists to be intimidating. There are plenty of tutorials out there on the internet on how to use SDL but from what I've seen, they seem to all be written in C. I have a hard time reading C code and I have no interest in emulating it. I know that C is faster than C++ but it's painful. So, learning SDL, although it may be relatively simple, is more difficult than it needs to be.

So about the game that I'm making. I don't have a name for it yet but its coming together in my head at least if not on code. I started my life as a computer scientist using Java. In some ways this was good; I treat object in C++ the way they're treated in Java (for the most part). But, I'm terrible at handling memory.

Its not that I forget to write deconstructors. I'm paranoid; I just don't know how to test my code properly. I had a bug in my redraw function. Redraw, of course is called every time the main game loop is run so this is a lot of times. My redraw function would add another layer onto the main SDL_Surface a number nearing infinite times. I watched my ram being filled using the System Monitor and when it was almost full, I hit the exit button. My ram jumped back to its normal half-used state. This made me very happy because now I know that the deconstructor for my linked list is at least clearing almost all the data.

Now, I need to rethink the way I have my code setup. If I want a sprite to move in Swing I would change its position and add it to the screen again. Using SDL that doesn't seem to work. I'll need to check if I can move surfaces around that are already added. It seems that way. Oh dear.

I really would like a good textbook on SDL.

Tuesday, April 29, 2008

Where My Life is at

Okay, this post is for all of you following my blog and are frustrated at my lack of posts. Yes, all of you.

I finished my second year of University. My grades absolutely plummeted this last year. Darn. I have this feeling that I'm going to get kicked out of the honors program. That's a bummer but it's not the end of the world. Not our world in any case.

And now summer has started for me. I'm sort of happy about that. We'll see if I can make this summer more eventful and more fun than last one was. Along with summer comes personal projects.

The first project that I'm working on is a game. I'm writing it because I want to get into writing artificial intelligence and I'm too poor to buy robot parts. The game will be an RTS with emphasis on strategy fighting. I'm using SDL and I'm doing my best to make the code so that moving it to a different platform is as painless as possible.

I'll continue to update this blog every once in a while to let all of you know how the project is coming along.

Tuesday, November 13, 2007

Strange...

I didn't know I had a blog!!! Woot. I think everyone should get one.

And then remember that they made one. Yeah. That's quite important.

Monday, April 9, 2007

The Profound Thought

Yesterday... no it was the day before that. Or am I telescoping events and it was even further back? I don't know. But I had a very profound thought. It was the kind that made me stop and think, "Wow, I should blog this." This is the type of thought, which I believe has occured not rarely through out the centuries to great men and women who rose to fame soon after the thought occured to them. Yes, it was that profound.

Alas, I forget it.

Darn.

Monday, March 26, 2007

Monday, March 19, 2007

Hello?

Goodnight, goodbye, hello. Take what you want, I don't control what time of day you read this. I still haven't decided whether or not I want to have my blog here or on my own server. I guess we'll see what I come up with and enjoy life while I debate it over with myself.

The third greatest thing that happened to me today was that I had an apple with peanut butter. I always enjoy it when I eat those. Perhaps I will eat another tomorrow.

And to indulge those of you who love randomness I will mention an observation that I have made. From my present position I can see a total of 19 rows of bricks which make up the top of my neighbour's chimney. The chimney is set against a blue background of sky.

Till next time that I take the time to blog,

-David