Archive for the 'Programming' Category

Application-Specific Bullet Physics Optimization

December 13th, 2011
Spencer Nielsen Follow snielsen42 on Twitter

In developing Cannonade and Invader Zurp I’ve invested a fair amount of time becoming familiar with the Bullet Physics Library and trying to milk every bit of performance I can out of it. Realistic physics simulation plays a crucial part in both games, and is also the performance bottleneck in the majority of gameplay scenarios for both. When trying to optimize for performance, I generally find myself using two kinds of approaches. One is a higher level algorithmic approach that tries to find ways to create less work or avoid work in order to keep things going fast. Once I’ve nailed down the minimum set of work that absolutely must be done, then comes the work of getting down and dirty to speed up the routines that actually do that work. When I first approached the problem of speeding up Bullet, I simply treated it as a black box (work that I wouldn’t be able to avoid) and explored what kinds of compiler configurations I could leverage to create the fastest possible execution of the physics simulation work. Later, after I had nailed down the gameplay mechanic for Invader Zurp, I was able to start specifically attacking the set of physics simulation work needed for the game, and whittled it down to a much smaller amount using some simplifications, accuracy compromises and psychology.

(more…)

Think Tank: Never let a good idea get away again!

November 28th, 2011
Spencer Nielsen Follow snielsen42 on Twitter

So I have these thoughts…a lot. No not that kind! 😉 I get these fun ideas for neat projects or crazy inventions as I am driving in the car, singing in the shower, lying in bed or even in the midst of coding. Really creative ideas that may or may not be realistically viable but worthy of entertaining nonetheless. I get really excited and start working it over in my mind. It feels like inspiration. Then something happens… Life resumes and I need to deal with the actual task at hand. No worry, it was such a compelling idea that I will surely remember it later when I have cycles to devote to it. And then I never think about it again. Or even worse, the next day rolls around and I all of the sudden remember that I did think of a cool idea the day before, but I can’t quite bring the memory into focus. Does any part of this sound familiar to you?

Write It Down

“No more!” I declared. Nothing gets remembered unless it is written down. Hmm, idea notebook? TextEdit file on the computer? I did the text file thing for a while but I kept forgetting that it was there or didn’t have access to it at the time. No worries… Evolution of the computer to the rescue! Transferred things to Notes.app on the iPhone. Not good. Too jumbled, un-organized, too much information presented in-general. I knew of the million and a half “getting things done”, task management, mind-mapping and brain organization apps/ecosystems out there. But I found most were too general for what I wanted and too heavy. Well, if you want something done…

(more…)

Invader Zurp Progress

October 27th, 2011
Spencer Nielsen Follow snielsen42 on Twitter

Above is some footage from the current Invader Zurp alpha (apologies for the bad exposure). As you can see, things have come quite a ways since I released the first video! There are a lot more visual effects, 5 music tracks from Monte ‘Trance’ Emerson, a new gameplay mechanic, an in-game currency system and tons of other little advancements. I must say that I feel like things are progressing quite nicely! I still have a ways to go though and so I am going to continue cranking away with my head down until it is finished.

What are your thoughts on how development is going? Let me know in the comments. Also, a huge thank you to all of my testers who have given me invaluable feedback on all the builds thus far.

Startup Grind.app 1.3 (October Update)

October 18th, 2011
Spencer Nielsen Follow snielsen42 on Twitter

The Startup Grind is expanding! You may or may not have heard that we have recently opened up a Los Angeles chapter of the Startup Grind and to coincide with that we have added multiple chapter support to the Startup Grind.app! Now if you are a member of the Startup Grind LA your upcoming and past events should be visible when you log into the Startup Grind.app with your Meetup account. If you are a member of multiple chapters then you will be presented with a top level pane allowing you to switch between them at will.

As we open up more chapters of the Startup Grind you will be able to access all the information and interactive elements for the events for every new meetup that we get going. More awesome features are in the works so stay tuned!

iPod Touch Server: iOS 5.0 Edition

October 12th, 2011
Spencer Nielsen Follow snielsen42 on Twitter

Achievement Unlocked: iOS 5 NDA

In a previous blog post I outlined my need for an iOS server. I had found a sufficient but non-optimal solution for iOS devices running iOS 4.X. I mentioned at the end of that article that I had found an optimal solution utilizing some new features in iOS 5. Now that iOS 5 has gone gold master and the NDA has been lifted I can outline in detail how to get your own iOS server up and running. To review, the three requirements for setting up a server in my situation are that it must:

  1. Be able to receive push notifications (so it can get it’s work)
  2. Have it’s display turned off (to save energy and avoid things like screen burn-in/fatigue)
  3. Require no human interaction (needs to be completely autonomous)

In the previous article I outlined why these were in conflict with each other on iOS 4 devices. However, there is some new functionality and behavior policies that allow all three requirements to be fulfilled.

(more…)

Caster for webOS

October 6th, 2011
Spencer Nielsen Follow snielsen42 on Twitter


Want to buy Caster for webOS? Click Here

Caster History

