<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">

  <title>DragonShadow Industries</title>
  <subtitle>Game development blog and other ramblings</subtitle>
  <link rel="alternate" href="http://www.dragonshadow.com"/>
  <link rel="self" href="http://www.dragonshadow.com/atom.xml"/>
  <updated>2010-04-24T04:59:25Z</updated>
  <icon>/fav.ico</icon>
  <author>
    <name>Skah T</name>
    <email>skah_t@dragonshadow.com</email>
  </author>
  <id>urn:dragonshadow-com:blog</id>

<!-- 2010 -->
<!-- 1272085160 -->
  <entry>
    <title>Objects abound</title>
    <content type="html"><![CDATA[<!--#include virtual="/-/common/gameprogress.inc"-->

<p>I was hoping that this post would contain a video of my work in progress running on both my iPod and iPad.  To do that, though, I need to (finally) sign up for the Apple developers program.  And to do <i>that</i> I need to sign their epically long developer agreement.  Since I am taking this very seriously I want to read the whole thing before spending the $99.  Also it may turn out that some clause prevents me from posting updates.  For now I will carry on posting as usual.</p>

<p>As for programming progress, I have started the framework for adding arbitrary objects to the play field.  My base object is basically the same thing as a peg - static and does not react when a ball hits it.  Classes derived from this will add more capability.  In fact I just realized that the Launcher and Bucket objects I created can, should, and will be converted to subclasses of the general object.  It makes tons of sense and is just cleaner that way.</p>

<p>Before this realization I had started adding a "Bumper" subclass that behaves like you see on pinball tables.  Balls striking it will be propelled away.  I haven't tested it yet, but it allows me to test some of the features in a more complex object:  collision callbacks and time delays for resetting.</p>

<p>I'd also like to put out a call for an artist to help me put decent graphics in this thing.  I'm sure not many people read this blog so I'll be posting elsewhere later, but thought I'd give it a shot here first.  Drop me a line if you are interested.</p>]]></content>
    <link rel="alternate" href="http://www.dragonshadow.com/-/archive/2010_Q2.html#23_Apr_2010"/>
    <id>tag:dragonshadow.com,2010-04-23:/-/news/2010/20100423-a.txt</id>
    <updated>2010-04-24T04:59:20Z</updated>
  </entry>

