Thoughts on life, Japan, and technology.

Xcode 4 - How to Install SDL on Mac OS X 10.7/10.8 Lion (youtu.be)

I really wanted to install and use the Simple Directmedia Layer to begin building some game prototypes in XCode, but I kept running into the same maddening compiler errors.

Undefined symbols for architecture x86_64:
  "_SDL_main", referenced from:
      -[SDLMain applicationDidFinishLaunching:] in SDLMain.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I naturally searched for a solution on Google and eventually found this video, which explains how to successfully build and run a program in XCode 4 using the SDL. I generally prefer to read instructions, though, so I’m essentially going to transcribe the major steps outlined in the video for your convenience:

  1. Download the SDL 1.2 package from the SDL website.

  2. Open the package and extract its contents (SDL.framework and devel-lite).

  3. Launch XCode.

  4. Create a new project (a “Command Line Tool”), making sure to disable Automatic Reference Counting.

  5. Drag the SDL framework that you extracted in step 2 (SDL.framework) into the project.

  6. Remove unnecessary code from main.cpp.

  7. Drag SDLMain.h and SDLMain.m into the project from the devel-lite folder that you extracted in step 2.

  8. Replace #include "SDL.h" with #include <SDL/SDL.h> in SDLMain.m.

  9. Add the following #include’s to main.cpp.

    #include <SDL/SDL.h>
    #include "SDLMain.h"
    
  10. Make main.cpp an Objective-C++ file. One way to do this is to select main.cpp in the Navigator, open the File Inspector in the Utilities on the right side of the XCode window, and then select “Objective-C++ Source” as the File Type. You could also simply rename main.cpp to main.mm.

  11. Change the main function signature to accept a char * argv[] instead of a const char * argv[].

  12. Make sure that SDLMain.m is compiled with the project. Select the project file in the Navigator, open the Build Phases tab, and add SDLMain.m to the list of files under Compile Sources.

  13. Make sure that the binary is being linked with the SDL framework. SDL.framework should be listed under Link Binary With Libraries.

  14. Link the Cocoa and Foundation frameworks with the project’s binary. Simply add Cocoa.framework and Foundation.framework to the list of frameworks under Link Binary With Libraries.

  15. Build the program. This should finish successfully with a few warnings but no errors.

  16. Stub out a simple SDL implementation.

  17. Build and run the program. A blank window should appear.

  18. Set a window title with SDL_WM_SetCaption.

  19. Recompile and run the program again.

I hope that you find this at least as helpful as I did!

Nintendo's indies guy tells you how to get your games approved (www.gamasutra.com)

I love reading articles like this because they give me hope for the future of the games industry. The democratization of the game development process is good for everyone: it means more games, more choice, and thus more art. I think that Penny Arcade’s Jerry Holkins said it best in the following quote from his news post on June 1, 2012 (even though he was technically responding to the issue of offensive content in some games, I think that his point is much more widely applicable).

The answer is always more art; the corollary to that is the answer is never less art. If you start to think that less art is the answer, start over. That’s not the side you want to be on. The problem isn’t that people create or enjoy offensive work. The problem is that so many people believe that culture is something other people create, the sole domain of some anonymized other, so they never put their hat in the ring. That even with a computer in your pocket connected to an instantaneous global network, no-one can hear you. When you believe that, really believe it, the devil dances in hell.

With that said, I was really impressed to see that Nintendo is trying to become a much more viable platform for independent game developers. According to the Penny Arcade Report, I’m not the only one to be pleased with Nintendo’s new policies.

One developer I spoke with said this change in policy may have come a little late for Nintendo, but it’s still a step in the right direction. Being able to control your own pricing, pick your release date, and the affordability of dev kits (Nintendo described the cost as the same as a high-end PC) are all moves that make Nintendo consoles much more attractive to developers.

In fact, I’m going to list what I found to be the biggest takeaways from the Gamasutra interview for anyone who may be interested in developing games for a Nintendo platform (particularly the Wii U). Unless stated otherwise, emphasis in all quotes is mine.

