Santa vs Cthulhu until 7 am

I’ve been avoiding doing any kind of work recently in an attempt to reset my creative batteries. I’ve mostly been playing Zelda. Then I played Hyper Princess Pitch and started playing around with the idea of making a Christmas game myself. Naturally, I started with the title. Santa vs Cthulhu.

The original idea was to make a real time strategy game where you play as either Santa or Cthulhu, building elves and manics, converting houses for your purpose (cheer or ia). But it was hard to pick a setting for it. Santa obviously lives on the north pole, but there aren’t many houses there, and there certainly aren’t any deep oceans for any Ancient Ones to awaken from.

I gave up on the idea, until last night. I got this idea that using the Geoscape from x-com would better fit the scope. Santa would start with a base on the north pole, Cthulhu would start somewhere in the south pacific. They’d both spend time improving their base and recruiting cities. Combat would take place in the RTS game I initially imagined. I got excited about the idea, as it would allow me to make fun of/pay tribute to two games I really loved growing up, UFO: Enemy Unknown and Dune 2. Sadly, the game seemed a bit too complex for me to make in time for Christmas, so I abandoned the idea.

But what if I ditched the RTS bit? Just focus on base building and sending out scouting parties to look for Cthulian infestation or to cheer up a nearby city? Combat would be resolved automatically with a brief combat summary, perhaps. Yes, this seemed like a much more feasible game, and it’d be much more focused as well.

This ended up with me programming the entire night. I found an old textured polygon software renderer I had written a few years ago and rescued it from its project. It ran pretty fast, had support for arbitrary polygons for some reason, and even did z clipping with perspective correct texture mapping. For the planet, I started out with an icosahedron and used the net suggested on the wiki article as the texture map. I subdivided all faces and re-normalized the vertices a few times to make it look a bit rounder, then I found a map of the earth folded out into the same net and traced it into my own format. There are copyright issues with this approach, as tracing something really isn’t original work. I’m not sure how else to get a map that looks familiar..

At about 6 am or so, I had a spinning globe, fully textured, running at some 1000 fps.

I’m pretty sure I won’t actually be able to make this game in time for christmas (Ludum Dare this upcoming weekend will take up a lot of the remaining time, and I definitely want to do that), but I had a great night of programming last night. I really missed being able to dig myself deep into some obscure programming challenge and spend the entire night working on it.

Besides, if doing the game quickly was my primary motivator, I wouldn’t have gone for the fancy polygonal approach. I just would’ve written a simple screen coordinate -> spherical coordinate lookup table thing that maps each pixel to a position on the globe (or to nothing, if it’s outside the globe).

posted 12 years ago