We recently completed a project which involved automatically creating heatmaps containing click data from a questionnaire. In this article I’ll discuss the details of how we generated these maps. Sample code will be given in Processing, but the concepts are applicable to any programming language/API that lets you manipulate individual pixels.
The project’s basic premise was that users would get a set of questions related to the area in which they live, questions along the lines of “What’s your favorite spot?” or “Which place do you think could use more trees?”. They answered these questions by clicking on a map. These clicks would be stored in a database and periodically evaluated by a server-side utility written in C++, which would create clickmaps (containing the locations of every click for a given question) and heatmaps (giving a rough overview of the relative click densities in different regions on the map).
In my last post, I wrote about the importance of understanding how the decisions you make about modelling randomness can shape your game and sometimes leave unwanted artefacts in its gameplay. I’d like to linger on the topic of randomness for a bit and take a quick look at Gaussian distribution. If this conjures up somber memories of half-understood highschool math, don’t worry – this article will be very light on math.
Gaussian (or “normal”) distribution is everywhere. The famous bell curve gives us the distribution of a population’s height or intelligence, of amplitudes in electronic noise, or of the number of rainy days in a given month.
But why is the curve shaped like it is, and when is it a good idea to model a random process with normal distribution rather than just make all possible outcomes equally probable?
Between 2008 and early 2010, we must have played around 500 hours of the balloon battle mode of Super Mario Kart (the GameCube version) at the bobblebrook office. We knew the ins & outs of every stage, discovered little-known bugs/features (such as the ability to shoot across low walls and plateaus if you’re standing right in front of them – total game changer on the cookie stage), we tried playing the game in reverse gear only, and on the GameCube stage we even tried playing with closed eyes (which didn’t work that well, in case you’re wondering).

Mario Kart balloon battle on the GC - before Nintendo completely butchered it for the Wii (yes, I had feelings about that). Image source: http://cube.ign.com/articles/458/458922p3.html
When you play a game a lot, small faults become very noticeable. With Mario Kart, our biggest ire was with the random number generator that determined which weapon a player would get when they’d hit an item box. You knew it was Monday when that damn thing gave one player one red shell after another while giving the other player nothing but bananas. We were wondering how such an obviously buggy piece of code made it into such a high profile game.
Except that Mario Kart’s RNG probably wasn’t buggy, at least not from a technical perspective. Continue reading »
The Objective-C/cocos2d ports of Drifts are our first foray into the world of iOS. They were originally released earlier this year (back in March). As this is our first iOS production, we were interested in learning what kind of measures produce what kind of effect on our sales, even more than making the biggest impact at launch.
So we tried doing different things at different times, things like adding Twitter and Facebook functionality (which so far has done nothing for us), experimenting with pricing (lesson: making your game free for a day brings you a pretty huge amount of downloads, as various websites automatically pick up on the price change; this can be repeated several times with good results) or contacting various review sites (not doing that before or at launch was probably our biggest mistake).
A couple of weeks ago, we finally released the lite versions for the game, and there are a few things in the downloads and sales data that surprised me and that I want to share with you:
This is the graph for the first few days the lite versions were out. The orange bars show downloads of “Drifts Lite“ and “Drifts HD Lite”, the blue bars show sales for “Drifts” and “Drifts HD” (which at the time were priced at tier 1 and tier 2, i.e. 0.79€ and 1.59€ respectively). Note that the blue bars are shown at a magnification of approximately 10000%.
Last week we took a look at how to create metaballs in Flash, now it’s time for another all-time classic: the specular bloom effect.
In the real world, blooming occurs because even a perfect lens can’t focus perfectly, causing adjacent parts of an image to bleed together. At normal light levels, this effect is too subtle to be noticeable. However, if a light source in the image is much brighter than the rest, the bright parts will bleed across the source’s edges, causing the familiar glow that’s seen in so many games throughout the last decade.
A common way of doing bloom is as follows:
Take the input image and create a thresholded version of it, setting pixels below a specific threshold to black. Then blur the result and add it to the original image (using ADD or SCREEN as the blend mode).
This approach is fast and works well for many applications, but it does have one drawback: There is a very noticeable cut off point, where a light source starts to glow.
In this tutorial, I’ll go over an easy technique to achieve a metaball style effect in Flash/AS3. The intended audience of this text are developers with an intermediate background in Actionscript, but the general procedure is very easy to understand and applicable to any other language/API that lets you perform image filtering (such as blurring and thresholding) on Bitmaps in real time.
First things first, here’s the basic effect in action. We’ll discuss ways of making it more fancy in a bit. Place the mouse over the swf to see it in motion:
I’ve been meaning to start a developer blog for a while now. I’ve learned so many things from people who just take some time out of their day to write articles and how-tos about things they’ve learned or things that excite or interest them, and I want to participate in that culture. I hope someone will get something out of it.
Expect posts to be infrequent – maybe bi-weekly or so – but hopefully worthwhile. I see this more as a place for longer articles and tutorials than short status updates (for those, feel free to follow me on Twitter).
About
I'm a Vienna-based media designer and developer. I co-founded bobblebrook, a small & cozy casual game studio (you should hire us!).
I like to write about interactive media, games and code and how they mingle.
You can e-mail me at:
mail at philippseifried dot comArchives
- May 2012 (3)
- March 2012 (1)
- February 2012 (1)
- December 2011 (1)
- November 2011 (1)
- October 2011 (3)
- September 2011 (2)
- August 2011 (2)
- July 2011 (3)
Categories
- Apps (1)
- Articles (16)
- AS3 (6)
- Audio (5)
- Business (5)
- Game Design (1)
- General Programming (1)
- Graphic Effects (3)
- iOS (6)
- Processing (1)
- Tutorials (9)
- Toys (1)
- Uncategorized (1)