<!-- 1271786837 -->
  <entry>
    <title>*Finally*</title>
    <content type="html"><![CDATA[<img src="/-/images/20100417-peggle320.jpg" align="right">

<p>Jeez Louise, it's great to have that game firmly in the finished column.  I completed the last two levels and achieved my Extreme Grand Master trophy.  I will eventually put up some vids of especially good shots I made in the game.</p>

<p>So how did I tackle those last two levels?  First up was Billions & Billions (the one with the flying saucer).  I reasoned that since the saucer was the only moving object other than the bucket I might be able to use the same strategy as the <a CLASS="internal" href="/-/archive/2010_Q2.html#15_Apr_2010">previous two levels</a>.  This turned out rather well.  First, I cleared all the pegs possible by firing straight down.  Then I went to the far right.</p>

<p>The problem with firing to the sides arises when the ball enters one of the two holes and comes out the flying saucer.  Luckily I found a pattern that allowed me to catch a free ball.  I timed it so that the ball entered the hole, fell out of the flying saucer and straight into the bucket without touching any pegs.  That ensures that it is repeatable and deterministic.</p>

<p>Then, as I was trying to figure out the next shot I had a good streak of lucky bounces.  I decided to try clearing the level and was able to do it.  Whew!</p>

<p>The last level, Beyond Reason, is the one with the double helix.  For this one I followed the advice on the <a TARGET="_new" CLASS="external" href="http://www.popcap.com/extras/pegglestrategy/challenges.php">Pop Cap</a> site.  I used Splork and kept restarting until the two green pegs were in the center helix.  Hitting both in one shot along with the purple peg gave me three extra balls.  I got lucky and bucketed the ball as well so I ended up with 13 balls and just the bottom third or so of the helix remaining.  I got a bunch of lucky bounces and ended up clearing the board.  The stationary pegs are pretty easy.  You definitely need to get good at anticipating the bounces off non-moving pegs to have a chance.</p>

<p>And after all this I'm <i>still</i> seeing new sayings during the load screen (Just now: "Polishing claws").</p>]]></content>
    <link rel="alternate" href="http://www.dragonshadow.com/-/archive/2010_Q2.html#20_Apr_2010"/>
    <id>tag:dragonshadow.com,2010-04-20:/-/news/2010/20100420-a.txt</id>
    <updated>2010-04-20T18:07:17Z</updated>
  </entry>

<!-- 1271356813 -->
  <entry>
    <title>Peggle breakthrough</title>
    <content type="html"><![CDATA[<p>I'm down to three levels remaining in Peggle to achieve Extreme Grand Master.  I was struggling with the level "End of Time" for the longest time.  I finally hit up Google for some tips and stumbled on a brilliant strategy that I'm ashamed I didn't think of myself.</p>

<p>The difficulty with Peggle is the non-deterministic nature of the shots.  It is virtually impossible to line up a shot exactly the same way twice.  However, there are three angles that you <i>are</i> able to get the same every time.  The first is at the start of the level.  The game always starts you out pointing straight down.  If you don't move then you are guaranteed that the ball will bounce identically every time.  The other two are pointing the launcher at the extreme left and right.</p>

<p>So the strategy for "End of Time" is to pinpoint where the bucket needs to be when you launch the ball such that you get a free ball every time.  First, do this with the launcher pointing down.  Keep firing this way until you have cleared every possible peg and the ball just falls straight down.</p>

<p>Next, point to the far left and do the same thing.  For every ball you will need to keep track of the optimal bucket position to ensure a free ball.  Once there are no more pegs to hit then switch to the far right and do the same thing.</p>

<p>This is not a perfect solution, of course, because it doesn't clear <i>all</i> the pegs.  However, most of them will be gone and, with luck, you will still have ten balls with which to clear the rest.  Still difficult, but far easier than starting from scratch.</p>

<p>One question remaining is what character to choose when starting the level.  There really are only two viable options:  Bjorn (Super Guide) or Kat Tut (Pyramid).  All the others will mess up the sequence and cause you to clear pegs that might influence subsequent shots.</p>

<p>Bjorn is the safest as you can just ignore the Super Guide.  With Kat Tut you will need to compute two sets of positions to launch each ball - one for the normal case and one when you have the pyramid active.  The advantage of Kat Tut is that after you are done clearing all the deterministic pegs you might have a green peg or two left over to help you clear the rest.</p>

<p>This method falls apart if there are any moving objects in the level (other than the bucket).  So unfortunately it won't be of help for Billions & Billions nor Beyond Reason.  However, it will help with Yang Yin, which is another of the thorns in my side.  Hopefully I'll get that one cleared this weekend.</p>]]></content>
    <link rel="alternate" href="http://www.dragonshadow.com/-/archive/2010_Q2.html#15_Apr_2010"/>
    <id>tag:dragonshadow.com,2010-04-15:/-/news/2010/20100415-a.txt</id>
    <updated>2010-04-15T18:40:13Z</updated>
  </entry>

<!-- 1270843504 -->
  <entry>
    <title>Resolution independency</title>
    <content type="html"><![CDATA[<!--#include virtual="/-/common/gameprogress.inc"-->
<p>I <i>finally</i> have the program back to the state it was before I started making changes for XML level files.  Balls fall down into the buckets and the engine converts the ones at the bottom to be static <a CLASS="internal" href="/-/archive/2010_Q1.html#23_Feb_2010">as before</a>.</p>

<p>I had a bug where balls were falling through the walls and floor unexpectedly.  Turns out I had added an offset to most objects in the physics simulation <i>except</i> the walls and floor.  As a result the walls and floor were in the entirely wrong spot with relation to the pegs, balls and buckets.  This wasn't apparent visibly because it didn't affect the positions of the sprites on the screen - just their positions within the Chipmunk simulator.</p>

<p>My next task will be to make the app resolution-agnostic.  I will be targeting both iPhone and iPad and want to do it cleanly so that a single bundle will support both devices.  The iPad version will use higher-resolution assets, but will otherwise be identical.  This involves storing most sprite and physics attributes as percentages rather than fixed pixel sizes.  For instance, rather than stating that a ball is 8 pixels wide I need to specify it as 2.5% of the screen width.  That way things will scale up nicely and I won't need to do anything special for it to work on iPhone, iPad or any other device Apple releases.</p>

<p>Once that is done I will test it out on the actual hardware.  I have yet to do so, but I don't think I can put off joining the developer program any longer.</p>]]></content>
    <link rel="alternate" href="http://www.dragonshadow.com/-/archive/2010_Q2.html#09_Apr_2010"/>
    <id>tag:dragonshadow.com,2010-04-09:/-/news/2010/20100409-a.txt</id>
    <updated>2010-04-09T20:05:04Z</updated>
  </entry>

<!-- 1270577640 -->
  <entry>
    <title>A confession</title>
    <content type="html"><![CDATA[<p>My addiction to Peggle has severely impacted my programming productivity.  I got it for the PC years back, but it wasn't until I started playing it on the iPhone that I got hooked.</p>

<p>Finishing the adventure mode is easy enough.  Then came the challenges, which were difficult, but didn't take that long.  Now I'm in the long slog through clearing all pegs in all levels.  I have eight more levels to complete (and they are the hardest ones of course).  I'll be glad to have that behind me and hope I don't relapse into Peggle Nights after I'm done.  At least that's not on the iPhone yet.</p>

<p>I got my iPad with much trepidation.  Yes, I'm using it mostly for app development, but I am also curious about this whole Tablet Revolution that is supposedly coming.  I wasn't expecting much, but must admit that I can see this thing doing very very well.</p>

<p>Right now I'm using it as a super-sized iPod Touch.  It feels <i>great</i> playing games on them.  The display is beautiful.  It's great to have the extra screen real-estate for those games where your finger covers the action.  And scaling the games up by 2X works rather well.  Yes, there are some jaggies, but nothing too bad.</p>

<p>I am not convinced about the increased pricing of iPad apps relative to their iPhone counterparts.  Flight Control HD is more of the same - definitely not worth the $5 asking price.  And some other big-name apps going for $10 or more?  That's absurd.  At that price point they are competing against titles from XBLA and PSN, which are played on a full screen with a proper controller and higher production values.  I hope app price point settles down to the $2-4 range.  Otherwise I won't be impulse buying many titles.</p>

]]></content>
    <link rel="alternate" href="http://www.dragonshadow.com/-/archive/2010_Q2.html#06_Apr_2010"/>
    <id>tag:dragonshadow.com,2010-04-06:/-/news/2010/20100406-a.txt</id>
    <updated>2010-04-06T18:14:00Z</updated>
  </entry>

<!-- 2009 -->
<!-- 2008 -->
<!-- 2007 -->
<!-- 2006 -->
<!-- 2005 -->
<!-- 2004 -->
<!-- 2003 -->
<!-- 2002 -->
<!-- 2001 -->
<!-- 2000 -->
<!-- 1999 -->
<!-- 1998 -->
<!-- 1997 -->
</feed>
