Aug 082012

I’ve been dabbling in game development for at least 7 years. A lot of knowledge and experience have been absorbed, but there’s not a lot to show for it. My primary project was originally a barely-playable prototype, but has been a technology demo ever since.

A year and a half ago, I wrote that you have to complete simple game projects before building larger games successfully. I’m sure it’s not a universal rule, but I have no doubt a more experienced developer designs better games. I failed to follow my own advice and continued dabbling with my existing project. There’s not a lot of free time in my schedule, but I’m now certain I have enough to get things done.

Screenshot of N-Snakes game

At the end of July I attended a Boston Python Meetup focusing on simple projects. Based on a Pygame template they built, I was able to quickly build a playable game. I’m not about to win any speed-coding competitions, but I have an interesting game after one month of dabbling.

Continue reading »

Feb 032012

Procedurally generated content is a fairly large movement at this point. The most prominent, recent example is probably Minecraft, which relies heavily upon computer algorithms to generate the world and events in the game. There’s no cubicle farm of artists churning out Minecraft landscapes.

To a large extent, we have Ken Perlin to thank for this. Ken was awarded an Academy Award for the invention of Perlin Noise during the production of the film Tron. His name is now ubiquitous, but unfortunately the algorithm which bears his name is dated. Ken published a paper in 2002 describing the drawbacks of Perlin Noise and introducing a new algorithm. Many references to this algorithm confusingly call it Improved Perlin Noise, but it is actually named Simplex Noise.

It seems many developers start searching for noise functions and don’t know which to use. Thankfully, Simplex Noise is a suitable replacement to Perlin Noise in almost every way: the noise is cleaner, less computationally expensive and easier to implement in hardware (if desired). Unfortunately, with all the confusion on the web it’s hard to find a good implementation and impossible to find documentation.

Continue reading »

Jan 272012

Maybe you’ve had the experience of retrofitting your computer to operate quietly? Afterwords you say to yourself, “How did I ever think with all the noise that computer was making?” A small change in your environment creates a shift in your thinking and productivity.

I had the same reaction to the Sublime Text editor. After an hour of use I was loving it. A couple hours later it was customized just the way I like it. The next day I realized I was spending more time getting good code written and less time fiddling around.

Screenshot of Sublime text editor

Sublime doesn’t have every feature possible, but it does have some imaginative features such as multiselect/multi-edit. Linux, MacOS and Windows are supported. A vi mode is available. It’s also incredibly clean and fast. You’ll love the way it looks and feels.

There are all sorts of options for customizing the editor. Many plugins are available and it’s easy to write you own. You’ll also find plenty of assistance in the forums. It seems Sublime is going viral within the developer community.

Dec 072011

I like to have the option of playing music on my headphones or outputting to the stereo – it really improves family life when they don’t always have to hear my dubstep ;) Unfortunately, the sound cards and devices you have available don’t always fit together nicely. For Linux users, ALSA gives you a lot of control and flexibility over audio devices. However, it is usually difficult to figure out exactly what needs to be done to output to multiple audio devices.

In my case, I have an onboard audio device with optical digital out. But onboard audio usually receives a lot of noise from the rest of the components on the motherboard – your headphones buzz when a hard drive seeks or you move your mouse pointer. I have broad musical tastes and orchestras sound pretty awful with static in the background. By adding an old-school Creative Labs SoundBlaster Live card, I can get exceptional quality output for headphones.

What caused difficulty was getting audio output to both the onboard and SoundBlaster audio devices at the same time. By default, Linux applications will send audio directly to one specific device. All you need is a properly structured ~/.asoundrc file to configure ALSA.

Continue reading »

Nov 202011

I have read rumors that certain shared web hosting providers assign more than 1,000 users to each of their servers. This implies that the servers will be grossly overworked and the service will be slow. However, you never really know what you’re going to get with a new host, because such numbers are never published. You won’t see the sales pages for Godaddy and Dreamhost list service descriptions as One 8-core Opteron processor, 16GB memory and one 2TB hard drive with 2,000 user accounts per server. Unfortunately you won’t find anything like that on AN Hosting’s pages either, but I did a little sleuthing and have more details for you.

Continue reading »

Oct 182011

