Over the last couple years I’ve been impulsively filming a lot of little things I find interesting, but then never doing anything with the footage. So I’ve started a Youtube channel that will be just those pretty little instants: videos mostly less than a minute long, sometimes silent, sometimes with natural audio, sometimes with my own soundtrack added.

I’m not sure how long I’ll keep this up, but I do have a huge archive of this stuff to draw from, so I can probably keep it going for a while even if I don’t film anything new.

Feel free to subscribe, especially if you’re into shallow focus and brevity…

ephemera / moments


I’ve felt three of them in my lifetime. First, the 2011 Virginia earthquake: I had just returned from a summer in Korea and was staying with my family in the Maryland suburbs. My grandmother and I were the only ones home when the ground started shaking; it felt just like a passing train, so I didn’t really take note of it at first, until I remembered that there weren’t actually any train tracks nearby. I stumbled down the hall and asked my grandmother (in Croatian)–“is this an earthquake?” She nodded, not the least bit concerned–she’d been through many quakes in her long life and knew when to worry.

And then, last year, I was in Hiroshima on vacation when the 2016 Kyushu Earthquakes struck, waking me up two nights in a row in my hotel: first the largest foreshock, and then the 7.0 main quake, which to my inexperienced self felt massive (much bigger than the Virginia quake), but which still was weak enough where I was, more than a hundred miles away, to not do any damage.

(Nearer the epicenter, it was a different story, of course–damage in the Kumamoto area was fairly extensive, but Hiroshima was as close as I got.)

A few days later, I saw a solitary, elderly European tourist at Haneda Airport, carrying a gift bag from Kumamoto Castle. He must have had an unexpectedly interesting vacation.

The entire experience rendered the rest of my trip–stops in Yokohama and then Taipei–a little surreal; all the lost sleep left me in a near-fugue state. I need to get back to Taipei some day, in a better state of mind: I hardly remember what I did for my three days there.

I don’t have any particular motive for writing about this now, to be honest. I just couldn’t sleep last night, and the occasional rumble of passing trucks brought back memories.

Faded Rainbow Desktop

Just thought I’d share this desktop background I made. It started life as a long-exposure photo of the light sculpture in front of the Shaw Library here in DC. Some color manipulation, various blurs, grain, and dust/scratches led to this slightly worn, faded-looking rainbow (click for full size, 3440×1440).

Marija Tresnjak

My grandmother passed away yesterday, peacefully in her sleep. She spent the last few days of her life surrounded by her family and friends. A doctor once told her she’d never live past age 45; she lived to 88.

She saw a lot in those 88 years. She grew up on a barge on the Danube–born, by her own account, at a Romani village by the shore because her parents couldn’t make it to a hospital. As a young woman, fearless, she took up skydiving at a time when it was a brand new idea. She survived the horrors of the second world war, worked with the Yugoslav Partisans, and shared her first kiss with a Jewish stowaway her family smuggled to safety. Her beloved older brother fought with the Partisans, and survived the war only to be shot by his best friend in a dispute over a girl.

When her daughter married an American diplomat and moved to the United States, she and her son followed not long after; they were a tight-knit little family and couldn’t bear to be apart. With her lack of English she had trouble finding work here, so instead she helped raise me and my sister. I always told my friends she was more like a third parent to me than a grandparent.

Of all the people in my family, she was the one who always understood me the best–and the amazing thing is that every single one of us can probably say that. She was not only a grandparent to me, but also often a surrogate grandparent to my friends; she was endlessly generous with her patience, her kindness, and her (usually mischievous) sense of humor.

She was always trying to convince me to be healthier (while, in true Slavic grandmother style, also offering me enormous amounts of food at every opportunity). The next-to-last thing she said to me, lying on her deathbed, was: “You’re so beautiful. I love you so much. Have you lost weight?” She repeated it about ten times.

In the last few years, as her health declined, I’d often sit by her bedside showing her the latest pictures from space, and telling her about stars and exoplanets and black holes and distant galaxes. She never had much interest in science fiction, but was utterly fascinated by science fact. The very last time she spoke to me, she asked me–struggling to get each word out–whether their were any new pictures from Ceres. Curious to the very end.

Yesterday, the Supreme Court ruling came down making same-sex marriage the law of the land. My mother and uncle joyously told her. We don’t know if she heard, but if she did it would have made her incredibly happy. Just a couple hours later, she passed, according to my mother with a “not bad” expression on her face. She was wearing my rainbow bracelet from Pride.

She adamantly didn’t believe in God, but she often said she believed in reincarnation–although she always said so with such a mischievous twinkle in her eye that I’m still not sure whether she was just messing with me or not. If there’s a heaven, I’m sure she’s there now; if reincarnation is real, I’m sure she’s being born again as something totally amazing as we speak. Regardless, she lives on with all of us.

She was the best person I’ve ever known. Let’s all try to be a little better in her memory: a little kinder, a little braver, a little more generous and patient.


I’ll Be Right There

This passage from Kyung-sook Shin’s novel I’ll Be Right There has got me reflecting on my own life today; I’ve had these thoughts so many times over the past few years. (This paragraph is from near the end of the book, although it doesn’t really spoil anything, in case you care about that sort of thing.)

