<?xml version="1.0" encoding="ISO-8859-1"?>
<rdf:RDF
	xmlns="http://purl.org/rss/1.0/"
	xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
	xmlns:dc="http://purl.org/dc/elements/1.1/">
	<channel rdf:about="http://feeds.garagegames.com/rss/blogs/developer/81526/">
		<title>Blog for Rob Evans at GarageGames.com</title>
		<description>Blog feeds for Gamers and Developers in the GarageGames community.</description>
		<link>http://www.garagegames.com/</link>
		<image rdf:resource="http://www.garagegames.com/images/GarageGames_logo_small_w.gif" />
		<dc:date>2008-11-19T20:36:40+00:00</dc:date>
		<items>
			<rdf:Seq>
				<rdf:li rdf:resource="http://www.garagegames.com/blogs/81526/13221"/>
				<rdf:li rdf:resource="http://www.garagegames.com/blogs/81526/13214"/>
				<rdf:li rdf:resource="http://www.garagegames.com/blogs/81526/13183"/>
				<rdf:li rdf:resource="http://www.garagegames.com/blogs/81526/13173"/>
			</rdf:Seq>
		</items>
	</channel>
	<item rdf:about="http://www.garagegames.com/blogs/81526/13221">
		<dc:format>text/html</dc:format>
		<dc:date>2007-07-10T11:14:01+00:00</dc:date>
		<dc:creator>Rob Evans</dc:creator>
		<title>Space Sim in the Torque Game Engine - Setting up the Gravity Mod</title>
		<link>http://www.garagegames.com/blogs/81526/13221</link>
		<description>Well... after some fiddling around, I have been unable to make the gravity mod (&lt;a href='http://www.garagegames.com/index.php?sec=mg&amp;amp;mod=resource&amp;amp;page=view&amp;amp;qid=1723'&gt;link&lt;/a&gt;) work with 1.5.2 so I'm going to edit the engine myself.&lt;br&gt;&lt;br&gt;Instead of fiddle with lots of code internally, I have decided that because we want to keep gravity for everything except ships when we're in space, I'm just going to create a new vehicle from the flying vehicle code called SpaceVehicle. Any vehicle created with the SpaceVehicle datablock will have no gravity. This is cool because we can keep all the gravity stuff for when we're on planets or walking around space stations etc.&lt;br&gt;&lt;br&gt;I am using the WarSparrow object available for purchase here at GG and I suggest you purchase it to continue. I will NOT include or distribute this part of the code to anyone so you HAVE to buy it if you want to follow what I'm doing here.&lt;br&gt;&lt;br&gt;However, if you are knowledgeable in the creation of vehicles in TGE, there's no reason you can't make your own first.&lt;br&gt;&lt;br&gt;Follow the warsparrow install readme, then open warsparrow.cs and replace all instances of the word &amp;quot;Flying&amp;quot; with the word &amp;quot;Space&amp;quot;. Now the warsparrow will work with our SpaceVehicle code.&lt;br&gt;&lt;br&gt;Also, in &amp;quot;example\game.cs&amp;quot; change the code that says:&lt;br&gt;&lt;br&gt;   %player = new Player() {&lt;br&gt;      dataBlock = PlayerBody;&lt;br&gt;      client = %this;&lt;br&gt;   };&lt;br&gt;&lt;br&gt;to this&lt;br&gt;&lt;br&gt;   %player = new SpaceVehicle() {&lt;br&gt;      datablock = WarSparrow;&lt;br&gt;      client = %this;&lt;br&gt;   };&lt;br&gt;&lt;br&gt;Now our warsparrow will fly around like a space-ship... sort of. I will need to tweek the space vehicle movement stuff later, but for now it will suffice.&lt;br&gt;&lt;br&gt;Here's a pic of our new space-ship next to a space-station I added into the level with the world builder to test the gravity stuff.&lt;br&gt;&lt;br&gt;&lt;img src='http://v2.wastedwebspace.co.uk/gamedev/spacesim_screen8.png'  alt=&quot;&quot;&gt;</description>
	</item>
	<item rdf:about="http://www.garagegames.com/blogs/81526/13214">
		<dc:format>text/html</dc:format>
		<dc:date>2007-07-09T17:39:33+00:00</dc:date>
		<dc:creator>Rob Evans</dc:creator>
		<title>Space Sim in the Torque Game Engine - Setting up TGE and Using Sky Spheres</title>
		<link>http://www.garagegames.com/blogs/81526/13214</link>
		<description>This part of the guide uses resources submitted by Mike and the change-by-change details can be found here: &lt;a href='http://www.garagegames.com/index.php?sec=mg&amp;amp;mod=resource&amp;amp;page=view&amp;amp;qid=6644'&gt;www.garagegames.com/index.php?sec=mg&amp;amp;mod=resource&amp;amp;page=view&amp;amp;qid=6644&lt;/a&gt;&lt;br&gt;&lt;br&gt;I would like to take a quick moment to thank Mike for his insight and very useful resources on the space sim subject.&lt;br&gt;&lt;br&gt;Now down to business...&lt;br&gt;&lt;br&gt;----------------------------------------------------------------------------------------------------------------------------&lt;br&gt;&lt;b&gt;SETTING UP TGE&lt;/b&gt;&lt;br&gt;----------------------------------------------------------------------------------------------------------------------------&lt;br&gt;&lt;br&gt;During this guide it is important to remember that we are starting from scratch with a completely clean install of TGE 1.5.2.&lt;br&gt;&lt;br&gt;I will be providing all of the altered files so that you don't need to make any manual changes because let's be honest, you want to get straight into making your game right? The reason I'm going to go through proper explanations of stuff rather than just complete the changes myself and then post the files in a big zip (which you can skip to if you really want) is so that whilst cutting all of the corners, you'll still have a firm understanding of what has changed within the engine and why we needed to change it.&lt;br&gt;&lt;br&gt;&lt;b&gt;Unpack TGE&lt;/b&gt;&lt;br&gt;So, let's unpack the TGE install to a new directory. I've chosen &amp;quot;c:\Torque\Clean1&amp;quot;.&lt;br&gt;&lt;br&gt;&lt;b&gt;Make a Copy of tutorial.base&lt;/b&gt;&lt;br&gt;Once this is complete, you need to copy the directory &amp;quot;example\tutorial.base&amp;quot; and paste it in the same place &amp;quot;example\&amp;quot;. Then rename the new directory to &amp;quot;SpaceSim1&amp;quot;. So if you've done that correctly, you'll have a directory structure like this: &amp;quot;c:\Torque\Clean1\example\SpaceSim1&amp;quot;.&lt;br&gt;&lt;br&gt;&lt;b&gt;Edit Tutorial Files&lt;/b&gt;&lt;br&gt;Now that we have our new game directory &amp;quot;SpaceSim1&amp;quot; we need to let the TorqueDemo.exe know we want to load files from there rather than the &amp;quot;tutorial.base&amp;quot; directory. All of these changes are explained in detail in the beginners tutorial that comes with TGE.&lt;br&gt;&lt;br&gt;Open &amp;quot;example\main.cs&amp;quot; and change the line:&lt;br&gt;&lt;br&gt;$defaultGame = &amp;quot;tutorial.base&amp;quot;;&lt;br&gt;&lt;br&gt;to&lt;br&gt;&lt;br&gt;$defaultGame = &amp;quot;SpaceSim1&amp;quot;;&lt;br&gt;&lt;br&gt;Save the file and close it.&lt;br&gt;&lt;br&gt;The rest of the changes are included in the zip for this part of the guide and will be included in the really big zip at the end, however, you MUST do this part (above) first as those changes will not be included in the zip package.&lt;br&gt;&lt;br&gt;----------------------------------------------------------------------------------------------------------------------------&lt;br&gt;&lt;b&gt;SKY SPHERES&lt;/b&gt;&lt;br&gt;----------------------------------------------------------------------------------------------------------------------------&lt;br&gt;&lt;br&gt;In TGE (that's the Torque Game Engine you're probably using), the default sky setup allows the developer to create 6-sided sky boxes that display 6 individual textures to the player. Imagine a skybox like one giant cube that you as the player are floating inside, but wherever you go in the game, the skybox always stays centred around you. The problem with skyboxes is that if you imagine being inside one, the corners of the box will always be further away from you that the seams.&lt;br&gt;&lt;br&gt;In contrast, imagine being inside a sphere. Wherever you look, the sphere is always the same distance away from you, so you end up with a much less distorted view of the sky. However, like Mike says in his post (link above), sky spheres often require polar mapped textures. This sounds complicated, but if you have Adobe Photoshop, it's TOTALLY easy! This part of the guide is a step-by-step tutorial on making polar-mapped textures from your normal square ones.&lt;br&gt;&lt;br&gt;For our sim, we want to make the sky look like space so I'm going to refer to our sky-sphere as a space-sphere from now on (just to be different).&lt;br&gt;&lt;br&gt;On top of the space-sphere, we also apply the patch mentioned in the link at the top (please read that link so you get an idea of the changes we're making) so that stars are generated on our space-sphere. This creates a nice background for us to use without too much work.&lt;br&gt;&lt;br&gt;First, let's navigate to the correct folder for our clean installation of the TGE. I installed mine in C:\Torque\Clean1 and that is from where I will make all directory references. If I want you to look in C:\Torque\Clean1\engine\audio, I will simply say, &amp;quot;navigate to engine\audio&amp;quot;. OK? Cool.&lt;br&gt;&lt;br&gt;Your directory structure at this point will look like this:&lt;br&gt;&lt;br&gt;&lt;img src='http://v2.wastedwebspace.co.uk/gamedev/spacesim_screen1.png'  alt=&quot;&quot;&gt;&lt;br&gt;&lt;br&gt;For this part of the guide, the changed files are as follows:&lt;br&gt;&lt;br&gt;engine\terrain\sky.cc&lt;br&gt;engine\terrain\sky.h&lt;br&gt;example\main.cs&lt;br&gt;&lt;br&gt;You can simply unpack the zip and overwrite your current files and the changes will be applied!&lt;br&gt;&lt;br&gt;So, now that we have the space-sphere code, lets go into Photoshop and make a sphere texture for our space-looking background. I'm not going to spend hours making amazing texture graphics, this will just show you how to make a spherical texture. Ready? OK...&lt;br&gt;&lt;br&gt;Create a new file in Photoshop and set the width to 512 pixels and the height to 256 pixels. Make sure the colour mode is RGB and it's 8-bit too!&lt;br&gt;&lt;br&gt;&lt;img src='http://v2.wastedwebspace.co.uk/gamedev/spacesim_screen2.png'  alt=&quot;&quot;&gt;&lt;br&gt;&lt;br&gt;Next, select two colours in the colour picker. I've selected blue and black for a nice blue nebula effect, then click Filter -&amp;gt; Render -&amp;gt; Clouds.&lt;br&gt;&lt;br&gt;&lt;img src='http://v2.wastedwebspace.co.uk/gamedev/spacesim_screen3.png'  alt=&quot;&quot;&gt;&lt;br&gt;&lt;br&gt;You're almost done. Now we want our texture to wrap at all edges so that it doesn't have any seams. To do this, select Filter -&amp;gt; Other -&amp;gt; Offset. Then enter the value +15 for both horizontal and vertical. Make sure Wrap Around is selected. Click OK.&lt;br&gt;&lt;br&gt;&lt;img src='http://v2.wastedwebspace.co.uk/gamedev/spacesim_screen4.png'  alt=&quot;&quot;&gt;&lt;br&gt;&lt;br&gt;Next, we apply a spherical filter that turns our texture into one that looks cool when mapped to a sphere. Click Filter -&amp;gt; Distort -&amp;gt; Polar Coordinates. Then ensure that Polar to rectangle is selected.&lt;br&gt;&lt;br&gt;&lt;img src='http://v2.wastedwebspace.co.uk/gamedev/spacesim_screen5.png'  alt=&quot;&quot;&gt;&lt;br&gt;&lt;br&gt;Now, lastly we need to do a little editing. Select the top half of the image (0, 0 to 512, 128) and click Edit -&amp;gt; Copy. Then click Edit -&amp;gt; Paste. You should now have a second layer to play with. Move that layer to the bottom half of the image, then click Edit -&amp;gt; Transform -&amp;gt; Flip Vertical. This has basically mirrored the top half of our image to the bottom half.&lt;br&gt;&lt;br&gt;&lt;img src='http://v2.wastedwebspace.co.uk/gamedev/spacesim_screen6.png'  alt=&quot;&quot;&gt;&lt;br&gt;&lt;br&gt;Now that our texture has been created, save it as a png or jpeg - whatever works best for you (png is better).&lt;br&gt;&lt;br&gt;Here's what it looks like in our game:&lt;br&gt;&lt;br&gt;&lt;img src='http://v2.wastedwebspace.co.uk/gamedev/spacesim_screen7.png'  alt=&quot;&quot;&gt;&lt;br&gt;&lt;br&gt;I imagine that this is not the best or most cool looking way to create this kind of texture, however, for our immediate needs, it will suffice. If anyone has a better way, please post the details!! :o)</description>
	</item>
	<item rdf:about="http://www.garagegames.com/blogs/81526/13183">
		<dc:format>text/html</dc:format>
		<dc:date>2007-07-04T15:51:30+00:00</dc:date>
		<dc:creator>Rob Evans</dc:creator>
		<title>Space Sim in the Torque Game Engine - Introduction</title>
		<link>http://www.garagegames.com/blogs/81526/13183</link>
		<description>This post is based upon the latest TGE at time of writing which is version 1.5.2.&lt;br&gt;&lt;br&gt;After reading MANY posts, blog entries and resources on the subjects related to getting Torque Game Engine into a state ready to make a space sim, I've realised that it takes a lot of reading and effort to properly set up the engine specifically for this purpose. Moreover, many of the resources available are based upon older versions of the TGE and require a high level of perseverance in order to succeed in any changes. If you are like me and want to take the path of least resistance as often as possible, it will seem like quite a daunting task to alter the TGE this way.&lt;br&gt;&lt;br&gt;With that in mind, I am writing this comprehensive guide to making a space sim using TGE 1.5.2. Hopefully it will help someone else out there to avoid all the mistakes I had to make to get where I am now!&lt;br&gt;&lt;br&gt;All of the changes I make will be available via a download (possibly for a small fee) should anyone want to take the easy way out and just overwrite an install of TGE 1.5.2 with my changed files. To start with, I'm going to discuss the issues involved in making a space sim in detail and go through some of the things I learned along the way!&lt;br&gt;&lt;br&gt;The main issues / ideas / tasks involved are (in no particular order):&lt;br&gt;&lt;br&gt;1: Removing terrain.&lt;br&gt;2: Removing gravity.&lt;br&gt;3: Creating a star-based skybox.&lt;br&gt;4: Removing (or rather altering) the fog.&lt;br&gt;5: Creating points of reference such as floating debris, space-dust etc so that when you are flying around in your spaceship, you feel like you are actually moving!&lt;br&gt;6: Creating planets that you can fly down to from space and fly up from back into space.&lt;br&gt;7: Creating space-stations that you can dock with, and also trade at, pick up missions etc.&lt;br&gt;8: Create &amp;quot;sectors&amp;quot; of space that are &amp;quot;fly-anywhere&amp;quot; but split the universe up into larger &amp;quot;quadrants&amp;quot; that can only be accessed via jump-gates. This allows you to define a finite area of space so that you don't have to load the whole universe into memory.&lt;br&gt;9: Create an infinite universe algorithm so that objects and planets etc are generated via a mathematical function rather than by defined data, thus allowing the player to explore endlessly (unless defined data exists, then use that instead).&lt;br&gt;10: Multiplayer!!!!&lt;br&gt;11: And last, but by no means least, allow multiple servers to connect together, creating &amp;quot;super-jump-gates&amp;quot; that allow the player to jump to completely different space (which is actually a different server so that space is totally varied and players can host their own part of the universe!). This works by server admins swapping XML files containing data for where the super-jump-gates are located and the IP or DNS of the server the client will connect to upon jumping.&lt;br&gt;&lt;br&gt;This is a work in progress that I will be updating regularly with each part, starting from scratch, all the way to a playable game. This is a rather large undertaking and my free time like many others, is quite limited.&lt;br&gt;&lt;br&gt;Watch this blog for updates!&lt;br&gt;&lt;br&gt;Update 9th July 2007 - &lt;a href='http://www.garagegames.com/index.php?sec=mg&amp;amp;mod=resource&amp;amp;page=view&amp;amp;qid=13214'&gt;Part 1 of the Guide - Setting up TGE and using SkySpheres&lt;/a&gt;&lt;br&gt;Update 10th July 2007 - &lt;a href='http://www.garagegames.com/blogs/81526/13221'&gt;Part 2 of the Guide - Setting up the Gravity Mod&lt;/a&gt;</description>
	</item>
	<item rdf:about="http://www.garagegames.com/blogs/81526/13173">
		<dc:format>text/html</dc:format>
		<dc:date>2007-07-02T15:38:26+00:00</dc:date>
		<dc:creator>Rob Evans</dc:creator>
		<title>Creating Portals (doorways etc) in Constructor</title>
		<link>http://www.garagegames.com/blogs/81526/13173</link>
		<description>Having just spent about an hour trying to figure out how to do this I thought I'd type it up for anyone who's also a complete noob and might need some help...&lt;br&gt;&lt;br&gt;I'm writing a space sim and after getting all the engine changes in place (phew) I thought I'd concentrate on making some simple space stations to play around with but when I hollowed out the sections where I wanted the ship docking to occur and exported the dif file, I place the station in my scene and tried to fly into the docking port... bang. My ship collided with thin air!&lt;br&gt;&lt;br&gt;OK, so this is probably the point where many seasoned Torque peeps will laugh, but how was I to know I needed to actually set up where entrances are? :o)&lt;br&gt;&lt;br&gt;So, all you need to do to make a VERY simple test object is this:&lt;br&gt;&lt;br&gt;Create a cube primitive using the Build Cube button on the tools menu (top left). - Make sure you have the create tab selected so you can see the options I'm talking about.&lt;br&gt;&lt;br&gt;&lt;img src='http://v2.wastedwebspace.co.uk/gamedev/step1.png'  alt=&quot;&quot;&gt;&lt;br&gt;&lt;br&gt;Next, we're going to hollow out this cube to make a space for our ship to dock so click the modify tab in the tools box and click the hollow brush button. If you get an error about not having a brush selected, click on your box in the perspective view first, then click the hollow button.&lt;br&gt;&lt;br&gt;You'll get asked how thick you want the walls, the default is 0.5 and we'll leave it like that for the moment.&lt;br&gt;&lt;br&gt;&lt;img src='http://v2.wastedwebspace.co.uk/gamedev/step2.png'  alt=&quot;&quot;&gt;&lt;br&gt;&lt;br&gt;As you can see, the program has created an interior area inside our box. Cool eh? Gotta love those guys at GG!&lt;br&gt;&lt;br&gt;So now we have a box with an interior, how do we make an opening so that we can walk (or fly) inside?&lt;br&gt;&lt;br&gt;First, go back to the create tab on the tool box and click the Build Cube button again. We're going to build another cube and use it to cut a hole in our current box by using CSG Subtract.&lt;br&gt;&lt;br&gt;Once you've created your new cube, move it so that it intersects the first box where you want the &amp;quot;door&amp;quot; to be. You can move your obects by clicking the Modify tab in tools box and then clicking the Translate button.&lt;br&gt;&lt;br&gt;&lt;img src='http://v2.wastedwebspace.co.uk/gamedev/step3.png'  alt=&quot;&quot;&gt;&lt;br&gt;&lt;br&gt;Now click the CSG Subtract button. Once you've done that, to see your results, move the new box away from the old one and you'll see something similar to this:&lt;br&gt;&lt;br&gt;&lt;img src='http://v2.wastedwebspace.co.uk/gamedev/step4.png'  alt=&quot;&quot;&gt;&lt;br&gt;&lt;br&gt;Okey, so we've made the door, now lets tell Torque to actually let peeps in!&lt;br&gt;&lt;br&gt;Press CTRL-Z to undo your move action so that the new box is back intersecting the old one. Now we tell the Constructor that this new box is actually a portal.&lt;br&gt;&lt;br&gt;To do that, click the Object tab in the properties menu, then click Portal. Your new box will turn pink like so:&lt;br&gt;&lt;br&gt;&lt;img src='http://v2.wastedwebspace.co.uk/gamedev/step5.png'  alt=&quot;&quot;&gt;&lt;br&gt;&lt;br&gt;This is it... now the bit that really tripped me up was that once I'd done all of this, when I exported the dif file, it still didn't work!&lt;br&gt;&lt;br&gt;The trick is to export using the export menu's map2dif plus. See here:&lt;br&gt;&lt;br&gt;&lt;img src='http://v2.wastedwebspace.co.uk/gamedev/step6.png'  alt=&quot;&quot;&gt;&lt;br&gt;&lt;br&gt;That's it! This is also the first tutorial I've ever written so excuse the crappy arrows in the pics!&lt;br&gt;&lt;br&gt;Let me know if you need any help with it.</description>
	</item>
</rdf:RDF>
