Posts Tagged ‘mac’

PC to Mac ports- not an easy process

Monday, May 17th, 2010

Benchmarks, comments and forum posts have been circulating over past week concerning the quality and speed of Valve’s Mac Steam digital distribution client. Many users seem frustrated, some confused, and others even exclaim the superiority of Windows as an operating system. At the heart of this is the issue that porting an application from Windows to the Mac OS (Snow Leopard) is very difficult.

At imVOX, we’ve been working for several months on such a port of our voice communications platform from Windows to Mac. It hasn’t been as easy as we had hoped. We’re a small company and our expertise is firmly in the Windows platform. While we have very talented individuals I don’t think any of us had fully developed a Mac application prior, and certainly not one of this complexity. I’d like to share a bit of what made this far harder than we anticipated.

A few points first however: I am not the lead PM, nor am I a developer by trade. I’m a Director of Marketing who happens to be able to code in Ruby. Other people at imVOX are writing the code- not me. I’m just writing this blog post. Also, like I said in the prior paragraph, we are n00bs to developing on the Mac. There are likely several things were did wrong that a Mac ninja wouldn’t have run into. These are our experiences. Advice, ideas and offers to help are welcome.

Mono Makes it Easy- Right?

Our Windows client was written in Microsoft’s .NET 2.0 with C#. While .NET exists only on Windows there is an open source technology called Mono that allows for cross-platform .NET development, in theory making it possible to reuse most of our .NET code to create a Mac (and potentially even Linux) client. We put our code through the Mono Migration Analyzer and things looked generally good. This lead us to belief that this process would be smooth sailing, taking no more than a month at most.

The main idea here was to be able to have one set of code that we were using. No major forks/divisions in the code and reusing almost everything. That would make it easier, cheaper and faster right? Right…?

Workflow Woes

Around the same time as we were starting heavy work on the Mac client we made some other changes to our workflow. We moved from Microsoft’s aging Visual Source Safe to Git. We tried using Github at first, but then shortly after moved to our own self-hosted Git server. For Windows-centric developers who were used to having controls in Visual Studio that integrated with VSS, this was a bit of a stumbling block. Git isn’t hard, but if you’ve been building software for 5+ years using a centralized repo it certainly is a change.

Our developers were still using Visual Studio to develop the Mac software, instead of working in XCode. This required us having a Mac and a PC in front of each developer. I’m honestly not sure why we’re doing this, aside from our developers being deeply familiar and comfortable with Visual Studio as their development environment. If I had to write a Windows piece of software, I’d probably be using TextMate and doing the inverse myself so I can’t blame them.

Everyone had lots to learn. New tools, new ways of debugging crashes and just understanding the OS at a reasonably deep level took some time.

Interfaces

Our Windows interface was written using .NET forms. It was highly Windows-like and also was made to look very ‘gamer’ oriented. This had a few problems. First, the interface barely worked on the Mac. We were doing all sorts of things for transparency, collapsable areas, and to draw the screen overall. When they did work, it was slow and buggy. Debugging these was slow and tedious. Things just didn’t seem right.

After much effort, we decided to go with a native Mac interface instead using Interface Builder. We used MonoObjC as an Objective C to .NET/C# bridge. Thankfully Steve Jobs hasn’t gotten around to killing all translation middleware on the Mac itself (yet). This worked well overall and made our workflow much more manageable. Now myself or our graphic designer could easily check the most recent build out of Git, open up the interface in Interface Builder and rearrange things as needed without breaking anything. Overall MonoObjC was a great idea that I wish we had known about from day 1.

Developing an interface for the Mac however presents several interesting problems. Do you try to keep the exact same interface that you had on Windows for consistency? That pisses off Mac owners due to all the Window-isms present. But if you make a totally native UI you now have a lack of consistency between products. For games, this is less of an issue, but for a piece of desktop software your users notice either way.

If we were writing both Windows and Mac software again from day 1, I suppose we could have gone with a cross-platform interface solution like QT (or just used Java), but I still feel as though we would have been missing something on a usability level.

Feature Parity

One of our major goals from the outset has been to achieve complete feature parity between the Windows and Mac applications when possible. This has been a lot harder than we anticipated. We aren’t far off, but this doesn’t happen automatically for sure. Our main competitor Ventrilo does a rather poor job of this and we’d like to do better. With the next (still beta) release we’ll be missing a few things but we will catch up on that soon. I’d rather release early, release often than wait forever.

Audio and Network

Our program is mainly about voice chat, and obviously deals quite heavily on the audio layer. Since we are transmitting over the network it gets a little more complex with various codecs, echo cancelers and other gremlins.

To begin, audio on the Mac is totally different than audio on the PC side to a degree that I won’t even elaborate. We were using a proprietary licensed codec on the Windows side, but the cost for the Mac was prohibitive (and the quality/flexibility wasn’t what we wanted). Temporarily we’re using a PCMU codec until we can implement SILK/CELT on our servers. We had an echo canceler licensed from the same people on the Windows side so we had to rewrite our own on the Mac side. Our still isn’t perfect, but we’ve implemented an Audio Units chain as to get consistent and stable timing across the board (allowing for inverting of waves to cancel echo). That took quite a bit of time.

