Posts tagged with: ‘c/c++’
Posted by Patrick on Monday, March 07, 2011Mon, Mar 07, 2011
c/c++
qt
tools
Since the release of Swivel, I've taken a bit of time to let myself unwind from the development cycle and dwell on what I want to work on next. I've decided on a new project that I'm really excited to get into, but before I do, I need to do a little work on my tools. Abraham Lincoln said, “If I had six hours to chop down a tree, I'd spend the first four hours sharpening the axe.” Picking the righ…
Posted by Patrick on Monday, February 07, 2011Mon, Feb 07, 2011
Two weeks ago I started a series of introductory posts on Archivist, a library for simple serialization in C++. I wrote Archivist for my game, Swivel, which is now in the App Store. Today I'd like to show you how to deal with basic inheritance with Archivist. We'll get into polymorphism in a future post. Let's extend our first example with some inheritance. Let's say our monster can have adorable…
Posted by Patrick on Monday, January 31, 2011Mon, Jan 31, 2011
snippet
c/c++
I was planning to write another post on Archivist for this week, but with Swivel in the approval process I am pressed for time to get my promotion materials together. So instead here's a quick snippet of code that may be useful to you. Color values are one of those things that you don't really think about until you need them. And when you do you might fire up Photoshop or the DigitalColor Meter an…
Posted by Patrick on Monday, January 24, 2011Mon, Jan 24, 2011
I'm thrilled to be a part of iDevBlogADay for which this is my first post. I hope I will be able to contribute something of worth to the community every Tuesday. I have several bits of code to release as I go along too, so hopefully you will find it helpful! Yesterday, I outlined my motivations for a creating library called Archivist. You may want to check that out. In short: Serialization in C+…
Posted by Patrick on Sunday, January 23, 2011Sun, Jan 23, 2011
Swivel had a particularly nasty bug. It crashed while loading my application state, but only occasionally—sometimes once a day, sometimes every hour. This turned out to be one tough error to find. I spent many hours going over my code with a fine-toothed comb, running memory debuggers, rewriting and refactoring anything suspect or complex, throwing in extra validations and checks. While my code qu…
Posted by Patrick on Saturday, December 12, 2009Sat, Dec 12, 2009
Most of my game development on the iPhone is done in C++, not Objective C. I feel like this has its benefits, but it also has drawbacks, not the least of which is that programming user interfaces can get really messy. The Cocoa delegates model is wonderfully powerful for that kind of thing. The easiest model I've seen in C++ is the signals and slots model used, most notably, by QT. My game UI is c…
Posted by Patrick on Monday, October 26, 2009Mon, Oct 26, 2009
c/c++
Bartosz Milewski gave me a good chuckle this morning. Here's a slightly paraphrased excerpt from his video presentation. C++ is an ugly language. I don't think I need to convince anyone of that. It's an ugly language and we love it because it gives us performance, mostly. But there are some parts of C++ that are uglier than ugly: template meta-programming. There was no official design. It was di…