<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Omnisaurus Games</title>
	<atom:link href="http://omnisaurusgames.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://omnisaurusgames.com</link>
	<description>Hatched from an egg with a controller in hand</description>
	<lastBuildDate>Wed, 14 Sep 2011 16:44:06 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>September Build</title>
		<link>http://omnisaurusgames.com/2011/09/september-build/</link>
		<comments>http://omnisaurusgames.com/2011/09/september-build/#comments</comments>
		<pubDate>Wed, 14 Sep 2011 16:12:36 +0000</pubDate>
		<dc:creator>Kevin</dc:creator>
				<category><![CDATA[Builds]]></category>

		<guid isPermaLink="false">http://omnisaurusgames.com/?p=102</guid>
		<description><![CDATA[Here&#8217;s the build for september. (Click the cat to play! Left and right steer, Up boosts) I&#8217;ve been spending a lot of time figuring out Unity&#8217;s GUI system works. Unity uses an immediate mode GUI, which is rare &#8211; all of the GUIs that I&#8217;ve built or used in the past have been very heavily [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s the build for september. (Click the cat to play! Left and right steer, Up boosts)</p>
<p><a href="http://omnisaurusgames.com/builds/Build6.html"><img class="aligncenter" title="RocketCat_Stage2" src="http://omnisaurusgames.com/wp-content/uploads/2011/06/RocketCat_Stage2-300x300.jpg" alt="" width="300" height="300" /></a></p>
<p>I&#8217;ve been spending a lot of time figuring out Unity&#8217;s GUI system works. Unity uses an immediate mode GUI, which is rare &#8211; all of the GUIs that I&#8217;ve built or used in the past have been very heavily object oriented.</p>
<p>Gord&#8217;s been working on. . . well. . . all of the art for the game. Seriously, we even have <em>character animation</em> now <img src='http://omnisaurusgames.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>The music in the front end it by my friend <a href="http://lifeoutthewindow.com/">Matt Reimer</a>, who is an local musician, web guru, and all-around awesome guy.</p>
<p>The level design in this build is only placeholder. We&#8217;ve been trying to get the boring parts of the game done first.</p>
<p><a href="http://omnisaurusgames.com/builds/Build6.html"><br />
</a></p>
]]></content:encoded>
			<wfw:commentRss>http://omnisaurusgames.com/2011/09/september-build/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>At long last. . . a build!</title>
		<link>http://omnisaurusgames.com/2011/08/at-long-last-a-build/</link>
		<comments>http://omnisaurusgames.com/2011/08/at-long-last-a-build/#comments</comments>
		<pubDate>Thu, 11 Aug 2011 16:16:28 +0000</pubDate>
		<dc:creator>Kevin</dc:creator>
				<category><![CDATA[Builds]]></category>

		<guid isPermaLink="false">http://omnisaurusgames.com/?p=93</guid>
		<description><![CDATA[Gord and I have been busy working away during this past long month of silence. Here is the result: Press up to launch and to boost, and left and right to steer. We got this to run on an actual iDevice yesterday with tilt steering controls. Despite the inherent Apple weirdness with Provisioning profiles and [...]]]></description>
			<content:encoded><![CDATA[<p>Gord and I have been busy working away during this past long month of silence. Here is the result:</p>
<p><a href="http://omnisaurusgames.com/builds/Build5.html"><img class="alignnone size-full wp-image-97" title="title" src="http://omnisaurusgames.com/wp-content/uploads/2011/08/title.jpg" alt="" width="500" height="800" /></a></p>
<p>Press up to launch and to boost, and left and right to steer. We got this to run on an actual iDevice yesterday with tilt steering controls. Despite the inherent Apple weirdness with Provisioning profiles and such it went very smoothly.</p>
]]></content:encoded>
			<wfw:commentRss>http://omnisaurusgames.com/2011/08/at-long-last-a-build/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>State of the Cat</title>
		<link>http://omnisaurusgames.com/2011/07/state-of-the-cat/</link>
		<comments>http://omnisaurusgames.com/2011/07/state-of-the-cat/#comments</comments>
		<pubDate>Tue, 05 Jul 2011 06:04:52 +0000</pubDate>
		<dc:creator>Kevin</dc:creator>
				<category><![CDATA[Design]]></category>

		<guid isPermaLink="false">http://omnisaurusgames.com/?p=87</guid>
		<description><![CDATA[All of the games that I&#8217;ve worked on at my day jobs have been animation intensive, so I have a very animation-focused vision of gameplay. For me, animation and character control are inextricably linked, and it&#8217;s often useful to consider them to be almost the same thing. When I&#8217;m designing the behaviour of a user-controlled [...]]]></description>
			<content:encoded><![CDATA[<p>All of the games that I&#8217;ve worked on at my day jobs have been animation intensive, so I have a very animation-focused vision of gameplay. For me, animation and character control are inextricably linked, and it&#8217;s often useful to consider them to be almost the same thing.</p>
<p>When I&#8217;m designing the behaviour of a user-controlled avatar, I start by drawing a graph of the animation states and transitions that I think it will need. This diagram is always incomplete &#8211; extra states and transitions are inevitable &#8211; but it is an important way to visualize the initial scope of the character. It&#8217;s also a good way to communicate with your animator, because it very clearly illustrates the key poses that every state needs to start and end with.</p>
<p>Here&#8217;s my initial state graph for our Rocket Cat character:</p>
<p><a href="http://omnisaurusgames.com/wp-content/uploads/2011/07/IMG_20110627_1606302.jpg"><img class="alignnone size-full wp-image-90" title="Rocket Cat State Chart" src="http://omnisaurusgames.com/wp-content/uploads/2011/07/IMG_20110627_1606302.jpg" alt="Lots of little boxes!" width="700" height="525" /></a></p>
<p>As you can see, there are two major looping idle states &#8211; one for flying upwards and one for falling. Each of these states has transitions into looping left and right translation states, as well as a player-directed speed change state. Each idle state also has a hit response. The general flow of the graph during a play session is from top left to bottom right. The cat starts on the ground, and then launches into the flying loop. Upon reaching the end of a course, the cat transitions through the &#8220;lose rocket&#8221; state and into the falling loop, where it stays until it lands.</p>
<p>Given this chart, Gord will now produce animation frames for all of the states. On a larger game, I would usually set up a data-driven state graph execution system. Given a flexible enough state and transition description language (or GUI tool) designers and animators can usually add most of a game&#8217;s animation themselves. The scope of this particular game is small enough, however, that I&#8217;ll probably just implement the states directly in code.</p>
<p>I&#8217;m excited about the next step in our development! We&#8217;ll be sure to post an interactive demo of the cat&#8217;s motion, as well as the code for playing sprite animations once I&#8217;ve got it all working.</p>
]]></content:encoded>
			<wfw:commentRss>http://omnisaurusgames.com/2011/07/state-of-the-cat/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rocket Cat Evolution</title>
		<link>http://omnisaurusgames.com/2011/06/rocket-cat-evolution/</link>
		<comments>http://omnisaurusgames.com/2011/06/rocket-cat-evolution/#comments</comments>
		<pubDate>Sat, 25 Jun 2011 21:33:10 +0000</pubDate>
		<dc:creator>Gord</dc:creator>
				<category><![CDATA[Art]]></category>
		<category><![CDATA[art]]></category>
		<category><![CDATA[concepts]]></category>
		<category><![CDATA[Rocket Cat]]></category>

		<guid isPermaLink="false">http://omnisaurusgames.com/?p=69</guid>
		<description><![CDATA[Here are the first concepts of our new hero, Rocket Cat! The idea behind these images, and behind the level progression, is that the cat scientists develop bigger and better rockets to get closer and closer to the moon. We thought it would be cool to reflect this in the art, so that when you [...]]]></description>
			<content:encoded><![CDATA[<p>Here are the first concepts of our new hero, Rocket Cat!  The idea behind these images, and behind the level progression, is that the cat scientists develop bigger and better rockets to get closer and closer to the moon.  We thought it would be cool to reflect this in the art, so that when you reach a new level, you get new gear.<br />

<a href='http://omnisaurusgames.com/2011/06/rocket-cat-evolution/rocketcat_stage1/' title='RocketCat_Stage1'><img width="150" height="150" src="http://omnisaurusgames.com/wp-content/uploads/2011/06/RocketCat_Stage1-150x150.jpg" class="attachment-thumbnail" alt="RocketCat_Stage1" title="RocketCat_Stage1" /></a>
<a href='http://omnisaurusgames.com/2011/06/rocket-cat-evolution/rocketcat_stage2/' title='RocketCat_Stage2'><img width="150" height="150" src="http://omnisaurusgames.com/wp-content/uploads/2011/06/RocketCat_Stage2-150x150.jpg" class="attachment-thumbnail" alt="RocketCat_Stage2" title="RocketCat_Stage2" /></a>
<a href='http://omnisaurusgames.com/2011/06/rocket-cat-evolution/rocketcat_stage3/' title='RocketCat_Stage3'><img width="150" height="150" src="http://omnisaurusgames.com/wp-content/uploads/2011/06/RocketCat_Stage3-150x150.jpg" class="attachment-thumbnail" alt="RocketCat_Stage3" title="RocketCat_Stage3" /></a>
<a href='http://omnisaurusgames.com/2011/06/rocket-cat-evolution/rocketcat_stage4/' title='RocketCat_Stage4'><img width="150" height="150" src="http://omnisaurusgames.com/wp-content/uploads/2011/06/RocketCat_Stage4-150x150.jpg" class="attachment-thumbnail" alt="RocketCat_Stage4" title="RocketCat_Stage4" /></a>
</p>
]]></content:encoded>
			<wfw:commentRss>http://omnisaurusgames.com/2011/06/rocket-cat-evolution/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Texture Atlas Generation Using Python</title>
		<link>http://omnisaurusgames.com/2011/06/texture-atlas-generation-using-python/</link>
		<comments>http://omnisaurusgames.com/2011/06/texture-atlas-generation-using-python/#comments</comments>
		<pubDate>Sat, 04 Jun 2011 07:07:23 +0000</pubDate>
		<dc:creator>Kevin</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://omnisaurusgames.com/?p=73</guid>
		<description><![CDATA[It&#8217;s often quite useful to pack multiple textures into one image &#8211; this can help to improve rendering performance by reducing the number of texture changes needed to draw a scene, or to more efficiently use space on systems that require power-of-two-sized textures. I need atlasing for sprite the animation system that I&#8217;m working on [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s often quite useful to pack multiple textures into one image &#8211; this can help to improve rendering performance by reducing the number of texture changes needed to draw a scene, or to more efficiently use space on systems that require power-of-two-sized textures.</p>
<p>I need atlasing for sprite the animation system that I&#8217;m working on for our Unity game. Here it is as a self-contained Python script because Python is awesome! It was inspired by the method used in <a href="http://pygame.org/wiki/ImagePacker">this script</a> over at the pygame site, but has a couple of extra features that you might find useful:</p>
<pre class="brush:py">import Image
import sys
import optparse
import glob

def Atlas(filenames, outname, size):

    #open all of the images
    ims = [(f, Image.open(f)) for f in filenames]

    #sort by image area
    ims = sorted(ims, key = lambda im : im[1].size[0]*im[1].size[1], reverse=True)

    #Free boxes are empty space in our output image set
    #the freebox tuple format is: outidx, x, y, w, h
    freeboxes = [(0, 0, 0, size, size)]
    numoutimages = 1

    #Full boxes are areas where we have placed images in the atlas
    #the full box tuple format is: image, outidx, x, y, w, h, filename
    fullboxes = []

    #Do the actual atlasing by sticking the largest images we can have into the smallest valid free boxes
    for imageinfo in ims:
        im = imageinfo[1]
        if im.size[0] &gt; size or im.size[1] &gt; size:
            print "Error: image " + imageinfo[0] + " is larger than the atlas size!"
            sys.exit(2)

        inserted = False;

        while not inserted:
            for idx, fb in enumerate(freeboxes):
                #find the smallest free box that will contain this image
                if fb[3] &gt;= im.size[0] and fb[4] &gt;= im.size[1]:
                    #we found a valid spot! Remove the current freebox, and split the leftover space into (up to) two new freeboxes
                    del freeboxes[idx]
                    if fb[3] &gt; im.size[0]:
                        freeboxes.append( (fb[0], fb[1]+im.size[0], fb[2], fb[3]-im.size[0], im.size[1]) )

                    if fb[4] &gt; im.size[1]:
                        freeboxes.append( (fb[0], fb[1], fb[2]+im.size[1], fb[3], fb[4] - im.size[1]) )

                    # keep this sorted!
                    freeboxes = sorted(freeboxes, key = lambda fb : fb[3]*fb[4])
                    fullboxes.append( (im, fb[0], fb[1], fb[2], im.size[0], im.size[1], imageinfo[0]))
                    inserted = True
                    break;
            if not inserted:
                #oh crap - there isn't room in any of our free boxes, so we have to add a new output image
                freeboxes.append((numoutimages, 0, 0, size, size))
                numoutimages += 1

    #now that we've figured out where everything goes, make the output images and blit the source images to the approriate locations
    outimages = [Image.new("RGBA", (int(size),int(size))) for i in range(0,int(numoutimages))]
    for fb in fullboxes:
        outimages[fb[1]].paste(fb[0], (fb[2], fb[3]))        

    #save the output images
    for idx, outimage in enumerate(outimages):
        outimage.save(outname + "-" + str(idx) + ".png")

    #write out an xml file that says where everything ended up
    xmlfile = open(outname + ".xml", "w")
    xmlfile.write("&lt;images&gt;\n")

    for fb in fullboxes:
        xmlfile.write('\t&lt;image name="{0}" file="{1}-{2}.png" x="{3}" y ="{4}" w="{5}" h="{6}" /&gt;\n'.format(fb[6],outname, fb[1], fb[2], fb[3], fb[4], fb[5] )) 

    xmlfile.write("&lt;/images&gt;\n")
    print ("It all fit into " + str(numoutimages) + " images!")

def main(argv):
    parser = optparse.OptionParser(description='Combine multiple image files into a texture atlas')
    parser.add_option('-s', '--size', help="atlas size (length and width)", dest="size", default=512, type=float)
    parser.add_option('-o', '--output', help="output name", dest="output", default="atlas", type='string')
    (options, arguments) = parser.parse_args()

    if (len(arguments) == 0):
        print "Input file(s) not specified"
        sys.exit(2)

    infiles = []
    for f in arguments:
        infiles.extend(glob.glob(f))
    infiles = list(set(infiles))        

    print "Atlasing " + str(len(infiles)) + " files:"
    Atlas(infiles, options.output, options.size)

if __name__ == "__main__":
    main(sys.argv[1:])</pre>
<p>The script takes a collection of images as input, and outputs one (or more) images of a specified square size that contain the input images packed (more or less) tightly. It also spits out an xml file describing the location of all of the subtextures, so that a client program can find them.</p>
<p>The next tech post will bring together this script and the previous timmer/obj maker to create a series of atlases containing the trimmed frames for a series of animations. We&#8217;ll have a proper image pipeline yet!</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://omnisaurusgames.com/2011/06/texture-atlas-generation-using-python/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Level Art History</title>
		<link>http://omnisaurusgames.com/2011/06/level-art-history/</link>
		<comments>http://omnisaurusgames.com/2011/06/level-art-history/#comments</comments>
		<pubDate>Wed, 01 Jun 2011 05:20:09 +0000</pubDate>
		<dc:creator>Gord</dc:creator>
				<category><![CDATA[Art]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[Art Direction Cartoon 3D Renders]]></category>

		<guid isPermaLink="false">http://omnisaurusgames.com/?p=42</guid>
		<description><![CDATA[Our poor pinball pirate cat not only has a varied history in terms of game design, but in art style too. I&#8217;m a huge fan of grey blocking assets until the gameplay feels good, then doing an art pass over the existing grey blocked assets. This is something that in my opinion isn&#8217;t done enough [...]]]></description>
			<content:encoded><![CDATA[<p>Our poor pinball pirate cat not only has a varied history in terms of game design, but in art style too.  I&#8217;m a huge fan of grey blocking assets until the gameplay feels good, then doing an art pass over the existing grey blocked assets.  This is something that in my opinion isn&#8217;t done enough in the game industry, and costs pointless iterations and wasted time.  Our initial prototyping was just that, simple colored squares and circles that allowed us to set up our initial test bed.  Soon after though, I gave into the urge to get some art in there, after all, I&#8217;m an artist, it&#8217;s what I do!  So the question was, what should our fearless kitties and their world look like?</p>
<p><a href="http://omnisaurusgames.com/wp-content/uploads/2011/05/piratecatassets.jpg"><img class="aligncenter size-full wp-image-66" title="Old Cartoony Style Assets" src="http://omnisaurusgames.com/wp-content/uploads/2011/05/piratecatassets.jpg" alt="" width="590" height="341" /></a></p>
<p>I was unsure what style to go with in the beginning, so I defaulted to the cartoony style that is so prevalent in iPhone games.  It had a bit of charm, and hopefully mass appeal, but was nothing special.  We had made up our minds that we would be using sprites, so that was definitely a limiting factor.  After much though and many sketches, I realized that my specialty is 3D art, and in the end I decided to play to my strengths.  Rendered out sprites of 3D assets ala Donkey Kong Country style is what I&#8217;ve decided to go with in the end. Below is the first pass on what is to be the new art style for our rocket cat world.  It&#8217;s the platform they&#8217;ll launch from, and hopefully land on, on their way back down.</p>
<p><a href="http://omnisaurusgames.com/wp-content/uploads/2011/05/thelaunchpad.jpg"><img class="aligncenter size-full wp-image-67" title="TheLaunchPad" src="http://omnisaurusgames.com/wp-content/uploads/2011/05/thelaunchpad.jpg" alt="" width="590" height="443" /></a></p>
<p>Hopefully I&#8217;ll have more to share in the coming days.  I can describe the style as backyard steam punk, after all, these are cats.  They can has limited technology, but that won&#8217;t stop them from trying to get to the moon.</p>
]]></content:encoded>
			<wfw:commentRss>http://omnisaurusgames.com/2011/06/level-art-history/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>2D Sprites in Unity3D</title>
		<link>http://omnisaurusgames.com/2011/05/2d-sprites-in-unity3d/</link>
		<comments>http://omnisaurusgames.com/2011/05/2d-sprites-in-unity3d/#comments</comments>
		<pubDate>Tue, 31 May 2011 05:12:52 +0000</pubDate>
		<dc:creator>Kevin</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://omnisaurusgames.com/?p=59</guid>
		<description><![CDATA[Unity is a great platform. You can get prototypes up and running very quickly, and you can make fancypants 3D worlds with shaders and shadows and all the trimmings. The platorm&#8217;s 2D support, however, is practically non-existant. Sure, you can pretty easily constrain your gameplay to a plane, and the included physics engine can be bent into [...]]]></description>
			<content:encoded><![CDATA[<p>Unity is a great platform. You can get prototypes up and running very quickly, and you can make fancypants 3D worlds with shaders and shadows and all the trimmings. The platorm&#8217;s 2D support, however, is practically non-existant. Sure, you can pretty easily constrain your gameplay to a plane, and the included physics engine can be bent into shape to play nice with those constraints, but in terms of asset creation, you&#8217;re left to fend for yourself.</p>
<p>So that&#8217;s what I&#8217;ve been doing. I don&#8217;t have a 3d modelling program at home &#8211; I&#8217;ve used Maya before (years ago), but it&#8217;s too expensive for this project, and would be a massive case of overkill anyway.</p>
<p>To fake a sprite in 3D, you usually texture a qua, place it on one of the canonical planes, and then use an orthographic camera to view it. This works great in Unity, but you&#8217;re still left having to specify your plane somehow. The built in plane primitive that Unity provides is tesselated into many small triangles to make per-vertex lighting look better. Most 2D games don&#8217;t use that type of lighting anyway, so we need a way to make two-poly planes of an appropriate size. When working with 2D sprites it is also handy to specify a per-image registration point. This allows you to align sprites to each other without relying upon them all being the same size, so it saves you texture memory (which can be very important if you have a lot of animation).</p>
<p>I ended up making a simple Python script for converting images to registered and scaled .obj models. I&#8217;ve only recently begun exploring Python, and it is quickly becoming my go-to pipeline language &#8211; it has a great set of libraries, and offers way more functionality per-line-of-code than more traditional languages. Anyway, here&#8217;s the script:</p>
<pre class="brush:py">import Image
import sys
import optparse

def trim(im):
    idx = 0
    width = im.size[0]
    height = im.size[1]

    top = height
    bottom = 0
    left = width
    right = 0

    x = 0
    y = 0
    for pix in im.getdata():
        if pix[3] != 0:
            if top &gt; y:
                top = y
            if bottom &lt; y:
                bottom = y
            if left &gt; x:
                left = x
            if right &lt; x:
                right = x

        x = x + 1
        if x == width:
            x = 0
            y = y +1

    box = (left, top, right, bottom)
    cropped = im.crop(box)
    cropped.load()
    return box, cropped

def main(argv):

    parser = optparse.OptionParser(description='Create an obj mesh and a cropped image from an input image file')
    parser.add_option('-s', '--scale', action="store", help="scale", dest="scale", default=1, type=float)
    parser.add_option('-o', '--output', action="store", help="outputname", dest="output", default="output", type='string')
    arguments = parser.parse_args()
    if (len(arguments[1]) != 1):
        print "Input file not specified"
        sys.exit(2)

    scale = arguments[0].scale
    outfile = arguments[0].output
    imagename = arguments[1][0]
    print "Converting image ", imagename, " to 3d billboard model ", outfile ," with scale ", scale
    im = Image.open(imagename)

    width = im.size[0]
    height = im.size[1]

    box, cropped = trim(im)
    cropped.save(outfile+"_cropped.tga")
    p0 = ( box[0] - width/2, -box[3]+height/2 )
    p1 = ( box[0] - width/2, -box[1]+height/2 )
    p2 = ( box[2] - width/2, -box[1]+height/2 )
    p3 = ( box[2] - width/2, -box[3]+height/2 )

    z = 0
    f = open(outfile + ".obj", "w")
    f.write ( 'v %(x)f %(y)f %(z)f\n'% {'x':p0[0]*scale, 'y':p0[1]*scale, 'z':z})
    f.write ( 'v %(x)f %(y)f %(z)f\n'% {'x':p1[0]*scale, 'y':p1[1]*scale, 'z':z})
    f.write ( 'v %(x)f %(y)f %(z)f\n'% {'x':p2[0]*scale, 'y':p2[1]*scale, 'z':z})
    f.write ( 'v %(x)f %(y)f %(z)f\n'% {'x':p3[0]*scale, 'y':p3[1]*scale, 'z':z})

    f.write ( 'vn 0 0 1\n')
    f.write ( 'vt 1 0\n')
    f.write ( 'vt 1 1\n')
    f.write ( 'vt 0 1\n')
    f.write ( 'vt 0 0\n')
    f.write ( 'f 1/1/1 2/2/1 3/3/1 4/4/1\n')

if __name__ == "__main__":
    main(sys.argv[1:])</pre>
<p>It takes an image as input, trims it to it&#8217;s non-transparent bounding box, and saves out the new image and an optionally scaled .obj file with the right proportions. All you have to do to use it in Unity is to drag both of the output files into your library and associate them with each other. You&#8217;ll need to install the <a href="http://www.pythonware.com/products/pil/">Python Imaging Library</a> to make it run.</p>
<p>The next step that I will be working on is a script that will take a series of images, atlas them, and export the size and timing information to an xml file so that you can play an animation in Unity.</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://omnisaurusgames.com/2011/05/2d-sprites-in-unity3d/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Our first (failed) build</title>
		<link>http://omnisaurusgames.com/2011/05/our-first-failed-build/</link>
		<comments>http://omnisaurusgames.com/2011/05/our-first-failed-build/#comments</comments>
		<pubDate>Tue, 24 May 2011 07:04:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Design]]></category>

		<guid isPermaLink="false">http://omnisaurusgames.com/?p=31</guid>
		<description><![CDATA[When you&#8217;re designing a game, you have to be ready to throw out a lot of work. Many ideas sound great on paper, but fall flat when you actually play them. We&#8217;ve been prototyping various ideas for the past couple of months, all of which have turned out less than stellar. We&#8217;re pretty sure that [...]]]></description>
			<content:encoded><![CDATA[<p>When you&#8217;re designing a game, you have to be ready to throw out a lot of work. Many ideas sound great on paper, but fall flat when you actually play them. We&#8217;ve been prototyping various ideas for the past couple of months, all of which have turned out less than stellar. We&#8217;re pretty sure that we finally have a good idea, but before we tell you about that, here&#8217;s the saga of poor Pinball Cat.</p>
<p><img class="size-full wp-image-43 aligncenter" title="pinballcat" src="http://omnisaurusgames.com/wp-content/uploads/2011/05/pinballcat.png" alt="" width="171" height="187" /></p>
<p>For our first project, we decided to try something small and simple, yet fun. Setting up a company and figuring out a new platform are hard enough without taking on a super-complicated game. Looking at what kind of games are popular on the iPhone, and at what could be made relatively easily using Unity, we settled upon trying to make a physics-based action/puzzle game. With cute animals. Admittedly, that&#8217;s not the most original formula in the world, but it&#8217;s scope-limiting enough that we&#8217;re confident that we can get it done.</p>
<p>Our original brainstorming session left us shooting pirate cats out of cannons to collect booty by bouncing around a pinball-esque playfield. After building a simple Unity prototype, however, we found that the game was too random. After selecting your angle and firing, the cat would careen around the screen unpredictably, collecting stuff of hitting hazards with no further input from the player. It was somewhat fun to watch, but it was the video game equivalent of a slot machine.</p>
<p>Further brainstorming led us to try to use the touch screen to influence the flying cat post-launch. The idea here was that you would launch the cat along some initial velocity, and he would fly up at a high speed for a while and then go ballistic. Touching the screen at any point would create a bouncy object in the game world under your finger so that you could interact with the cat&#8217;s trajectory and adjust your shots. This was a bit better, but since it was implemented using bounces, there was no way to inject further energy into the system. The cat would eventually settle at the bottom of the screen, looking forlorn.</p>
<p>Taking a final stab at the pinball idea, we traded the cannon for a jetpack, and made the jetpack engage when you touched the cat. This was better, since you could actually use some skill in directing the cat toward targets. After playing with it for a while, though, we found that it still wasn&#8217;t fun enough.  Given the relative size of the iPhone&#8217;s screen and the player&#8217;s finger, you really don&#8217;t have enough real estate to do any kind of real shot planning. We also had trouble tuning the physics &#8211; even after playing with it, it seemed too punishing and finicky. Here&#8217;s a sample (pretend that the brown thing that shows up when you click is your fingertip):</p>
<p><em>Please view the full post to see the Unity content.</em></p>
<p>&nbsp;</p>
<p>Crappy stand-in graphics, aside, that&#8217;s less than fun, isn&#8217;t it? With heavy hearts we mothballed the pinball idea, and went back to the drawing board.</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://omnisaurusgames.com/2011/05/our-first-failed-build/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Welcome!</title>
		<link>http://omnisaurusgames.com/2011/05/welcome/</link>
		<comments>http://omnisaurusgames.com/2011/05/welcome/#comments</comments>
		<pubDate>Mon, 16 May 2011 05:19:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Business]]></category>

		<guid isPermaLink="false">http://omnisaurusgames.com/?p=12</guid>
		<description><![CDATA[Hi, I&#8217;m Kevin, the programming half of Omnisaurus games. We&#8217;re pretty excited to start development on our first game, but before we did that we wanted to make sure to get our web site up and running. We&#8217;re planning on developing our game for iPhone using the Unity3D engine. The cross-platforminess of Unity allows us [...]]]></description>
			<content:encoded><![CDATA[<p>Hi, I&#8217;m Kevin, the programming half of Omnisaurus games. We&#8217;re pretty excited to start development on our first game, but before we did that we wanted to make sure to get our web site up and running. We&#8217;re planning on developing our game for iPhone using the Unity3D engine. The cross-platforminess of Unity allows us to post preview builds online to get feedback from our (hopefully) future customers. It&#8217;s like free QA, focus testing, and advertising blended all into one. Hooray for web 2 point whatever-we-are-currently-at.</p>
]]></content:encoded>
			<wfw:commentRss>http://omnisaurusgames.com/2011/05/welcome/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

