<?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>Finite Improbability &#187; starbound</title>
	<atom:link href="http://blog.finiteimprobability.com/category/games/starbound/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.finiteimprobability.com</link>
	<description>Just programming and math, no spontaneously jumping undergarments</description>
	<lastBuildDate>Wed, 10 Mar 2010 17:56:28 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>I&#8217;ve lost my mind</title>
		<link>http://blog.finiteimprobability.com/2009/01/07/ive-lost-my-mind/</link>
		<comments>http://blog.finiteimprobability.com/2009/01/07/ive-lost-my-mind/#comments</comments>
		<pubDate>Wed, 07 Jan 2009 23:39:31 +0000</pubDate>
		<dc:creator>Adam Jones</dc:creator>
				<category><![CDATA[games]]></category>
		<category><![CDATA[haskell]]></category>
		<category><![CDATA[starbound]]></category>

		<guid isPermaLink="false">http://blog.finiteimprobability.com/2009/01/07/ive-lost-my-mind/</guid>
		<description><![CDATA[After spending some time thinking about what is going wrong with this
game, I came to two conclusions:


Repl-based development doesn&#8217;t work for me. I ended up spending a lot
of time working my way into an inconsistent game state without know it,
so most of my time savings were spent figuring out how I&#8217;d borked things
on the next [...]]]></description>
			<content:encoded><![CDATA[<p>After spending some time thinking about what is going wrong with this
game, I came to two conclusions:</p>

<ol>
<li><p>Repl-based development doesn&#8217;t work for me. I ended up spending a lot
of time working my way into an inconsistent game state without know it,
so most of my time savings were spent figuring out how I&#8217;d borked things
on the next restart.</p></li>
<li><p>Haskell is just too damn interesting. Every time I tried to work on
the project I found myself goofing off there.</p></li>
</ol>

<p>Obviously, these points say much more about me than the tools I was
using, but the simple fact was that I still wasn&#8217;t getting much done. I
actually really liked how clean the more functional bits of my original
game code were, so I&#8217;m taking the plunge and switching to Haskell for my
game.</p>

<p>Since I&#8217;ve been wanting to dig deep into Haskell for a while this should
really push me there. So far just trying to express something as simple
as &#8220;a game unit can possibly target something targettable&#8221; has been a
deeper rabbit hole than I thought, and now that I think about it my
current solution won&#8217;t work. Luckily the new one is simpler.</p>

<p>I&#8217;m well aware that this will probably mean the death of this game, but
it already seemed to be in critical condition, and either way the
learning experience would be good. Stay tuned to see what happens.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.finiteimprobability.com/2009/01/07/ive-lost-my-mind/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Back on track?</title>
		<link>http://blog.finiteimprobability.com/2008/10/03/back-on-track/</link>
		<comments>http://blog.finiteimprobability.com/2008/10/03/back-on-track/#comments</comments>
		<pubDate>Fri, 03 Oct 2008 19:08:34 +0000</pubDate>
		<dc:creator>Adam Jones</dc:creator>
				<category><![CDATA[clojure]]></category>
		<category><![CDATA[picnic-invasion]]></category>
		<category><![CDATA[starbound]]></category>

		<guid isPermaLink="false">http://blog.finiteimprobability.com/?p=33</guid>
		<description><![CDATA[After seeing this game,
which seems close to a lot of the ideas I&#8217;ve been working on, I&#8217;m
trying to get back into writing mine. Here&#8217;s what I think needs to
change from my previous work:

Graphics

I got seriously hung up over graphics. I kept flip-flopping between
trying to do it in 2d and doing it in 3d. Could I [...]]]></description>
			<content:encoded><![CDATA[<p>After seeing <a href="http://www.cs.dartmouth.edu/~e11/asp.html">this game</a>,
which seems close to a lot of the ideas I&#8217;ve been working on, I&#8217;m
trying to get back into writing mine. Here&#8217;s what I think needs to
change from my previous work:</p>

<h2>Graphics</h2>

<p>I got seriously hung up over graphics. I kept flip-flopping between
trying to do it in 2d and doing it in 3d. Could I make graphics that
wouldn&#8217;t suck in either? I&#8217;m a programmer, not an artist. 3d models
are a lot of work, and the game idea I have is inherently <em>not</em> three
dimensional. This should have been a simple point, huh? Anyways,
unless I can coerce my wife into doing something better, expect
programmer-quality crap artwork.</p>

<h2>No &#8220;Starter Games&#8221;</h2>

<p>One idea I was pursuing was to try and do small games that
encapsulated one portion of the functionality I was working on for
Starbound. Since I wanted to have a bunch of ships semi-autonomously
flying around the screen I came up with the idea of Picnic Invasion!,
where a bunch of ants semi-autnomously crawl around a board.</p>

<p>In the right scenario, this could work out well. Unfortunately I
couldn&#8217;t really stir up much enthusiasm for the smaller game, so
pretty much nothing got done. I&#8217;m going to focus on Starbound and just
that. Picnic Invasion! is pretty much dead, although I&#8217;ll hang on to
the idea if I want to start doing simple applet games.</p>

<h2>The Clojure/Java bridge</h2>

<p>When I started working with Clojure, I pretty much assumed it would be
easier to do my computation in Clojure and use Java for storage. This
let me completely pass up learning all of the stuff in Clojure for
handling mutable data by hiding all of my mutations in Java.</p>

<p>The end result was that I had a bunch of Java classes that constantly
needed maintenance. The runtime modification that was <em>the whole
point</em> of me using a Lisp dialect for this was pretty well lost. It
also meant a lot of cumbersome stuff with objects that were little
more than data holders, and code like this:</p>

<pre><code>(defn update-game-obj 
  "Update the information provided to Java about the game object."
  [#^GameObject obj]
   (let [p (get-pos obj)
     v (get-vel obj)]
     (set! (. obj x) (. p (getX)))
     (set! (. obj y) (. p (getY)))
     (set! (. obj ang) (+ 90 (. v (getTheta))))))
</code></pre>

<p>Where a game object has to be told twice something it already knows
just so the Java-based rendering function can know how to render the
object. Except it&#8217;s not that simple, as the render loop is actually
built from Clojure code, so there&#8217;s a lot of unnecessary indirection
and duplication going on here.</p>

<p>The point is that I really should be wholly embracing one or the
other. Clojure has a lot of beautiful parts that I&#8217;m missing out on
because of this organization. The persistant data structures are
pretty much useless in this approach as any of my Java-based objects
directly violate their core assumptions, so any of the cool things I
could do with them (like easily rewinding time) simply aren&#8217;t
possible.</p>

<h2>Slick?</h2>

<p>Kevin Glass&#8217; <a href="http://slick.cokeandcode.com/">Slick</a> library is really
great. He&#8217;s spent a lot of time on it and it handles a lot of stuff
I&#8217;d rather not deal with. Slick tries really hard to just do what you
need and stay out of your way the rest of the time.</p>

<p>That said, I still am considering doing the whole thing &#8220;from scratch&#8221;
using <a href="http://lwjgl.org/">lwjgl</a>. It would be nice to learn a bit more
about OpenGL and some of the other technologies, and I would
essentially be able to do all of the game in Clojure, which is a real
plus. That said, I&#8217;d be taking on a lot more responsibility, and
re-doing a bunch of things that Slick handles pretty admirably. The
jury is still out on this one.</p>

<h2>What Went Right?</h2>

<p>With all of this complaining, there were a few things that went really
well. When I didn&#8217;t have to shut everything down to monkey with one of
my Java classes, using a Lisp for runtime development was
awesome. It&#8217;s easy to get lost in tweaking something until it is
perfect, which can be a bit of a time sink, but simply having that
ability means that when it is time to start perfecting things the work
will go a lot faster.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.finiteimprobability.com/2008/10/03/back-on-track/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