By the way, don’t forget that you can follow Dan Adelman on Twitter if you enjoyed his interview and would like to continue getting the latest information on Wii U development.

Read more…

Smart Guy Productivity Pitfalls (bookofhook.blogspot.jp)

How many times have we all heard the following mantra?

I work smarter, not harder.

Isn’t it seductive? As long as we are smart, we don’t have to work as hard, right? After all, who really wants to work harder?

Well, as it turns out you can work both smarter and harder, and you probably should, too, if you want to get any better at what you do. Especially if you’re trying to keep up with John Carmack.

A Successful Git Branching Model (nvie.com)

Git branching model

I came across this article on a standardized Git branching model some time ago, but I still find it quite useful to reference from time to time. If you’re using Git, this is definitely a worthwhile read.

Somewhere in the Arabian Sea (www.thisamericanlife.org)

I just finished listening to this old (2002) episode of This American Life, and I couldn’t help but imagine that the exact same story could just as easily take place on a starship in the future. I actually found it fascinating to hear about the day-to-day life of the majority of the crew on the ship, who never engage in any combat missions. Here’s the summary (emphasis mine):

Life aboard the USS John C. Stennis, an aircraft carrier in the Arabian Sea that’s supporting bombing missions over Afghanistan as part of Operation Enduring Freedom. Only a few dozen people on board actually fly F-18s and F-14s. It takes the rest of the crew—over 5,000 people—to keep them in the air.

Because I’m weird, this radio show also reminded me of a question and answer posted on scifi.stackexchange.com about the ships used by the Empire in the Star Wars universe. I particularly liked the following paragraph in the answer.

And the more you scale up, the greater the logistical resource needs stack up, especially if the vessel is going to be on multi-year missions across the galaxy. For psychological and social reasons, you’d need to have even more crew comforts and civic infrastructure, like libraries, entertainment centers, living areas, schools, gyms, hydroponic farms, etc. You’d also have more need for support personnel from electricians and mechanics to nuclear engineers and scientists to security officers, forklift operators and janitors. Conveniently, a large crew and ship will also serve to reduce the psychological stresses of feeling isolated and trapped during extended space voyages.

So whenever we finally get around to building spaceships to explore the stars, they may end up operating a lot like our aircraft carriers do now. Anyway, it’s an interesting thought.

Wii U CoD (www.penny-arcade.com)

I love Gabe/Mike’s post on playing Call of Duty on the Wii U. As the Penny Arcade Report’s Ben Kuchera has noted before, there has been some confusion about exactly what the Wii U is. I myself have wondered why the Wii U GamePad would be superior to a computing tablet. Gabe/Mike gets right to the heart of the matter and makes a very strong case for why the Wii U matters (emphasis mine).

So what is it about the Wii U version that makes up for losing access to Xbox Live? For me it’s the gamepad functionality. At any time you can tap a button on the Wii U gamepad and shift the video from your TV down to the handheld screen. For a gaming dad this feature is a blessing. You people without kids might be surprised to learn that when you have children you need to alter your gaming routines. First of all the TV simply isn’t always available. Much of the time it’s showing the same Curious George episode for the millionth time or being used to re-watch the entire Lego Ninjago series from start to finnish [sic]. The ability to start up and play CoD on the gamepad without ever having to use the TV once is incredible. Normally I’d wait until the kids were in bed to play a game like CoD but now I can sit there on the couch with my kids and play an M rated game without them even noticing. More importantly I’m not playing some bullshit mobile version of CoD, I’m playing the real game and earning real XP! When they leave or go to bed I can tap a button and send the video back up to the TV and keep playing.

