Wednesday, January 4, 2012

Programming is Hard

Just what it says on the tin. Programming is hard... but not because of what you think I mean.

Programming itself is easy. If you have any sense of logic, it's really simple to figure out where things go, how things work, how to write great masses of code, etc. It's usually not too hard to learn a new language (usually), and start in that. It takes time, yes, but it's not "hard".

What makes it difficult is that fact that in addition to getting the code down there, you have to make it work with images and sounds, you have to take into account errors in the compiler/IDE, you have to work around little problems you come up with, and you have to manage memory and framerate. If you want to push the limits of what you can do, you'll be juggling these frequently... And it can get insanely difficult.

Currently with ACV, I'm trying to get there to be some way for each of the races to look or feel different. I tried making a motion blur: It's not that hard, you just copy and restamp an image every frame with lower opacity. The trouble is, the program slows to less than one frame per second. After that, partially as a test, I tried making it so that the screen would dim when the race was over, like in other racing games. Unfortunately, the program didn't like this either - every time the frame rate got below a certain point, it began stamping it even though I'd never put a line of code in for it to do it. This bug I also ran into with AI Wars.

So how do you make races different when the race courses are completely straight lines, and when the AI is programmed to fly forwards at a certain height, without ever veering left or right?


After thinking about it, I came up with some ideas. Some are simple: changing the weapon power for the races and such - some races could have dulled weapon abilities, or more powerups. It's not quite what I wanted, though... But I'm running out of ideas. I just hope I can get the program out by the end of January.

No comments:

Post a Comment