I’m giving a lightning talk at the Boston Python User Group this week. The presentation is very short, but provides a 5-minute overview of why an object-oriented design may not be ideal for game development. None of these are my own ideas – I’m simply passing along the wisdom of much wiser (and larger-scale) game developers. Object Oriented designs have caused them much pain in the past, so they’ve come up with a better scheme: Entity Systems.

Entity Systems provide more flexibility (for the developers and the game designers) and higher performance. The end goal is a design that is easier to create and much easier to modify.

Continue reading »

Sep 212011

Rather than the more traditional QWERTY key layout, I use DVORAK. I’ve been typing with DVORAK for just over a decade, so I no longer remember my original intentions for switching. However, DVORAK has long been recommended as a replacement for QWERTY – partially for typing speed improvements, but also to reduce ergonomic strain on the typist. Studies conducted by psychologists have suggested perhaps a 5% speed improvement for DVORAK, but the ergonomics have not been thoroughly studied (estimates based on finger travel distance suggest a potential ~40% improvement). I argued for the efficiency of DVORAK by analyzing keyboard layout efficiencies for several different types of documents.

When I purchased a Kinesis contoured ergonomic keyboard in 2000, I discovered there was a learning curve before I could use the new keyboard effectively – Kinesis contoured keyboards arrange the keys in straight columns. It made sense to make the switch to DVORAK at the same time and re-train myself entirely. This lead to several weeks of frustration, but I was determined and thankful that I stuck with it (much like when I completely uninstalled Microsoft Windows from my first computer).

Photograph of Kinesis Contour Keyboard

For the majority of these last 11 years, I’ve had a DVORAK keyboard at home and QWERTY at work. Within the last two years, I’ve been able to use DVORAK for both. I now perform almost everything on a Kinesis contoured keyboard with DVORAK layout.

People often ask how I cope when I happen to sit down at a QWERTY keyboard. The truth is that there is no problem at all. When I sit at a traditional keyboard my fingers automatically know to go QWERTY. Similarly, when I sit at a Kinesis keyboard nothing makes sense but DVORAK. Although I didn’t fully consider the ramifications until recently, I have inadvertently trained my brain to be capable of both keyboard layouts. But each layout is strongly associated with a specific physical keyboard design!

I am not a psychologist, but I was curious to learn how well my skills would transfer. Am I able to use QWERTY on a Kinesis keyboard? How effectively would I work if I sat down at a traditional keyboard that had been remapped to DVORAK? My hypothesis was that I’ve so strongly associated the physical Kinesis keyboard with DVORAK that I would be unable to perform satisfactorily with any other layouts. Similarly, attempting to use DVORAK on a “standard” keyboard would fail. I found the results to be surprising…

Continue reading »

Aug 272011

The idea of bookmarklets is so simple that I suspect many people use them without realizing it. A bookmarklet is basically just a specially-crafted bookmark for your browser which performs special tasks. This can mean performing custom actions on the current page or generally improving your web browsing experience.

Technically, bookmarklets are short snippets of Javascript code which can do just about anything. They’ve been around for a long time, but I’ve only been using them a few years. With the increasing prevalence of cloud products and services, I expect their usage will only increase. Bookmarklets make it easier for you to do everything you need to with just a web browser. As such, I’m keeping a list of the most useful.

Continue reading »

Aug 142011

AN Hosting recently relocated to a Seattle datacenter. As part of this process, my site is now running on a much more modern server (AMD Opteron 6100-series Magny Cours vs. Intel Xeon 5400-series Harpertown).

Unfortunately, a new server and new install can mean software changes. AN Hosting has tightened up the security settings on PHP. Better security is always a good thing, but it means the Drupal command line utility drush no longer works out of the box. (For those that don’t know drush – please give it a chance. It provides near foolproof Drupal core/module/theme upgrades as well as command-line control of your Drupal sites.)

Continue reading »

Jun 272011

For administrators and power users, it’s often useful to log in as multiple users on the same web site. However, you can’t normally do this from one web browser – sites keep track of your whole session. Logging in as one user logs you out as the other user.

An obvious, but bulky, solution is to use one web browser for each log in (e.g. Firefox and Chrome). However, I’ve found that Google Chrome’s “incognito” feature works much better.

Continue reading »