Installing SFML from Source on OSX

It's fairly easy to install SFML from source on OSX. Following the instructions in Compiling SFML with CMake you'll need CMake. The problem is CMake isn't included with OSX default. Fortunately, Homebrew remedies that for us. Simply follow the instructions on the Homebrew site to get started.

Once that finishes installing, follow the current brew instructions for updating your formula list. Then, simply install CMake:

    brew install cmake

Notice I omitted sudo. That's because homebrew installs everything under /usr/local/, and you're going to have a bad time if random bits and pieces under that hierarchy are owned by root.

Next, snag SFML from source, cd into the cloned directory, and then kick off CMake

    git clone https://github.com/SFML/SFML.git
    cd SFML
    cmake CMakeLists.txt

Once CMake finishes running (it'll take a couple seconds) you'll have our old friend Makefile generated in the local directory. You probably know what to do at this point

    make
    sudo make install

At this point, you should have some fancy new headers and libraries under /usr/local. Congrats!

P.S. I'm a masochist and like to build SFML games from the command line, so I found out the hard way that /usr/local/include and /usr/local/lib aren't in your default search path. To tell clang you want it to look somewhere else, give it the -I (include path) and -L (library path) flags.

    CFLAGS=-L/usr/local/lib -I/usr/local/include ...

Using an Arduino to burn bootloaders

A few years ago, my wife decided to buy me a bare bones, electronics learning kit called a Nerdkit. You can think of it as an Arduino on a breadboard. Included in the kit are various sensors as well as a wonderful little guide walking you through the setup and introducing a lot of basic electronics concepts like Ohms Law. Whereas an Arduino is a great jumping off point for creating lots of amazing projects quickly, it abstracts a lot of the nitty-gritty that I like to get into. It's kind of like learning to program in BASIC before tackling a lower-level language; more programmers than ever get through their entire career without knowing C, and I'm sure a lot of electronics hobbyists don't care to learn AVR-C or what makes a bootloader work. This is why I like the Nerdkit so much: you're essentially building an Arduino from scratch.

Whilst tinkering with said Nerdkit in the first few months, I managed to corrupt the bootloader on the chip. No matter what I tried, I couldn't flash new programs. Hours of frustration later, the Nerdkit ended up in a box in favor of less complicated things. Fast-forward a few years, and I find the Nerdkit and all the pieces in a box, and the memories of defeat come flooding back and so I decided this time I was going to get it working.

Read more…

Perlin Noise for terrain generation

One of the things I find fascinating is the idea of "random" content generation for games, and lately I've been fascinated with procedural generation of maps and terrain. One of the things that seems to be most prevalent in games is the need for realistic looking terrain. A common technique for this is generating Heightmaps for use in commercial game engines like Unity and Unreal as well voxel based games like Minecraft. The values of the individual pixels of the heightmap are interpreted literally as terrain elevation. The problem with heightmap generation is it's tough to produce natural looking terrain with random numbers alone. This is where Perlin noise comes in.

As you can see, Perlin noise is wonderful for generating things that look like terrain:

CDN Test Screenshot CDN Test Screenshot

Read more…

MVP vs MDP

A frequent point of contention when developing new products is just how many features should be implemented before the product can be rolled out the door. While the specific meaning and implications of "MVP" have been done to death by thousands of other writers, I'm going to attempt re-iterate the need to distinguish "Minimum Viable Product" and "Minimum Desirable Product." These two terms are frequently at odds with one another, with MVP more often than not being used when MDP is the intended term.

I'll start with two somewhat subjective definitions:

  • Minimum Viable Product - The actual minimum product necessary to test assumptions and potentially prove the existence of a market
  • Minimum Desirable Product - The smallest possible feature set product owners are willing to launch with

Read more…

Namecheap DynDNS with a Mikrotik

I've been wanting to use my Mikrotik to update DynDNS for some time. After digging, I found out that newer firmware had a "Cloud" option that effectively accomplishes it, but I wanted to use a domain I registered through Namecheap instead. Some googling showed that the "Scripts" functionality of the router was perfectly suited to the task; coupled with scheduling, I was good to go.

You're going to want to go to Namecheap and enable DynDNS for the domain you'd like to use. Checkout How do I setup a Host for Dynamic DNS? and How do I enable Dynamic DNS for a domain? for more information on getting that setup. After you've done so, Namecheap will show you a password; be sure to copy that.

Read more…

Team Communication and the Least Common Denominator

A recent Hacker News post mentioned producing crap. I've been so focused on trying to only put good things online that I've avoided just writing anything that may be less than optimal which, as the post suggested, implied that I'd never write anything at all. As such, I've decided to write about team communication, both externally and internally.

One of the things my team is struggling is communication, especially when it comes to remote workers. My belief is that you need to "lower" the tier of communication to the level of the most disadvantaged co-worker. If everyone is available and in-person, bringing all the relevant people into the conversation face-to-face is the optimal solution. Meanwhile, if at least one person is in another city, state or country, everyone should communicate as much as possible using the most convenient medium available to those peers. Be it Skype, IRC, email or even smoke signals, unless careful attention is paid to ensuring your co-workers stay in the loop, invariably someone will be left out of an important conversation and feelings will be hurt.

Disclaimer: We have not objectively solved this problem, but my hope is we get a little better every day.

So this leaves the team with a conundrum: the mechanism of communication is likely less optimal than a closed door room full of whiteboards. In other words, your situation sucks, but imagine how the remote developers feel. Emphasis should be placed on maximizing collaboration while minimizing frustrating interaction. This usually requires effort and often money, too. Where does that leave half remote, half local teams? Ideally, you split the remote and local developers into focus groups, so that in-person communication doesn't need to be reproduced for the one or more remote peers. To put it another way, no one wants to play the secretary, and if someone does, the remote end likely receives a less than optimal description of the localized conversation.

In short, remote communication is a huge hurdle, and I don't think there are any easy answers, but the value of feeling like an equal contributor out weighs the pain of bridging the communication gaps.

Tools that we like / ameliorate the problem:

Compiling SFML for broader OS/X compatibility

I recently competed in Ludum Dare 27, and one of the biggest struggles I had was making an application I built on the command line on my machine actually run for others. The first sign that I should have considered alternative frameworks was when I could only get SFML to link properly into my game when I built it from bleeding edge source. However, I'd been trucking along just fine using the compiled dylibs. I had been assuming the entire time that it was sufficient to include code and instructions for building the project yourself, but when the barrier to entry is too high, people will simply prefer all the Unity and HTML5 Canvas games. It's hard to blame them, really.

So, I set out to figure out how to package up SFML with my binary and ship it. After stumbling through a bunch of mediocre attempts to include the SFML dylibs in the zip file I submitted ot the competition, I finally realized the only thing left to do was construct a Mac app bundle.

Enter XCode.

Read more…