Author Archives: Hoffman

Dynamic 2D Water Effects

August 14th, 2012 | Posted by Hoffman in Programming - (0 Comments)

I wrote a tutorial over at about an easy way to make dynamic 2D water.  Here’s a video of what it looks like:

You can read the full tutorial here.  The code uses XNA.… Continue reading

Particle Text in XNA and JavaScript

June 21st, 2012 | Posted by Hoffman in Programming - (7 Comments)

Download the full XNA source.

View the JavaScript demo.

This is an easy to implement, cool little effect.  We’re going to use particle effects to form text as shown in the video below.  You can use it to spice up a menu screen or credits.

I recommend watching the videos in HD since the particles are very small and get blurred a lot on lower resolutions.

The basic technique is the same in both XNA and JavaScript.  We draw some text to a render target or canvas and read back its pixels. … Continue reading

2D Metaballs in XNA

June 5th, 2012 | Posted by Hoffman in Programming - (10 Comments)

Download the full source.

Metaballs are organic-looking balls that deform as they merge or split, as shown in the picture below.  It’s a neat little effect, often used to render liquids or gels.  This is a tutorial on how to produce 2D metaballs in XNA.  As a bonus, the code requires no custom shaders, and therefore works equally well on Windows Phone, Xbox, and PC.

To produce metaballs, you create a function, f(x, y), that becomes smaller as you get further from the metaball. … Continue reading