plasma effect for the iPhone and iPod touch

my first iphone app has made it's way to the app store! just search for "plasma effect" to find it in the store (or click here to open in itunes directly) and download it for free! the app is a modern implementation of the old school demoscene plasma effect. while running you can touch the screen to interact with the plasma and shake the iphone to switch color palettes and plasma shapes.

i used x-code to develop it and did the implementation almost entirely in C. i dipped into the objective-C code only to plumb through the touch and accelerometer values. while i'm sure objective-C is quite nice once you get used to it i just really had no desire to teach my brain to parse it's wacky notation. here's the simple api between the obj-c code and the plasma effect:
void EffectCreate ();
void EffectDestroy ();
void EffectRender (float time, float accelX, float accelY, float accelZ);
void EffectShake ();
void EffectTouchBegin (float x, float y);
void EffectTouch (float x, float y);
void EffectTouchEnd ();

the effect itself works by adding three layers of waves (recomputed only when you launch or shake) and looking the wrapped result up in a 256 entry color table. the top layer has perturbed radial waves that come out around where you touch with your finger. to smooth out some of the artifacts from the low precision waves i blend a bit with the previous frame. the plasma is all done on the iphone's cpu then rendered on a single quad to the screen using open gl es.

making it was quite fun and interesting since i haven't hobby coded for an apple platform in 19 years! and wow have they come a long way since the apple IIgs! ;) if you have an iphone or ipod touch give it a try! i'm hoping to see more fun demoscene content on this cool platform. :)

IMG_0060 IMG_0057 IMG_0059

halo wars

recently i've been playing a lot of halo wars on the 360. it's easily my favorite console rts to date - oh and before you explode screaming about how rts games should only be played with keyboards and mice let me just say console rts games have their place in this world too okay?! :)

so anyhow unlike with most rts games i actually played all the way through the single player campaign of the game. it was pretty short having just 15 levels taking something like 15-30 minutes a piece and joined together with some really nice pre-rendered cinematics. the story might have been a bit forgetable because i've forgotten it but i don't have much of a memory for that stuff anyway. :) the campaign did do a decent job of preparing me for the competitive multiplayer which is the party i care most about in rts games.

there are a bunch of characteristics to the game that are interesting to me. one is that you're very limited in your ability to build structures. your base has a small number of slots where you can build things and you need to upgrade your base or set up expansions to get more. another is that as in age of mythology you get god powers based on the race and commander you choose and when used well these can really turn the tides in a battle. one more bit i really enjoy is that as the humans you get up to three of these little master chief looking dudes who can hop in vehicles to really boost their attack and durability or just run around on their own as hero units.

okay well there you have my super mini review of halo wars. if you're fortunate enough to own a 360, go pick up a copy and help me crush some noobs!!

halo_wars.jpg

seattle area demoscene meetup

this weekend basement digital came up from oregon so we organized a quick demoscene meet up for the area. andr00, guybrush, kirill, and ryiinn also made it out for a fun evening of demo viewings, chatting, food, retro games and movies. we all also got some cool previews of the processing workshop guybrush will be doing at blockparty and i got basement digital up to speed on my latest tools and such for 4k audio so maybe we can collaborate on a 4k prod sometime.

altogether it was quite fun! thanks to all for the fun night and go panamerican demoscene! :)

blockparty 2009 invitation released!

gloom, kirill, and i have released our invitation demo to blockparty 2009! you can visit pouet.net to comment on the demo or watch it online at vimeo or capped.tv. hope you enjoy it!

blockparty 2009 invite from blackpawn on Vimeo.

quick maya curves export script

i needed a quick script tonight to export a slew of curves outta maya and google failed me so now that i’ve hacked a quick script for it i figure i’ll post it for future lazy coders :) here you go - a simple python script to export curves from maya ;)

from maya.cmds import *
import maya.OpenMaya as OpenMaya
def findNode (name):
    selectionList = OpenMaya.MSelectionList()
    selectionList.add(name)
    node = OpenMaya.MObject()
    selectionList.getDependNode(0, node)
    return node
f = open("c:/curves.xml", "w")
f.write("<curves>\n")
curveNames = ls(type='nurbsCurve')
for i in xrange(len(curveNames)):
    f.write("    <curve>\n")
    curveFn = OpenMaya.MFnNurbsCurve(findNode(curveNames[i]))
    points = OpenMaya.MPointArray()
    curveFn.getCVs(points)
    for j in xrange(points.length()):
        pos = points[j]
        f.write("   
<point value=\"(%g,%g,%g)\" />\n" % (pos.x, pos.y, pos.z))
    f.write("    </curve>\n")
f.write("</curves>\n")
f.close()