Category Archives: Programming

Success!

Turns out the .jpg compression was throwing in some odd pixels even at 100% quality, now I’m using PNGs.

Anyways, my latest victory was using the A* wiki page as an example and making a working, slow, pathfinder! Here’s the script for a working model, but it’s dirty as all hell. I’m really proud of it, the biggest hurdle was obviously learning A*, and what heuristics and admissible were and all that.  After that though, it was tough just turning the pseudocode into python, but I got there!

Now I just gotta use that binary heap to speed it up, and I can move up the scale!

Problem with PyGame and it’s blitting.

I’ve made a post about it on reddit, but the gist is that if I set my colorkey to WHITE (255,255,255) the resulting image that gets blitted is all messed up and black.

Turns out I had a hidden extra surface created just for blitting, so that was how I spent the last 3 days coding. Heh heh.

Anyways, my issue is now there are spots that aren’t being drawn correctly, as if there are non WHITE spots… curious.

Bullets.

I’m making just the basics for my top down shooter now, got just a simple moving around thing going in an open arena.

I want to add in bullets, and I can only think that bullet classes are the best way of doing it, but I’m not sure about the cost of many classes.

Early Optimization is the root of all evil though, I’m told.