This sounds very similar to my own experience of using a smartphone for the first time. At first, I assumed that I was mainly going to use it for maps and web browsing. I was dead wrong. To my great astonishment, I have found that I mainly use my phone for reading. I can pull it out of my pocket whenever and wherever I have a few minutes free, read an article or blog entry, and then quickly put it back. I can shunt my reading from my computer to a portable device and thus free up my computer to do tasks for which it is more optimized (i.e. anything that involves a lot of typing). My smartphone has expanded my computer’s capabilities, not replaced them. In the same way, I see the Wii U GamePad expanding the capabilities of the next-generation gaming console. The Wii U GamePad is fundamentally different from a computing tablet because it doesn’t require you to buy or download mobile versions of every game; you can use the GamePad as your screen at any time while still playing the exact same game. That’s a very compelling feature for any household that shares a TV.

On Living in Japan

First, a quick disclaimer: I was born and raised in the United States. As a result, when I make observations about Japan they are based on—and contrasted with—my own experience living in the U.S. Needless to say, my life experiences may or may not be similar to your own. If you haven’t lived in the U.S. or known anyone who has, you may not find some of my observations to be very surprising at all; in fact, you may find my assumptions to be more interesting! Nevertheless, I hope that at least some of what I write here will be informative to you.

I have lived in Japan for nearly nine months now, and I think that I am finally ready to share several observations that I’ve made about domestic life here. Note that I am explicitly focusing on (what are to me) interesting aspects of Japanese residences; I will not discuss cultural differences between Japan and the U.S. per se. Although it’s true that I have immersed myself in the Japanese language and culture from abroad for over twelve years, I don’t feel qualified to pontificate on the Japanese people, language, and culture; I couldn’t do the subjects justice, nor would I wish to expend the requisite time and effort to do so if I could. No, I’m more interested in shedding some light on what it’s like to live in a Japanese home, to illustrate a number of small ways in which the trappings of everyday life differ between Japan and the United States.

Read more…

750 Words

I stumbled across 750 words some time ago and thought that it was a great idea. As is often the case, I forgot about it shortly thereafter. It’s a new year, though, and I have resolved to write more. 750 words seem like a good place to start.

Here’s a quick overview:

I’ve long been inspired by an idea I first learned about in The Artist’s Way called morning pages. Morning pages are three pages of writing done every day, typically encouraged to be in “long hand”, typically done in the morning, that can be about anything and everything that comes into your head. It’s about getting it all out of your head, and is not supposed to be edited or censored in any way. The idea is that if you can get in the habit of writing three pages a day, that it will help clear your mind and get the ideas flowing for the rest of the day. Unlike many of the other exercises in that book, I found that this one actually worked and was really really useful.

How much can one say in 750 words? How long will it take? You and I are about to find out together.

Read more…

On Transfolk (whatever.scalzi.com)

I couldn’t help but write a post here after I read the following quote (emphasis mine):

Everyone is in the process of becoming who they are; we all start as rough drafts and through the act of living and choices we make, refine who are [sic], hopefully getting closer to who we imagine we could be as we go. None of that is easy. Some people have further to go with that process than others, because of their own set of circumstances. I think if you’re a good person or are at least trying to be, when you see someone on that sort of journey, you encourage them when you can. And if they have come to a place where they are happy (or even just happier) with who they are, then you celebrate that with them.

I love this quote because although John was writing to explain what he meant by saying that he is supportive of transsexuals, the quote can be applied to pretty much everyone. I’ve held onto a similar sentiment for a long time with regards to getting older, actually: I feel that with each passing year I am coming to understand myself better and thus approach what I would consider to be my “true self.” I’ve certainly made a few missteps along the way, but as I look back I realize that I have undeniably made progress. Life really is a story that we tell ourselves and each other, for better or for worse.

Finally, for what it’s worth, I should say that I am entirely in agreement with John’s view of transfolk. I would be lying if I said that I understand how they feel, but I fully support their right to do so.

More on DRM and ebooks (www.antipope.org)

This is an excellent business argument for removing mandatory DRM from ebooks. The bottom line: removing DRM will mainly cater to the voracious consumer of midlist titles and authors, but it will also generate immense goodwill and provide more opportunities for small and independent retailers to break into the ebook business.

For what it’s worth, I came across this article through a link on John Scalzi’s blog.