Push to Talk and Keyboard Access

Steam users have commented on the setup procedure of their Mac client being less than perfectly smooth. It requires you going to Universal Access under your System Preferences and enabling access for assistive devices in order to get the overlay to work. Guess what? We do the same thing. It isn’t because Valve (or our) programmers are lazy, but rather has to do with how Apple has protected the keyboard on a security level. I don’t know if I’d call it great security, but it certainly is a setting that 99% of users don’t toggle or are aware of.

Accessing keystrokes from an application when another application is focused is rather difficult under OS X and requires some trickery. It ended up that we had to write a separate driver (launches when imVOX does) that intercepts all keystrokes and then passes them back out to their original destination. As you’d imagine, this is roughly the same technique that a keyloggerwould do, and we’ve taken precautions to make sure that nothing is being logged, recorded or stored. This is why Apple doesn’t turn on assistive devices automatically. In our estimate, Valve is doing the exact same thing with Steam so this isn’t an uncommon technique. Should anyone have a better idea, please let us know. We’ve been ripping our hair out over this one.

Odds and Ends

We’ve got a bit more to do on the Mac to make it really Mac-like. We need to write help files that are specific to the Mac. More testing is needed overall. We have a TON of conditional statements in our code now checking if we are running the Mac or PC version. Shortcuts need to be polished. Installation process is far different from the PC. The way we built the application is also different (using nant or Xcode).

Final Thoughts

We thought this would be a simple process. Unfortunately we got bit by our lack of expertise, interface issues and the 1-10-100 rule. Anyone critiquing Valve for their results so far on Steam/Portal should remember that they’ve been at this for several years on the Windows side and programming on the Mac is different.

Even using something like Mono does not make for an easy transition unless your application is dead simple. Also using Mono holds you back a bit for your Windows development. Using .NET 4.0 or Expression Studio will force you to split your code even moreso. I think the best way around this is to create a few shared libraries, and build everything else natively on each OS from the beginning. Sounds harder, but it will probably serve you better in the long term.

  • Share/Bookmark

How to Update World of Warcraft on a Case Sensitive Volume

Friday, April 9th, 2010

If for some reason you formatted your hard drive as a case sensitive volume on your Mac, then you’ll find that World of Warcraft will not update due to an error “World of Warcraft Update may not work properly on a case-sensitive volume.” That is to say that the update won’t work at all. Luckily there is hope and it is a rather simple solution.

To update WoW on a case sensitive volume you’ve basically got to transfer it temporarily to a non-case sensitive volume. Blizzard’s advice is to nuke your system and start over again, but this is overkill. You can do one of two things- either move it to an external hard drive, or move it to a disk image which is basically a virtual hard drive in a single file. I did the latter and here are the steps.

  1. Open Disk Utility from /Applications/Utilities/Disk Utility (or Spotlight search for it)
  2. Select “New Image” from the toolbar or go to File, New, Blank Disk Image
  3. Choose where to save the disk image. Wherever you save it will need space for another entire copy of WoW. If you only have 10GB disk space left, this isn’t going to work.
  4. From the Size dropdown choose Custom and input 30GB (or whatever size you feel is appropriate. I think my WoW installation was just a little short of this so it made sense)
  5. Change the Format to Mac OS Extended. The default is Mac OS Extended (Journaled) which will work too, but Journaling is slower and we don’t need it for WoW.
  6. Then hit Create. Grab a cup of coffee. Making a 30GB disk image will take up to 30 minutes or so.
  7. Open /Applications and drag the entire WoW folder to this newly mounted disk image. Copying this will also take a while. Get outside and enjoy the weather or something.
  8. Run WoW Launcher from its new location. Updating will occur normally now and you can run WoW.

At this point you’ve got two options. You can either keep WoW in this disk image and run it from here, or you can copy it back to your /Applications folder (making sure to delete the old one in Applications first). I don’t know the performance impact of running it from a disk image, but otherwise every time there is a patch you’ll have to take the hour or two go through this process.

  • Share/Bookmark

Native Mac Client Look and Feel Preview

Monday, March 29th, 2010

We’ve got a mostly-working fully native mac UI in testing now. Pretty soon Mac users will have a killer, GPU native accelerated client with none of the buggy drawing issues that we had before.

A screenshot preview of the new native imVOX mac clientScreenshots preview of the native imVOX mac client login screenScreenshots of native imVOX Mac client on the loading screen

  • Share/Bookmark

Weekly Update #2

Friday, March 19th, 2010

Major changes are on the horizon for imVOX along with big news.We are shifting even more of our efforts into expanding our development and engineering capabilities! We want your ideas, dreams and feedback for how we can make the best gaming communication platform possible.