Much like Amit Singh and his Hanoimania, I regularly attempt to port my friend’s game Caster to as many platforms as I can. Because of some good language and API choices upfront (C++, OpenGL 1.X, SDL, etc…) the Caster codebase is very portable. That portability combined with its relatively humble (for these days) performance needs has lent the (currently still unified) codebase to easy porting. This multi-platform journey began many years ago before Caster was even released. Caster was still in early development when Mike approached me with the idea of maintaining a concurrent Mac build. At that time Macs had not yet moved over to x86 processors and so the most difficult part of the process was reverse engineering Valve’s Half-Life model format (which Caster uses for animated character models). The Half-Life model format was a binary, in-memory format utilizing offsets which meant that while loading it was quick and simple (just read it into memory, no processing whatsoever) it was unfortunately dependent on little-endian byte order to work. Other than that and a couple of other issues, the Mac port was really straightforward. So before release, Caster was solidly supported on both the Windows and Mac platforms. After release another guy helped out with the Linux port of Caster and so at that point we now had the major desktop operating systems covered. Over the years we added slightly different versions for the desktop platforms to adapt them to specific distribution avenues like Steam and the Mac App Store. The first port that required major reworking was iOS. That adventure was chronicled in my post Caster for iPhone: A Postmortem. Mike and I had the opportunity to give a presentation about what we learned at GDC Austin ’09. Later on as the Android and webOS mobile platforms took shape, I started to look into porting Caster to those platforms as well.

(more…)

Invader Zurp

September 12th, 2011
Spencer Nielsen Follow snielsen42 on Twitter

So for those of you on my Cannonade TestFlight profile, you might have noticed that I havn’t seeded a build for about two months. I have a good explanation for this.

Lets rewind back to right after my last Cannonade seed build. I was on vacation at the time and had the opportunity to stand back from Cannonade and evaluate things from a different perspective. Sometimes I don’t think I seek out those opportunities to just sit and think as much as I should (just thinking sometimes makes me feel a bit lazy for not doing). At one family gathering I observed my older son playing Fruit Ninja on his aunt’s iPhone. I was aware of Fruit Ninja and knew that it was a definite App Store success. As I watched him play I thought to myself “That just one play mechanic. One. Repeated, millions of times over and over and over.” This is the typical MO of most games that are successful on the App Store. Simple, easy to pick up and well implemented with good production values. With Cannonade I am trying to break new ground on the App Store. I still believe that there could be a place for deep multi-player experiences on the App Store and I think that Cannonade is on the right track. But watching Fruit Ninja got me thinking. Did I have a single, fun gameplay mechanic that I could repeat millions of times? The core fun mechanic of Cannonade is “Knock Your Friend’s Castles Down.” Maybe I could modify that to just “Knock Castles Down.” Even knocking down dumb castles was fun in and of itself. Maybe I could repeat that experience millions of times and put out a more limitedly scoped single player experience? I decided that it would be a really fun exercise and that I would put Cannonade on hold for a few months while I brought this new single player game to market. I call it “Invader Zurp“.

(more…)

Language Aid: A Postmortem

August 27th, 2011
Spencer Nielsen Follow snielsen42 on Twitter

Language Aid is a system-wide text lookup tool I developed and sold for the past couple of years. I recently decided to make it free and release the source code. This is the story behind it.

Rewind to 2006, I was just winding down active development of Vision, my OpenGL Window Sever/UI Framework. I had started work on Vision in college 3 years earlier and had been churning on it full-time for the previous 2 years. I had decided that it was finally time to get a job and so I interviewed around and accepted a position at Apple. I had two weeks until my start date and I wanted to do some programming for fun that was completely different from what I had been doing.

Iron Coder[0]

It was during that two week period of not yet working for Apple that Wolf Rentzsch started the (now defunct) Iron Coder contest. The way it worked was that the organizer announces an API that each of the contestants must use somehow in their entry and then 24 hours later a theme is announced that entries must also somehow incorporate. I thought it was just what I needed. A fun, small-scoped project with a little bit of competition. So the day of the very first Iron Coder arrived and the contest API was announced: The Accessibility API. Accessibility API? What’s that? Until that moment I had not been aware of it but it was actually just what I had been looking for to solve a different problem I had. I started researching it and immediately there were portions of it that were very interesting to me. Specifically, the ability for programs to inspect and copy data (like displayed text) out of other running applications was of particular interest to me.

(more…)

Language Aid 1.2

August 27th, 2011
Spencer Nielsen Follow snielsen42 on Twitter

Language Aid version 1.2 is out! The big feature of this release is that it is free and open source! This will also be the last release supported by Aoren Software. Development has pretty much wound all the way down at this point and the source has experienced some code rot as Core Foundation has progressively become more and more obsolete and Mac OS X has marched forward.

So it occurred to me that the time has come to set Language Aid free. Anyone care to take the code and modernize it? Maybe even release it on the Mac App Store? Let me know and I can work with you to make that happen. Be sure to check out my tell all Language Aid postmortem.

Exploring Airplay Mirroring Internals

August 20th, 2011
Spencer Nielsen Follow snielsen42 on Twitter

AirPlay Mirroring was without a doubt, one of the coolest iOS 5 features announced to the public at the 2011 WWDC Keynote. This amazing technology allows you to display the screen of your iOS device on an Apple TV 2. At the moment, the only supported mirroring device is the iPad 2 and the receiving device is limited to only the second generation Apple TV. Airplay Mirroring is the latest in a series of Apple media streaming technologies. The previous entry in the family was Airplay Video, which is a slightly different technology that allows specific content to be broadcast from a variety of iOS devices and iTunes to an Apple TV 2. The precursor to that technology was originally called AirTunes, and is used to broadcast audio content from iOS devices and iTunes to the AirPort Express and Apple TV (either first gen or second gen). One peculiar thing people noted about AirPlay Video was that it’s wide open and unencrypted! This was surprising in light of the fact that AirTunes was most definitely not. Because of AirPlay Video’s relatively easy hackability, there quickly sprang up all manner of apps for both Mac OS X and iOS which would act as an AirPlay Video consumer.

So my thought process went like thus:

  • AirTunes – Encrypted
  • AirPlay Video – Unencrypted
  • AirPlay Mirroring – ???

(more…)

Entries (RSS) and Comments (RSS).