 |
A game development diary (and other stuff too)
|
Internal Link
(opens in same window)
External Link
(opens in new window)
Broken Link
(likely 404 error)
|
Recent Updates (newest-to-oldest)
|
9 Apr 2010 -
Resolution independency
|
|
Game Progress
I finally have the program back to the state it was before I started making changes for XML level files. Balls fall down into the buckets and the engine converts the ones at the bottom to be static as before.
I had a bug where balls were falling through the walls and floor unexpectedly. Turns out I had added an offset to most objects in the physics simulation except the walls and floor. As a result the walls and floor were in the entirely wrong spot with relation to the pegs, balls and buckets. This wasn't apparent visibly because it didn't affect the positions of the sprites on the screen - just their positions within the Chipmunk simulator.
My next task will be to make the app resolution-agnostic. I will be targeting both iPhone and iPad and want to do it cleanly so that a single bundle will support both devices. The iPad version will use higher-resolution assets, but will otherwise be identical. This involves storing most sprite and physics attributes as percentages rather than fixed pixel sizes. For instance, rather than stating that a ball is 8 pixels wide I need to specify it as 2.5% of the screen width. That way things will scale up nicely and I won't need to do anything special for it to work on iPhone, iPad or any other device Apple releases.
Once that is done I will test it out on the actual hardware. I have yet to do so, but I don't think I can put off joining the developer program any longer.
|
|
6 Apr 2010 -
A confession
|
|
My addiction to Peggle has severely impacted my programming productivity. I got it for the PC years back, but it wasn't until I started playing it on the iPhone that I got hooked.
Finishing the adventure mode is easy enough. Then came the challenges, which were difficult, but didn't take that long. Now I'm in the long slog through clearing all pegs in all levels. I have eight more levels to complete (and they are the hardest ones of course). I'll be glad to have that behind me and hope I don't relapse into Peggle Nights after I'm done. At least that's not on the iPhone yet.
I got my iPad with much trepidation. Yes, I'm using it mostly for app development, but I am also curious about this whole Tablet Revolution that is supposedly coming. I wasn't expecting much, but must admit that I can see this thing doing very very well.
Right now I'm using it as a super-sized iPod Touch. It feels great playing games on them. The display is beautiful. It's great to have the extra screen real-estate for those games where your finger covers the action. And scaling the games up by 2X works rather well. Yes, there are some jaggies, but nothing too bad.
I am not convinced about the increased pricing of iPad apps relative to their iPhone counterparts. Flight Control HD is more of the same - definitely not worth the $5 asking price. And some other big-name apps going for $10 or more? That's absurd. At that price point they are competing against titles from XBLA and PSN, which are played on a full screen with a proper controller and higher production values. I hope app price point settles down to the $2-4 range. Otherwise I won't be impulse buying many titles.
|
|
31 Mar 2010 -
Objective C is humbling
|
|
Game Progress
Nothing like a nice two-week long bug to make you appreciate how difficult it can be to learn new programming languages.
It wasn't until I stumbled on the right set of words to Google that I finally found my problem. I had some crashes related to some of my objects going invalid spontaneously. Turns out that the following two statements are not equivalent in ObjC.
myVar = newVal;
self.myVar = newVal;
The former assigns the new value directly, bypassing the object's setter. The latter does things the proper way. Guess which way I was doing up until yesterday?
I finally stumbled on this thread in the indubitably awesome Stack Overflow. In particular, the reply to the third answer made the light bulb finally go on. "properties don't retain/release unless you use self.property = foo instead of property = foo". Gah!
Why doesn't the compiler at least spit out a warning when you do it the wrong way?
|
This web page and all other pages on this site are
© 1999-2007 Scott Cartier
|