About

I'm a software engineer who works on game development part time. I teach game development (on gamedev.stackexchange.com and lynda.com). I'm always working on something, and I'll post updates here. Let me know if there's a game development topic you want to know more about, I probably know the answer, or at least where to get one.

Saturday, June 18, 2011

Behind the scenes

This week I’ve been working on some behind the scenes code changes. The user can now cycle through maps freely. There’s a button in the UI that will generate a new map. This means you can generate a map, look around to see if you like it, keep it or generate a new one right then.

Yes, that means that the maps are finite. Not the infinite world of Minecraft. I thought about making it an infinite world, even went so far as to prototype it. The problem is, that unlike Minecraft, it matters what’s happening “off screen”. I can’t just write all the chunks the camera isn’t near to disk. Do the goblins just stop working when you’re off looking at some other part of the infinite world? Of course not.

This weekend I’ll be working on smoothing unit movements with cubic splines. That means setting up some generic animation type stuff. I’m creating a class that can take the path I find with A* and use those as key frames to generate smooth movement along a cubic spline. Also I plan on getting some proper unit physics to allow for unexpected events in a path. I imagine I’ll use AABBs (axis-aligned bounding box), which should be pretty fast.

Also, stairs and ramps are in game now. The code that generates the faces for the stairs takes the number of steps as a parameter, so I can easily change the size of the steps if it works better for the goblins. I need to clean up textures on the stairs and ramps to make them not look so squished/stretched. Perhaps I’ll tackle that this weekend too.


No comments:

Post a Comment