<?xml version="1.0" encoding="UTF-8"?>
<feed version="0.3" xmlns="http://purl.org/atom/ns#" xml:lang="en-US">
	<title>NoshBar's Dumping Ground</title>
	<link rel="alternate" type="text/html" href="http://iwasdeportedandalligotwasthislousydomain.co.uk/index.php" />
	<modified>2026-09-12T05:10:37Z</modified>
	<author>
		<name>NoshBar</name>
	</author>
	<copyright>Copyright 2026, NoshBar</copyright>
	<generator url="http://www.sourceforge.net/projects/sphpblog" version="0.7.0">SPHPBLOG</generator>
	<entry>
		<title>Bridge Builder tutorial progress.</title>
		<link rel="alternate" type="text/html" href="http://iwasdeportedandalligotwasthislousydomain.co.uk/index.php?entry=entry120711-134701" />
		<content type="text/html" mode="escaped"><![CDATA[<center><a href="images/bridge_tut_1_big.png"><img src="/images/bridge_tut_1.png" alt=""  /></a><br /><em>(click the image for a larger version)</em><br /><br /><br /><a href="/files/BridgeTutorial.zip" >Download the source code</a> and either add the files to a Visual Studio Win32 solution that links to SDL and Box2D, or on Linux do:<br /><pre>g++ main.cpp -lSDL -lBox2D</pre></center><br /><br /><h3>Progress</h3><br /><br />While this is by no means THE bridge builder tutorial (I intend on writing LOTS and making many pretty pictures), this shows the direction I&#039;m going.<br /><br />I&#039;m not sure if I should start things really simple and build up, or if I should assume prior knowledge of renderers and physics engines (not that I know much about either of those anyway).<br />I guessed that something like this would be a good start, then the next version would add images, show how to build for every platform under the sun, that kind of thing.<br /><br />If anyone is reading this and by the same miracle is actually waiting to see what I come up with, I&#039;d love to hear what you&#039;d like to see.]]></content>
		<id>http://iwasdeportedandalligotwasthislousydomain.co.uk/index.php?entry=entry120711-134701</id>
		<issued>2012-07-11T00:00:00Z</issued>
		<modified>2012-07-11T00:00:00Z</modified>
	</entry>
	<entry>
		<title>Burning Built Bridges.</title>
		<link rel="alternate" type="text/html" href="http://iwasdeportedandalligotwasthislousydomain.co.uk/index.php?entry=entry120612-123955" />
		<content type="text/html" mode="escaped"><![CDATA[Once again I find myself building an effigy of my sorry self with the intent of beating it with a <a href="http://www.blogs.uni-osnabrueck.de/cmytanz/files/2009/04/magnum-almond.jpg" >poo-covered</a> hindsight stick.<br /><br />I move to <a href="http://en.wikipedia.org/wiki/Fika_%28coffee_break%29" >Sweden</a>, finally get settled in, get my first ever iPhone, launch up the AppStore in Swedish and... BAM, two bridge building games in the top charts: <a href="http://itunes.apple.com/us/app/fat-birds-build-a-bridge!/id468639171?mt=8&amp;ign-mpt=uo%3D4" >Fat Birds</a> and <a href="http://www.bridgeconstructor.com" >Bridge Constructor</a>.<br /><br />On the one hand I think &quot;Oh well, I&#039;d probably never have finished mine anyway&quot;, on the other hand I think &quot;I can make a better one!&quot;, and on my other radioactive hand I think &quot;CURSED OFFSPRING OF FEMALE CANINES!&quot;.<br /><br />It&#039;s about time I admit to myself that I will never make a full game, finishing is haaard.<br /><br />So I figured I&#039;d refocus my efforts and give them a new name, putting a positive spin on things.<br /><br />&quot;Tutorial&quot; = unfinished product that people appreciate.<br />Hopefully.<br /><br />If I ever finish it, I will be putting up a tutorial on how to code a simple bridge building game in baby C++ (classes, no STL, blah).<br /><br />With it, I may as well make an attempt to describe how I personally manage using the same code-base for Windows/Linux/OSX/iOS/Android/WebOS/BlackBerry(QNX).<br /><br />The worst that can happen is I finally feel like I did something worthwhile, right?]]></content>
		<id>http://iwasdeportedandalligotwasthislousydomain.co.uk/index.php?entry=entry120612-123955</id>
		<issued>2012-06-12T00:00:00Z</issued>
		<modified>2012-06-12T00:00:00Z</modified>
	</entry>
	<entry>
		<title>Bridge Building Game update - 26 September 2009</title>
		<link rel="alternate" type="text/html" href="http://iwasdeportedandalligotwasthislousydomain.co.uk/index.php?entry=entry090926-001250" />
		<content type="text/html" mode="escaped"><![CDATA[<center><iframe width="420" height="315" src="http://www.youtube.com/embed/ElVs-RS4RKY" frameborder="0" allowfullscreen></iframe></center><br /><ul><br /><li>Added a car to the mix (final version will have trains, planes, and monkeys [probably])<br /><li>Made the bridge less bouncy<br /><li>Tested building a bridge across a gap without fixed points<br /></ul><br />Next:<br /><ul><br /><li>I&#039;m going to add a &quot;well done, you made it&quot; message thingy<br /><li>Some sort of explosion for when the top and front of the car experience extreme forces.<br /></ul><br /><br />Saw an interesting post on the Box2D forums about hanging heavy objects from light objects, and how that&#039;s probably a bad thing, so I&#039;ll have to check that the bridge doesn&#039;t end up doing that during the game.<br /><br />Also came across this interesting post on the Cocos2D forums about static analysis:<br /><a href="http://www.cocos2d-iphone.org/forum/topic/1662" >http://www.cocos2d-iphone.org/forum/topic/1662</a><br />the links contained within are handy for stoopid people like me.]]></content>
		<id>http://iwasdeportedandalligotwasthislousydomain.co.uk/index.php?entry=entry090926-001250</id>
		<issued>2009-09-26T00:00:00Z</issued>
		<modified>2009-09-26T00:00:00Z</modified>
	</entry>
	<entry>
		<title>Bridge Builder Update - 30 August</title>
		<link rel="alternate" type="text/html" href="http://iwasdeportedandalligotwasthislousydomain.co.uk/index.php?entry=entry090830-001508" />
		<content type="text/html" mode="escaped"><![CDATA[It might not seem like I did much, for this weeks update, but loads under the hood has changed.<br /><br /><center><iframe width="420" height="315" src="http://www.youtube.com/embed/z83iYmW0Wmw" frameborder="0" allowfullscreen></iframe></center><br /><ul><br /><li>I learnt that the size of the Box2D world has an enormous affect on the speed of the simulation, so I&#039;ve simply divided by 10 to keep the world smaller.<br /><li>As such, I&#039;ve got to re-tweak the physics of the bridge elements, as the bridge is now waaay too elasticy.<br /><li>I couldn&#039;t for the life of me figure out how to make the parallax zoom in on the middle focal point of the screen using Cocos2D&#039;s Parallax Node, so I simply implemented parallax scrolling myself.<br /><li>I started just changing the Menu text to &quot;Play Game&quot;, but got carried away and made a lame intro screen.<br /></ul>]]></content>
		<id>http://iwasdeportedandalligotwasthislousydomain.co.uk/index.php?entry=entry090830-001508</id>
		<issued>2009-08-30T00:00:00Z</issued>
		<modified>2009-08-30T00:00:00Z</modified>
	</entry>
	<entry>
		<title>Bridge Builder Update - 16 August 2009</title>
		<link rel="alternate" type="text/html" href="http://iwasdeportedandalligotwasthislousydomain.co.uk/index.php?entry=entry090816-001650" />
		<content type="text/html" mode="escaped"><![CDATA[Just minor tests this week:<br /><ul><br /><li>test menu system, want to make it into a nice expanding sun, and highlight the ray that&#039;s selected<br /><li>test pin moving and editing &quot;widget&quot;<br /></ul><br />The only sensible way to create bridge segments is for the user to put a finger down on the start joint, and drag to the desired position, then let go.<br /><br />The only problem is, you can&#039;t possibly accurately position the pin underneath your finger.<br />So I figure: create it inaccurately, and drag it with the widget afterwards (which should hopefully give a clear view of the pin).<br /><br />I&#039;m also mighty jealous of <a href="http://www.motoxmayhem.com/" >Moto X Mayhem</a>&#039;s graphics and parallax scrolling.<br /><br /><center><iframe width="420" height="315" src="http://www.youtube.com/embed/9IRXT9KLGsU" frameborder="0" allowfullscreen></iframe></center>]]></content>
		<id>http://iwasdeportedandalligotwasthislousydomain.co.uk/index.php?entry=entry090816-001650</id>
		<issued>2009-08-16T00:00:00Z</issued>
		<modified>2009-08-16T00:00:00Z</modified>
	</entry>
	<entry>
		<title>Tile map editor for Bridge Builder prototype</title>
		<link rel="alternate" type="text/html" href="http://iwasdeportedandalligotwasthislousydomain.co.uk/index.php?entry=entry090726-001841" />
		<content type="text/html" mode="escaped"><![CDATA[Summary: this week I used Tiled to create a map for a parallax game level in Cocos2D, processing it with a custom written tool to calculate the Box2D collision area for the map automatically.<br /><br /><center><iframe width="420" height="315" src="http://www.youtube.com/embed/H1gyux_dSbM" frameborder="0" allowfullscreen></iframe><br>
<a href="images/mapeditor_big.png"><img src="/images/mapeditor.png" alt=""  /></a></center><br /><ul><br /><li>Tiled is a nice and portable tile map editor<br /><li>There is a plugin here to export the level data to a TGA file that Cocos2D expects.<br /><li>The plugin expects 3 layers, &quot;tile&quot;, &quot;bkgr&quot; and &quot;code&quot;<br /><li>I use the tile layer to store graphical tiles<br /><li>Any tile in the code level is used to signify the tile it covers is collidable<br /><li>The plugin exports &quot;tile&quot; data to the Red channel<br /><li>The plugin exports &quot;code&quot; data to the Blue channel<br /><li>Cocos2D only uses the Red channel<br /><li>I wrote a poorly coded tool to calculate<br /> 1) from left to right, the first tile in each column that is collidable, and stores that row value as the first Green value in the row<br /> 2) the first collidable pixel on the left in the selected tile, which is stored in the second Green value in the row<br /> 3) the first collidable pixel on the right in the selected tile, which is stored in the third Green value in the row<br /><li>In the app, a static edge object is created from vertices calculated from TileYOffset + TileYOffet information<br />  (or at least it would add static edges, if they weren&#039;t acting funky... so instead, I create a 4 sided poly object per column for now)<br /><li>For kicks, I added some parallax layers, the sky as the background, the level as the focal point, and the sea as the forefront layer.</ul><br />Get the source <a href="/files/mapeditor.zip" >here</a>.]]></content>
		<id>http://iwasdeportedandalligotwasthislousydomain.co.uk/index.php?entry=entry090726-001841</id>
		<issued>2009-07-26T00:00:00Z</issued>
		<modified>2009-07-26T00:00:00Z</modified>
	</entry>
	<entry>
		<title>Box2D Bridge Joint experiments.</title>
		<link rel="alternate" type="text/html" href="http://iwasdeportedandalligotwasthislousydomain.co.uk/index.php?entry=entry090721-003126" />
		<content type="text/html" mode="escaped"><![CDATA[In order to finally start iPhone development, I decided to start with something I would enjoy, required the least amount of Objective C fiddling, and had a graphics API I was familiar with, OpenGL.<br /><br />Enter left, the bridge building game. The physics are beyond my capabilities, so I figured Box2D would be just what I wanted.<br />Turns out, you still need to have a brain, nuts.<br /><br />When I first started, I used the Box2D bridge testbed as a starting point, where it creates bridge segments, connected by revolution joints.<br />This works fine if all you&#039;re doing is creating a single layer of bridge segments to go from one side to the next.<br />The problem comes when you try add support structures, as you cannot add 3 bodies to one joint, as seen below.<br /><br /><a href="/images/joint_1.png"><img src="/images/joint_1.png" alt=""  /></a><br /><br />Mnem was kind enough to suggest swapping the roles, replacing the bodies with distance joints, and the joints with bodies to hold them together.<br />This works great, as you can use the distance or reaction force of the joint to snap the joint when the force is too great.<br />The problem with this, is that you can&#039;t collide with a joint, so any vehicle travelling over the bridge would just fall through the structure segments.<br /><br /><a href="/images/joint_2.png"><img src="/images/joint_2.png" alt=""  /></a><br /><br />My latest thinking involves a mixture of distance and revolution joints, and bodies acting in different roles.<br />So for the main structure segments, that the vehicle will travel over, you have a pin(body), connected to a joint(revolution), which is in turn connected to a structure segment, and/or a support joint(distance).<br />This means that the bridge is still flexible, can still be supported, and can still break, without uneven tension across its structure.<br /><br /><a href="/images/joint_3.png"><img src="/images/joint_3.png" alt=""  /></a>]]></content>
		<id>http://iwasdeportedandalligotwasthislousydomain.co.uk/index.php?entry=entry090721-003126</id>
		<issued>2009-07-21T00:00:00Z</issued>
		<modified>2009-07-21T00:00:00Z</modified>
	</entry>
	<entry>
		<title>Learning Objective-C with the Bridge Builder prototype</title>
		<link rel="alternate" type="text/html" href="http://iwasdeportedandalligotwasthislousydomain.co.uk/index.php?entry=entry090721-002820" />
		<content type="text/html" mode="escaped"><![CDATA[A day late, but it was my first attempt at all this Objective C nonsense.<br /><br />It&#039;s a simple bridge builder prototype, where you have a canyon, a vehicle, and some building materials to build a bridge with, in order to get the car to the other side.<br />It worked out remarkably well, so I think I&#039;ll develop it further in a proper game.<br />There are so many &quot;feels right&quot; values in it, and I wonder if I should perform some sort of proper tension simulation with &quot;real&quot; values in... but if it feels good, -hey-.<br /><br /><center><iframe width="420" height="315" src="http://www.youtube.com/embed/t7bgsVhGa2I" frameborder="0" allowfullscreen></iframe></center><br /><br />The Box2D iPhone TestBed by Simon Oliver (of Rolando fame) was such a great starting block, it made developing this fun.<br />I checked out Box2D revision 2.0.2 from SVN, and used the tags folder, mostly because I didn&#039;t know where to start, and the SVN tag had an iPhone project in it.<br /><br />The Box2D framework side remains largely untouched, I just played with a few values to get things how I wanted them, and made the mousedown callback return true if it had consumed the event.<br />Get the code <a href="/files/bridgeproto1.zip" >here</a>.]]></content>
		<id>http://iwasdeportedandalligotwasthislousydomain.co.uk/index.php?entry=entry090721-002820</id>
		<issued>2009-07-21T00:00:00Z</issued>
		<modified>2009-07-21T00:00:00Z</modified>
	</entry>
</feed>
