If you ever wanted to build your own 2D top-down view train driving game, here’s … well, the things you need to consider plus a rudimentary source code example. Because a train following tracks is not as simple as it might seem, unless you restrict curves and switches to 90° angles and allow only very short cars and locomotives.
Here’s a video of my example project. Any stuttering is due to the screen recording software taking a toll on my system combined with the video playback framerate not rendering 60 fps (I assume it’s the standard 24 or 30 fps for Youtube videos). The video shows a sequence of three runs with a medium curve radius, a large curve radius and a ridiculously small curve radius. The yellow line indicates the track being followed by the axles, the purple line indicates the car chassis position (center point between axles). Continue reading »
Continue reading »
What do you do if your app doesn’t behave as it should, or even crashes?
Answer A: Post your problem in just about every programming forum.
Answer B: Use the Xcode Debugger to analyze what’s going wrong.
Since most of you already know how to do A I’ll focus on B in this Xcode 4 Debugging Crash-Course. It’s kind of aimed at beginning Xcode developers but that’s just because I hope – against better knowledge – that experienced developers already know that … thing … that debugger stuff. Ya know?
Most developers have heard of the phrase “Eat your own dog food”. It refers to the habit of actually using what you’re creating.
A typical example would be a company building Yet-Another-Issue-Tracking-Tool™ while using said issue tracker to manage their Yet-Another-Issue-Tracking-Tool™ project. And you’ll surely have heard of a game engine that was initially only developed as a necessity to build a game, then polished and released to the public to great success, while the developer continued to create games with his own engine.
Dogfooding is considered a good practice, actually a best practice. You know that the tool you’re building works, and that it satisfies your needs.
But “your needs” is also the achilles heel of dogfooding, and it’s just a small step away from forever “perfecting” your product (known as “gold plating”). So sooner or later, you’ll have to do some catfooding, too. Meaning: to feed the user’s needs. Continue reading »
Continue reading »
Regardless, this may be the answer. Or as close to it as any publicly shared link list not hosted on link aggregator sites could ever be. I’m talking about Amit Patel’s Game Programming Information pages. There’s something for everyone, but specifically a lot of articles about pathfinding, AI and tile-based games including procedural world generation.