Here’s just a few of the things coming with our next release, which is initially slated for the end of the month.

  • Major Mac Client Update- The old one barely worked. This one will be leaps and bounds ahead of it. We have a developer dedicated to getting this working.
  • High Definition Voice- Audio quality will go up dramatically with only minor hit to bandwidth and CPU. A new mixing engine will enable expanded future capabilities such individual level control of other users without effecting the overall chat.
  • Expanded Text Chat- Clickable URLs, one-to-one chat, and notification of text messages will make text chat more useful than ever
  • Bug Fixes- The new imVOX will be faster and more stable. A new testing procedure has been put in place to catch issues before they hit you in the middle of a raid
  • And More!- A new MOTD screen, user aliases, user profiles, away channels, and better banning options are all just around the corner

If all of this seems exciting, just wait for what we’ve got in our back pocket. We aren’t just making another voice chat program, we are going to change the way you communicate and interact with your games. Please leave your ideas and feedback in the comments.

  • Share/Bookmark

What happened to the imVOX Mac client?

Sunday, February 21st, 2010

As any imVOX user on a Mac will tell you- the Mac client is really not stable and barely works. Users have posted to the forum and issues have been acknowledged. So why haven’t these bugs been fixed? Does imVOX hate Mac users? When will we see a stable Mac client? Hopefully this will answer some of these questions.

How we almost didn’t go Mac

I (David/tibbon) am a Mac user. Everyone else at imVOX is a Windows/PC user for the most part and historically this is a very Windows oriented shop. We were using Visual Source Safe for our version control and we’ve been using C#/.NET for our development. Many of the servers are running on Windows. Microsoft runs deep through this company.

I knew that we would need a Mac client early on if we wanted to grab some of the larger MMO markets like World of Warcraft. Yet, management wasn’t totally sold on a Mac client. It might be expensive and although it made sense it wasn’t a large marketshare. Couldn’t we just go after other games and markets? I pleaded that we really needed one and at one point we estimated that it would only take a month to get one off the ground. We were slightly wrong on that. Ok- very wrong.

Mono to the Rescue?

Mono is an open-source, cross platform implementation of Microsoft’s .NET 2.0. It appeared at first as the answer to our problems and would save us a ton of time, money and resources.

What we thought would be easy and a time-saver just wasn’t. The long-term concept here was that we didn’t have the resources to maintain two separate code-bases and using Mono would make it so that the code shipped to Windows users was the exact same as to the Mac users. We’d be able to (in theory) have a Linux client too with minimal effort. We didn’t have the expertise as Mac developers and this diverted heavily from the development of our Windows client.

One of the biggest issues is the interface. Aside from the obvious Mac vs Windows design styles, .NET and Mono seem to handle graphics rather differently. The way we draw our display is rather intense compared to most other .NET applications which makes development very difficult vs using a native interface.

Where are we now?

As seen in prior blog posts, we’ve been trying to find Mac developers to work with us to make imVOX work on the Mac, and continue development on the Windows side. When I say work on the Windows side however that isn’t fully true. Since the code is shared things that go into the Windows side help out the Mac side too. If we fix a bug there, it will likely help everyone out. However fixing something on the Mac side likely doesn’t do much for Windows users since the code is probably in a big if statement that is specific to the Mac.

Finding Mac developers isn’t easy however. We’re looking for individuals with very specific skills and talents to work on a unique program that delves off into unknown realms quite often.

We’ve spent the last week patching up version .27 for the Windows side. As soon as we get the updater running properly on the Mac then many of those changes will trickle down to the Mac side as well. Next week we’ve got one Mac guy starting with us. We’ll have to see how it goes really. I can’t honestly say how long it will be to get it up and running fully.

I’ll be blogging here about some of the more technical details of the Mac release soon.

  • Share/Bookmark

imVOX Mac Client Alpha Ready for Download

Thursday, December 24th, 2009

Hot off the press is the imVOX Mac client. This thing is so hot off the press I’d say its radioactive, as in not fully stable. Call it an alpha, call it a nightly build. Call it what you will. It works (mostly, or at least most of the time) and its available for you to try out. Just don’t cry to me if it goes down when you’re facing off with the Lich King. Don’t say I didn’t warn you!

The download is somewhat bigger than the PC version due to the fact that it includes the Mono Framework that we’re using instead of Microsoft’s .NET for Windows.

Go ahead- download it. Mount the image, and give it a shot. You’ll have to install Mono before running it, but doing so is quick and painless. Then just drag imVOX to your Applications folder and you’re good to go.

You might- no, you will hit bugs. When you do, please go to the imVOX Support Forums and give us a shout there, or shoot us an email at support@imvox.com. We’re going to keep improving it and releasing patches soon of course. Provide us as many details as possible, including the imvox.log file which is located inside of the application. Just right click on imVOX’s icon in Finder and go to “Show Package Contents”. Then browse through Contents/Resources and you’ll find the log file. It is really helpful for us to have this if you hit problems.

  • Share/Bookmark

imVOX Mac Release Coming Soon!

Monday, November 16th, 2009

The community has spoken and we’ve heard you loud and clear. We need a Mac version.

So we’ve got our holiday elves hard at work to bring you something awesome- a Mac client! No coal for you this year.

It should be about two weeks from today until we have a working Mac client. It might have some bugs upfront, but we should have it soon!

  • Share/Bookmark