“I’ll never forget what I saw that day. I think that’s why I never married. The memory has faded, but it never goes away. That’s why I am not going to tell you two to get over the things you have gone through. You should think about them and think about them and think about them some more. Think about them until you can’t think anymore. Don’t stop questioning the unjust and puzzling. Maybe if I had gotten there by the date written in her letter, I could have saved her. But then again, maybe her death was already planned, and all she wanted was for me to find her. Human beings are imperfect. We are complicated, indefinable by any wise saying or moral. The guilt, wondering what I’d done wrong, will follow me my whole life like my own shadow. The more you love someone, the stronger that feeling is. But if we cannot despair over the things we’ve lost, then what does it all mean?”

 (Adding to the odd feelings, I and the person this reminded me of had both read Shin’s other novel available in English translation–Please Look After Mom, also wonderful–shortly before her passing.)

Game Jam Framework

Over the past year or so I’ve done several game jams and really enjoyed it; I’ve based each of the games on a simple set of C++ library code I’ve been working on. I’ve kept intending to switch to Unity, but it never ends up happening; truth be told, although I can get a lot more done with Unity, I just have a lot more fun working in plain C++ with my own systems, and each accomplishment just feels so much more earned when I’ve done it more or less from scratch.

To that end, I’ve been working a bit on improving the framework code (‘engine’ is far too generous a word) that I’ve been using for the jams and for other hobby projects, including the GPU Game of Life and Pacman parody projects I’ve posted here, as well as all of my Ludum Dare and Indie Speedrun entries so far.

I’ll post about my progress here occasionally as I work on it. It’s not likely to be hugely interesting–more just a chance to get some thoughts down as I’m working on it. This first post is a summary of what I’ve got so far. Be ye fairly warned: much boring nerdery lies ahead–

My guiding principle in working on this has been to make it as simple and pleasurable as possible for me to write small-to-medium-sized projects; much of what I’ve done has been focused on that goal. There are a lot of things I’ve done that are tremendously inefficient. Some of them I intend to optimize, but others I’ll likely leave as-is for maximum flexibility. After all, the projects I’m creating with this aren’t going to be tremendously complex. Performance is a minimal concern, while ease of development is crucial.

A few of the more notable features:

  • A resource loader front end inspired by XNA’s that’s designed to make it as easy as possible to load resources. The implementation is internally clunky, but the interface makes loading resources into a handle (including reference counting, avoiding duplicate loads, support for resource load parameters like shader macros, etc.) as simple as this:
    auto example_tex = resource::load<texture*>( "textures/", optional_parameter_blob );
  • Basic 3D support, including a model loader built on top of the Open Asset Import Library, and a basic forward renderer with ambient, point, and directional lights (currently using Mikkelsen’s Torrance-Sparrow implementation).
  • A fast sprite renderer, using texture arrays and structured buffer instancing to blast potentially thousands of sprites onto a frame at high framerates. It’s in the early stages and is missing a lot of functionality, but it’s already really fast. (I know I mentioned I don’t care much about performance, but this is a situation where I thought being able to draw truly extreme numbers of sprites at once could be interesting for a jam. Plus, it was just fun to write.)
  • A basic input wrapper to make reading single keystrokes, held buttons, and mouse movement easy.
  • Simple FMOD wrapper (sound playback, streaming music).
  • A math library wrapping DirectXMath (the XM* functions) in easy-to-use classes (with operating overloading where natural).

A lof of the above still needs some work, and there are some major features on the todo list:

  • Gamepad support using XInput.
  • An input mapping system to map raw keyboard/mouse/gamepad input to in-game actions more naturally.
  • A tiled deferred renderer (ported from another hobby project I did in 2012).
  • Eventually, hopefully integration with Box2D for 2D physics and PhysX for 3D physics.
  • Screen space effect chain (at least HDR/tonemapping/bloom, motion blur, depth-of-field, color grading).
  • Some kind of basic animation support–at least rigid-body animation to start.

My mercurial repository for the engine code is public: I’ll continue to update it as I add new features. It’s missing the front-end code you need to actually compile/run; I’ll make that repo public as well once it’s a little prettier.


Week 9: GPU Game of Life


For my ninth weekly project, I’ve created…life!

Although it was originally computed by hand, Conway’s Game of Life has been implemented as software so many times over the past 44 years by so many people that I’m not sure doing my own version even counts as a creative project, but somehow throughout my decades of computer programming I’ve never built one, so I’m doing it anyway.

This particular version is implemented almost entirely on the GPU–the CPU provides the initial state and can turn more cells on to keep the game going, but otherwise all computation is done in a compute shader. (Compute shaders are kind of brilliant for this, as the Game of Life is practically the definition of an embarassingly parallel problem.)

I render live cells in red, and have dead cells fade gradually in green instead of disappearing. This makes it easier to see structures forming and vanishing. The initial condition is just created by randomly drawing pixels all over the buffer, and you can add more at any time by holding down the Enter key.

One thing I found particularly interesting is how many gliders tend to emerge from these completely random starting conditions! With the green trails behind them, they’re very visible. You also get a lot of small, stable structures as well as simple oscillators. (Phase-2 oscillators are almost impossible to see in this simulation, unfortunately, because it moves so fast it makes them look stable.)

Click here to download the program (update: added some DLLs it was missing). It’s a Win32 executable and requires a D3D11-compatible video card (anything even remotely recent should work). There’s some on-screen help-text that explains some other controls you can use.