<?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>Brightside Games</title>
	<atom:link href="http://blog.brightside-games.com/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://blog.brightside-games.com</link>
	<description></description>
	<lastBuildDate>Mon, 29 Mar 2010 14:06:03 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Indie Game Challenge Awardshow Photos and G4tv Adam Sessler Interview</title>
		<link>http://blog.brightside-games.com/?p=225</link>
		<comments>http://blog.brightside-games.com/?p=225#comments</comments>
		<pubDate>Thu, 11 Mar 2010 16:38:04 +0000</pubDate>
		<dc:creator>Thomas Bedenk</dc:creator>
				<category><![CDATA[Press & Media]]></category>
		<category><![CDATA[Zeit²]]></category>
		<category><![CDATA[award]]></category>
		<category><![CDATA[challenge]]></category>
		<category><![CDATA[DICE]]></category>
		<category><![CDATA[IGC]]></category>
		<category><![CDATA[interview]]></category>
		<category><![CDATA[press]]></category>

		<guid isPermaLink="false">http://blog.brightside-games.com/?p=225</guid>
		<description><![CDATA[Being in the Indie Game Challenge was a unique experience and we again want to congratulate Cogs and Gear on winning the competition. It was great to be nominated next to all these great indie games and to meet our fellow developers. The chance to attend D.I.C.E. gave us the opportunity to connect to a [...]]]></description>
			<content:encoded><![CDATA[<p>Being in the Indie Game Challenge was a unique experience and we again want to congratulate Cogs and Gear on winning the competition. It was great to be nominated next to all these great indie games and to meet our fellow developers. The chance to attend D.I.C.E. gave us the opportunity to connect to a lot of big names of the industry and see whats currently going on in the gaming world.</p>
<p><span>For everyone who could not be at the event G4tv has good coverage of D.I.C.E. on their website. </span></p>
<p><span>Now watch the Indie Game Challenge Awards or look at some photos below. Thomas is being interviewed by Adam Sessler about Zeit² in the video starting at 10:50min.</span></p>
<p><object id="VideoPlayerLg44477" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="630" height="418" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowScriptAccess" value="always" /><param name="allowFullScreen" value="true" /><param name="src" value="http://g4tv.com/lv3/44477" /><param name="name" value="VideoPlayer" /><param name="allowfullscreen" value="true" /><embed id="VideoPlayerLg44477" type="application/x-shockwave-flash" width="630" height="418" src="http://g4tv.com/lv3/44477" name="VideoPlayer" allowfullscreen="true" allowscriptaccess="always"></embed></object></p>
<p style="text-align: center;"><img class="aligncenter size-large wp-image-227" title="IGC_Stage_VideoStill_01" src="http://blog.brightside-games.com/wp-content/uploads/2010/03/IGC_Stage_VideoStill_01-630x354.jpg" alt="IGC_Stage_VideoStill_01" width="630" height="354" /></p>
<p style="text-align: center;"><a href="http://blog.brightside-games.com/wp-content/uploads/2010/03/IGC_Stage_VideoStill_01.jpg"></a><img class="aligncenter size-full wp-image-231" title="igc_award" src="http://blog.brightside-games.com/wp-content/uploads/2010/03/igc_award.jpg" alt="igc_award" width="630" height="250" /></p>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-232" title="interview_onstage" src="http://blog.brightside-games.com/wp-content/uploads/2010/03/interview_onstage.jpg" alt="interview_onstage" width="630" height="355" /></p>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-233" title="dice" src="http://blog.brightside-games.com/wp-content/uploads/2010/03/dice.jpg" alt="dice" width="630" height="194" /></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.brightside-games.com/?feed=rss2&amp;p=225</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Zeit² is indiegamechallenge.com finalist! YEAH vote for us&#8230;</title>
		<link>http://blog.brightside-games.com/?p=217</link>
		<comments>http://blog.brightside-games.com/?p=217#comments</comments>
		<pubDate>Mon, 01 Feb 2010 17:24:23 +0000</pubDate>
		<dc:creator>Thomas Bedenk</dc:creator>
				<category><![CDATA[Press & Media]]></category>
		<category><![CDATA[Zeit²]]></category>
		<category><![CDATA[award]]></category>

		<guid isPermaLink="false">http://blog.brightside-games.com/?p=217</guid>
		<description><![CDATA[WOW, Zeit² really made it to the indiegamechallenge.com final.
Congrats to all the co-finalists! AHHHHHHHH, Vessel, Climb to the top of the Castle, and all the others&#8230; we are honored to be nominated next to these brilliant indie games.
Thanks to everyone that keeps supporting us on our game developers journey. Andy Nealen, RCP and of course [...]]]></description>
			<content:encoded><![CDATA[<p>WOW, Zeit² really made it to the indiegamechallenge.com final.</p>
<p>Congrats to all the co-finalists! AHHHHHHHH, Vessel, Climb to the top of the Castle, and all the others&#8230; we are honored to be nominated next to these brilliant indie games.</p>
<p>Thanks to everyone that keeps supporting us on our game developers journey. Andy Nealen, RCP and of course everyone that contributed to the game and believed in our game! I&#8217;m sure you can tell how excited we are here at Brightside Games right now!</p>
<p>Visit <a href="http://www.indiegamechallenge.com/finalists/zeit-squared/">http://www.indiegamechallenge.com/finalists/zeit-squared/</a> and vote for us if you like our game.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.brightside-games.com/?feed=rss2&amp;p=217</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Decimation X out on XBLIG, get it!</title>
		<link>http://blog.brightside-games.com/?p=208</link>
		<comments>http://blog.brightside-games.com/?p=208#comments</comments>
		<pubDate>Wed, 20 Jan 2010 17:30:47 +0000</pubDate>
		<dc:creator>Thomas Bedenk</dc:creator>
				<category><![CDATA[Gaming]]></category>

		<guid isPermaLink="false">http://blog.brightside-games.com/?p=208</guid>
		<description><![CDATA[Our friends of XONA GAMES just released Decimation X on Xbox Live Indie Games. It&#8217;s a great Space Invaders clone with an awesome upgrade system and up to 4 player co-op. And the best its only 1$! GO get it now on the Xbox Live Marketplace  
My highscore right now is 628.000 after the [...]]]></description>
			<content:encoded><![CDATA[<p>Our friends of <a href="http://xona.com/" target="_blank">XONA GAMES</a> just released <a href="http://decimationx.com/" target="_blank">Decimation X</a> on Xbox Live Indie Games. It&#8217;s a great Space Invaders clone with an awesome upgrade system and up to 4 player co-op. And the best its only 1$! GO get it now on the <a href="http://marketplace.xbox.com/en-CA/games/media/66acd000-77fe-1000-9115-d8025855040a" target="_blank">Xbox Live Marketplace</a> <img src='http://blog.brightside-games.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>My highscore right now is 628.000 after the second day but Matthew and Jason (the devs) have over 1.8 million so still some room to improve <img src='http://blog.brightside-games.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> . Decimation X is currently best rated game and best selling game on XBLIG in Japan.</p>
<p>You can also read more and watch a trailer over at <a href="http://www.gamesetwatch.com/2010/01/decimation_x_an_even_more_extr.php" target="_blank">gamesetwatch.com</a> and <a href="http://technabob.com/blog/2010/01/16/decimation-x-xbox-360-arcade-game/" target="_blank">technabob.com</a></p>
<p><img class="aligncenter" src="http://xona.com/2010/01/images/screen1_Web.jpg" alt="" width="600" height="337" /></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.brightside-games.com/?feed=rss2&amp;p=208</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Osmos nominated for Spike VGA&#8230; vote now!</title>
		<link>http://blog.brightside-games.com/?p=178</link>
		<comments>http://blog.brightside-games.com/?p=178#comments</comments>
		<pubDate>Fri, 11 Dec 2009 10:56:08 +0000</pubDate>
		<dc:creator>Thomas Bedenk</dc:creator>
				<category><![CDATA[Gaming]]></category>

		<guid isPermaLink="false">http://blog.brightside-games.com/?p=178</guid>
		<description><![CDATA[Our friends Eddy, Andy and Co over at Hemisphere Games got nominated for Spikes Video Game Awards in the indiependent category.Vote now!
There is also a very entertaining video report about the indie game companies that where nominated which was on Spike TV last night. Watch it now.
Congrats and good luck!

]]></description>
			<content:encoded><![CDATA[<p>Our friends Eddy, Andy and Co over at <a href="http://www.hemispheregames.com/">Hemisphere Games</a> got nominated for Spikes Video Game Awards in the indiependent category.<a href="http://www.spike.com/event/vga2009/page/vote/category/34774" target="_blank">Vote now!</a></p>
<p>There is also a very entertaining video report about the indie game companies that where nominated which was on Spike TV last night. <a href="http://www.spike.com/video/next-great-game-gods/3300155" target="_blank">Watch it now</a>.</p>
<p>Congrats and good luck!</p>
<p><a href="http://www.spike.com/video/next-great-game-gods/3300155" target="_blank"><img class="aligncenter size-full wp-image-180" title="eddy_video" src="http://blog.brightside-games.com/wp-content/uploads/2009/12/eddy_video.jpg" alt="eddy_video" width="630" height="361" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.brightside-games.com/?feed=rss2&amp;p=178</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Basic online high scores with XNA / C# and PHP / MYSQL</title>
		<link>http://blog.brightside-games.com/?p=125</link>
		<comments>http://blog.brightside-games.com/?p=125#comments</comments>
		<pubDate>Tue, 24 Nov 2009 19:51:47 +0000</pubDate>
		<dc:creator>Thomas Bedenk</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Game Studio]]></category>
		<category><![CDATA[high scores]]></category>
		<category><![CDATA[highscores]]></category>
		<category><![CDATA[leaderboards]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[XNA]]></category>

		<guid isPermaLink="false">http://blog.brightside-games.com/?p=125</guid>
		<description><![CDATA[
In this tutorial I want to give you a very straight forward and basic way to implement online high scores (aka. online leaderboards or online highscore tables) for XNA Game Studio PC games. We used a similar aproach to quickly implement basic online highscores for an early version of our game zeit2. I assume that [...]]]></description>
			<content:encoded><![CDATA[<p><!--pagetitle:Setting up the database--><br />
In this tutorial I want to give you a very straight forward and basic way to implement online high scores (aka. online leaderboards or online highscore tables) for XNA Game Studio PC games. We used a similar aproach to quickly implement basic online highscores for an early version of our game <a href="http://zeit2.com" target="_blank">zeit2</a>. I assume that you know how to work with C#,PHP,HTML and MySQL for this little tutorial. Of course in a real setting you would probably want to implement a user management/login to identify every unique user. But to make it simplier for now we only submit a name to be stored with every score.<br />
What you need is a PHP server with MySQL running as a database backend.</p>
<h3>STEP 1 &#8211; Setting up the database</h3>
<p>First you will have to create a MySQL Table:<br />
<code>CREATE TABLE IF NOT EXISTS `mygame_highscores` (<br />
`ID` int(11) NOT NULL auto_increment,<br />
`ModeID` varchar(256) NOT NULL,<br />
`Name` varchar(256) NOT NULL,<br />
`Info` varchar(256) NOT NULL,<br />
`Score` int(11) NOT NULL,<br />
`Timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP,<br />
PRIMARY KEY  (`ID`)<br />
) ENGINE=MyISAM  DEFAULT CHARSET=latin1;</code></p>
<p><strong>ID</strong> contains an auto-incremented Number that is unique for every entry.<br />
<strong>ModeID</strong> contains an identifier for which mode or level a highscore was achieved. This way you can save multiple highscores tables in one MySQL table.<br />
<strong>Name</strong> is the name of the player that got the new score. (In an advanced version you would use an UserID that refers to another table in your database)<br />
<strong>Info</strong> contains anything you wanna store with your score, i.e. what time the user needed to finish a level.<br />
<strong>Score</strong> has the number that represents the score the player got.<br />
<strong>Timestamp</strong> lets you identify when a score was saved. That way you can have weekly leaderboards for example.</p>
<p>Let&#8217;s enter some dummy data to our table. this example only inserts two records but feel free to add more for better testing.</p>
<p><code>INSERT INTO `databasename`.`mygame_highscores` (<br />
`ID` ,<br />
`ModeID` ,<br />
`Name` ,<br />
`Info` ,<br />
`Score` ,<br />
`Timestamp`<br />
)<br />
VALUES (<br />
NULL , '1', 'Marcus', '10:30 min', '100',<br />
CURRENT_TIMESTAMP<br />
), (<br />
NULL , '1', 'Peter', '9:12 min', '90',<br />
CURRENT_TIMESTAMP<br />
);</code></p>
<p>Read on the next page how we write our PHP script to request scores.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.brightside-games.com/?feed=rss2&amp;p=125</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Dynamic Volume in Xact3</title>
		<link>http://blog.brightside-games.com/?p=109</link>
		<comments>http://blog.brightside-games.com/?p=109#comments</comments>
		<pubDate>Fri, 18 Sep 2009 10:23:59 +0000</pubDate>
		<dc:creator>Volker Seeker</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Game Studio]]></category>
		<category><![CDATA[Xact]]></category>
		<category><![CDATA[XNA]]></category>

		<guid isPermaLink="false">http://blog.brightside-games.com/?p=109</guid>
		<description><![CDATA[The audio tool Xact from XNA provides a lot of functionallity necessary for your own game. But sometimes it can be very exhausting to find out how a specific task can be done, even if that task seems to be very easy like controlling the volume of a cue. Documentations are mostly not  very [...]]]></description>
			<content:encoded><![CDATA[<p>The audio tool Xact from XNA provides a lot of functionallity necessary for your own game. But sometimes it can be very exhausting to find out how a specific task can be done, even if that task seems to be very easy like controlling the volume of a cue. Documentations are mostly not  very detailled, if you could manage to find one. Due to the fakt that I had some work to find out how to handle volume changes  properly (at least more than I expected), I&#8217;d like to write about that.</p>
<p>Basically there are two ways to controll the volume of a running cue. There can be more, but thats all I found out.</p>
<h3>1. Categories</h3>
<p>The first one works with categories. You can create a category in the Xact tool, stick some sounds to it and change the category volume at runtime. Rightclick on the <em>Categroies </em>entry in Xact or on an existing category to add a new one or a subcategory. Give it a name and select the sounds you want to add to this category in your soundbank. Now select the new category in the  lower left menu  from a dropdown list.</p>
<p>In the component that cares for the audio of your game you should somewhere have an AudioEngine instance, if you want to work with Xact.  This AudioEngine provides access to lots of properties and entities of your Xact .xap project. With <em>GetCategory </em>and the corresponding name as a string, you can grap your category and set the volume level with <em>SetVolume</em>. This could look like that:</p>
<pre>public class AudioInterface : GameComponent
{
  private AudioEngine audioEngine;
  private WaveBank waveBank;
  private SoundBank soundBank;

  public AudioInterface(Game _game) : base(_game)
  {
    audioEngine = new AudioEngine("Content/Audio/myGameAudio.xgs");
    waveBank = new WaveBank(audioEngine, "Content/Audio/Wave Bank.xwb");
    soundBank = new SoundBank(audioEngine, "Content/Audio/Sound Bank.xsb");
  }

  private void SetCategoryVolume(string _name, float _level)
  {
    AudioCategory cat = audioEngine.GetCategory(_name);
    cat.SetVolume(_level);
  }

  public override void Update(GameTime _gameTime)
  {
    audioEngine.Update();
  }

  //TODO add some more usfull audio stuff
}</pre>
<p>Working with categories is cool because you can modify a lot of sound cues at once, but changing volumes via categories for single music tracks is pretty anoying. The number and subcategory structure of your Xact project can become very big and confusing. A better way are variables.</p>
<h3>2. Variables</h3>
<p>Right below the <em>Categories </em>entry in Xact is an entry called <em>Variables. </em>Here you can create your own variables, set a range or an initial value and change the value at runtime via the AudioEngine instance. By connecting that variable to a sound from the soundbank, you can controll a lots of properties for  that sound at runtime with the variable. One of them is volume. To do that you need a RPC (Runtime Parameter Controll) Preset which can be added right below the variables. That preset holds one ore more curves wich are connected to your variable and defines how the specified property changes, if you increase or decrease the variable value at runtime. If that preset is made, hook your sounds to it and thats it.</p>
<p>A wonderful tutorial about variables, presets and dynaming music volume can be found at <a href="http://www.luminance.org/code/2009/07/23/simple-dynamic-music-with-xact" target="_blank">Kevin Gadd’s blog</a>. This one has a lot of pictures and code snippets and should give you a lot of information about that topic.</p>
<p>After doing all the Xact work you could extend your audio engine with something like that</p>
<pre>  public void setGlobalVariable(string _name, float _value)
  {
    m_audioEngine.SetGlobalVariable(_name, _value);
  }

  public float getGlobalVariable(string _name)
  {
    return m_audioEngine.GetGlobalVariable(_name);
  }</pre>
<p>and change the music volume by setting your volume variable to fade the music or set a specified level directly.</p>
<pre>  private enum FadeState { None, FadeIn, FadeOut }

  private float FadeValue(GameTime _gameTime, FadeState _mode, float _start,
                          float _duration, string _variable)
  {
    float fadeElapsedTime = (float)(_gameTime.TotalGameTime.TotalSeconds - _start);
    float intensity = MathHelper.Clamp(fadeElapsedTime / _duration, 0f, 1f);
    switch (_mode)
    {
      case FadeState.FadeIn:
        audioInterface.setGlobalVariable(_variable, intensity);
        break;
      case FadeState.FadeOut:
        audioInterface.setGlobalVariable(_variable, 1f - intensity);
        break;
      default:
        //do nothing
        break;
    }
    return intensity;
  }</pre>
<p>The presets together with variables are pretty migthy. For example I used a variable and a preset with two curves (as you can see in the image above) to crossfade two sounds by connecting a rising curve to the first track and a falling to the second and modifying them with the corresponding variable.</p>
<p>So much for now, have fun with Xact and dynamic volume.</p>
<p>Cheers Volker</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.brightside-games.com/?feed=rss2&amp;p=109</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Zeit² ModDB Entry Online</title>
		<link>http://blog.brightside-games.com/?p=86</link>
		<comments>http://blog.brightside-games.com/?p=86#comments</comments>
		<pubDate>Thu, 17 Sep 2009 13:12:25 +0000</pubDate>
		<dc:creator>Thomas Bedenk</dc:creator>
				<category><![CDATA[Press & Media]]></category>
		<category><![CDATA[Zeit²]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[website]]></category>

		<guid isPermaLink="false">http://blog.brightside-games.com/?p=86</guid>
		<description><![CDATA[The MODDB entry of Zeit² is online and will be filled with more information. Just another cool way to stay up to date about the game.
Visit the ModDB Zeit² Page
]]></description>
			<content:encoded><![CDATA[<p><span>The MODDB entry of Zeit² is online and will be filled with more information. Just another cool way to stay up to date about the game.</span></p>
<h3><a href="http://www.moddb.com/games/zeit" target="_blank">Visit the ModDB Zeit² Page</a></h3>
]]></content:encoded>
			<wfw:commentRss>http://blog.brightside-games.com/?feed=rss2&amp;p=86</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Zeit² Development Team Awarded by Federal Ministry</title>
		<link>http://blog.brightside-games.com/?p=91</link>
		<comments>http://blog.brightside-games.com/?p=91#comments</comments>
		<pubDate>Tue, 15 Sep 2009 13:13:25 +0000</pubDate>
		<dc:creator>Thomas Bedenk</dc:creator>
				<category><![CDATA[Press & Media]]></category>
		<category><![CDATA[Zeit²]]></category>
		<category><![CDATA[award]]></category>
		<category><![CDATA[Game Studio]]></category>
		<category><![CDATA[press]]></category>

		<guid isPermaLink="false">http://blog.brightside-games.com/?p=91</guid>
		<description><![CDATA[Brightside Games won the &#8220;Founders Competition &#8211; Multimedia&#8221; of the Federal Ministry of Economics and Technology of Germany (&#8221;Gründerwettbewerb &#8211; Mit Multimedia erfolgreich starten&#8221; des Bundesministerium für Wirtschaft und Technol ogie) and recieved the prize at the IFA 2009 in Berlin on September 4th.


See the original press releases
www.gruenderwettbewerb.de
gruendung.tu-berlin.de
pressestelle.tu-berlin.de
www.bmwi.de
 
Pictures of the event:

]]></description>
			<content:encoded><![CDATA[<p><span>Brightside Games won the &#8220;Founders Competition &#8211; Multimedia&#8221; of the Federal Ministry of Economics and Technology of Germany (&#8221;Gründerwettbewerb &#8211; Mit Multimedia erfolgreich starten&#8221; des Bundesministerium für Wirtschaft und Technol<span> </span><span>ogie) and recieved the prize at the IFA 2009 in Berlin on September 4th.</span></span></p>
<p><span><span><br />
</span></span></p>
<h4><span><span>See the original press releases</span></span></h4>
<p><a href="http://www.gruenderwettbewerb.de/erfolge/preistraeger/preistraeger-der-runde-1-2009/#winner_brightside-games">www.gruenderwettbewerb.de</a></p>
<p><a href="http://www.gruendung.tu-berlin.de/236.html?tx_ttnews[tt_news]=84&amp;tx_ttnews[backPid]=308&amp;cHash=23a96a1167" target="_blank">gruendung.tu-berlin.de</a></p>
<p><a href="http://www.pressestelle.tu-berlin.de/newsportal/menschen/2009/bundeswirtschaftsministerium_zeichnet_unternehmen_aus_aus_der_tu-gruendungswerkstatt_aus/" target="_blank">pressestelle.tu-berlin.de</a></p>
<p><a href="http://www.bmwi.de/BMWi/Navigation/Presse/pressemitteilungen,did=312376.html" target="_blank">www.bmwi.de</a><br />
<span><span> </span></span></p>
<h4>Pictures of the event:</h4>
<p><a href="http://blog.brightside-games.com/wp-content/uploads/2009/09/gruppenbild_klein.jpg"><img class="aligncenter size-full wp-image-96" title="gruppenbild_klein" src="http://blog.brightside-games.com/wp-content/uploads/2009/09/gruppenbild_klein.jpg" alt="gruppenbild_klein" width="630" height="250" /></a><a href="http://blog.brightside-games.com/wp-content/uploads/2009/09/IFA-MultimediaPreis_final.jpg"><img class="aligncenter size-large wp-image-92" title="IFA-MultimediaPreis_final" src="http://blog.brightside-games.com/wp-content/uploads/2009/09/IFA-MultimediaPreis_final-630x472.jpg" alt="IFA-MultimediaPreis_final" width="630" height="472" /></a><a href="http://blog.brightside-games.com/wp-content/uploads/2009/09/ifa2009_.jpg"><img class="aligncenter size-full wp-image-98" title="ifa2009_" src="http://blog.brightside-games.com/wp-content/uploads/2009/09/ifa2009_.jpg" alt="ifa2009_" width="630" height="344" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.brightside-games.com/?feed=rss2&amp;p=91</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Automatic XNB Serialisation in XNA 3.1</title>
		<link>http://blog.brightside-games.com/?p=65</link>
		<comments>http://blog.brightside-games.com/?p=65#comments</comments>
		<pubDate>Wed, 02 Sep 2009 10:09:36 +0000</pubDate>
		<dc:creator>Volker Seeker</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Game Studio]]></category>
		<category><![CDATA[Tipps]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[XNA]]></category>

		<guid isPermaLink="false">http://blog.brightside-games.com/?p=65</guid>
		<description><![CDATA[With XNA 3.1 comes a very cool feature, that makes writing of own content types a lot easier. You don&#8217;t have to create your own ContentTypeWriter and ContentTypeReader anymore. If none of those classes is found for your type XNA writes them for you automatically by using reflection.
In order to work with external tools XML [...]]]></description>
			<content:encoded><![CDATA[<p>With XNA 3.1 comes a very cool feature, that makes writing of own content types a lot easier. You don&#8217;t have to create your own ContentTypeWriter and ContentTypeReader anymore. If none of those classes is found for your type XNA writes them for you automatically by using reflection.</p>
<p>In order to work with external tools XML is a wonderful format to share the results and make them accessible in your code. There are lots of libraries for xml import and export you can include in your tool and if the xml file is not too long, you can even read or edit it manually with a simple text editor. That&#8217;s the reason why we use a lot of custom content types in Zeit². So the automatic serialisation is a welcome innovation for XNA and makes my live a lot easier.</p>
<p>You can find a pretty good introduction to the basic features and also some example code at <a href="http://blogs.msdn.com/shawnhar/archive/2009/03/25/automatic-xnb-serialization-in-xna-game-studio-3-1.aspx" target="_blank">Shawn Hargreaves Blog</a>.</p>
<p>However there are still things I needed some time for to figure out, because they were not mentioned in the article above. So let me explain them to spare you the work [and to make me remember them the next time <img src='http://blog.brightside-games.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> ].</p>
<h3>Collections</h3>
<p>You have the possibility to add collections to your type such as lists or arrays. Actually its no big deal to add a collection member to your type, but the tricky part is the format in the xml file. There are two different ways of separating collection entries. They can be space- or tag separated.</p>
<p>The separation method depends on the C# type you want to use. There are value-types and reference-types (pointer types should work like reference-types). Out of the value-types, the simple-types are space separated. These are predefined types such as int or float but also from XNA like Vector2 or Color.</p>
<p>The struct-types, enum-types and and all reference-types are separated with tags. The standard tag is &lt;Item&gt; but you can change the collection item name by adding the attribute<em> [ContentSerializerAttribute(CollectionItemName = "CollectionItem")]</em> to the managed type member.</p>
<p>For the example I used a space separated list with XNA Colors, the standard collection item name for the puppies and a customized one for the flees.</p>
<pre>public class Dog
{
   public string name;
   public Color[] furColors;
   public Puppy[] puppies;
   [ContentSerializerAttribute(CollectionItemName = "FleeItem")]
   public List&lt;Flee&gt; flees;
}

public struct Puppy
{
   public string name;
}

public class Flee
{
   public int size;
}

&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;XnaContent&gt;
 &lt;Asset Type="GameLib.Dog[]"&gt;
   &lt;Item&gt;
     &lt;name&gt;Ace&lt;/name&gt;
     &lt;furColors&gt;
       FFFFCCFF
       AAFFFF23
       1243FFFF
     &lt;/furColors&gt;
     &lt;puppies&gt;
       &lt;Item&gt;
         &lt;name&gt;King&lt;/name&gt;
       &lt;/Item&gt;
       &lt;Item&gt;
         &lt;name&gt;Queen&lt;/name&gt;
       &lt;/Item&gt;
     &lt;/puppies&gt;
     &lt;flees&gt;
       &lt;FleeItem&gt;
         &lt;size&gt;5&lt;/size&gt;
       &lt;/FleeItem&gt;
       &lt;FleeItem&gt;
         &lt;size&gt;28&lt;/size&gt;
       &lt;/FleeItem&gt;
     &lt;/flees&gt;
   &lt;/Item&gt;
 &lt;/Asset&gt;
&lt;/XnaContent&gt;</pre>
<h3>Optional Parameter</h3>
<p>Another very useful thing is the optional attribute. By adding<em> [ContentSerializerAttribute(Optional = true)]</em> to a managed type member, you can skip it in the xml file if you don&#8217;t need it for an entry and use a standard value instead.</p>
<pre>public class Flee
{
   [ContentSerializerAttribute(Optional = true)]
   public int size = 4;
}</pre>
<p>So much for now, have fun with Automatic XNB Serialisation.</p>
<p>Cheers Volker</p>
<div style="overflow: hidden;width: 1px;height: 1px">[ContentSerializerAttribute(CollectionItemName = "FleeItem")]</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.brightside-games.com/?feed=rss2&amp;p=65</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Zeit² Facebook Page Online</title>
		<link>http://blog.brightside-games.com/?p=28</link>
		<comments>http://blog.brightside-games.com/?p=28#comments</comments>
		<pubDate>Thu, 27 Aug 2009 18:02:52 +0000</pubDate>
		<dc:creator>Thomas Bedenk</dc:creator>
				<category><![CDATA[Press & Media]]></category>
		<category><![CDATA[Zeit²]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[game]]></category>
		<category><![CDATA[website]]></category>

		<guid isPermaLink="false">http://blog.brightside-games.com/?p=28</guid>
		<description><![CDATA[The brand new Zeit² Facebook Fan Page is online.
Check it out an become a fan at http://www.facebook.com/pages/Zeit2/148943270140
]]></description>
			<content:encoded><![CDATA[<p>The brand new Zeit² Facebook Fan Page is online.</p>
<p>Check it out an become a fan at <a title="Zeit² Facebook Page" href="http://www.facebook.com/pages/Zeit2/148943270140" target="_blank">http://www.facebook.com/pages/Zeit2/148943270140</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.brightside-games.com/?feed=rss2&amp;p=28</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
