<?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>Jacob Repp &#187; shmup</title>
	<atom:link href="http://jrepp.com/category/shmup/feed/" rel="self" type="application/rss+xml" />
	<link>http://jrepp.com</link>
	<description>Game programming, music and life</description>
	<lastBuildDate>Fri, 16 Dec 2011 06:03:01 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.4</generator>
		<item>
		<title>XNA Random Terrain Generation Sample Code</title>
		<link>http://jrepp.com/2007/07/19/xna-random-terrain-generation-sample-code/</link>
		<comments>http://jrepp.com/2007/07/19/xna-random-terrain-generation-sample-code/#comments</comments>
		<pubDate>Thu, 19 Jul 2007 00:58:27 +0000</pubDate>
		<dc:creator>proj</dc:creator>
				<category><![CDATA[csharp]]></category>
		<category><![CDATA[game programming]]></category>
		<category><![CDATA[sample code]]></category>
		<category><![CDATA[shmup]]></category>
		<category><![CDATA[xna]]></category>

		<guid isPermaLink="false">http://jrepp.com/2007/07/19/xna-random-terrain-generation-sample-code/</guid>
		<description><![CDATA[I recently received a comment asking for details on the terrain generation algorithm I used in my XNA shoot &#8216;em up proof of concept. Here&#8217;s my edited reply and sample code for anyone interested. It&#8217;s not very complex and it &#8230; <a href="http://jrepp.com/2007/07/19/xna-random-terrain-generation-sample-code/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I recently received a comment asking for details on the terrain generation algorithm I used in my XNA shoot &#8216;em up proof of concept. Here&#8217;s my edited reply and sample code for anyone interested.</p>

<p><img src="http://photos1.blogger.com/photoInclude/blogger2/3211/2667/1600/xna_shmup.jpg"/></p>

<p>It&#8217;s not very complex and it doesn&#8217;t do any culling currently because I didn&#8217;t find that to be a problem given the ammount of terrain samples that I&#8217;m rendering. I generally spend most of my time on the game play first before tweaking the graphics engine.</p>

<p>Here is the code used for generating and rendering the terrain in the screenshots:</p>

<p><a href="http://jrepp.com/code/Terrain.cs" onclick="return top.js.OpenExtLink(window,event,this)" target="_blank">http://jrepp.com/code/Terrain<wbr></wbr>.cs</a></p>

<p>The method used is as follows:</p>

<p>Given a grid of height samples
<ol>
    <li>For some number N</li>
    <li>Choose a random X,Y sample in the grid</li>
    <li>Write a random value into the sample</li>
    <li>Blend that sample with all adjacent samples recursively</li>
</ol>
The blending adds some jitter so you get some variation in the blends but as a rule you can only blend between two samples by so much. I built some tolerances into the blending so that it will never generate height differences that are greater than the [horizontal] distance between two samples.</p>

<p>The verts are colored to get the basic effect of having land and sea.</p>

<p>Overall it&#8217;s a pretty simple algorithm that produces fairly decent looking results.</p>

<p>Please let me know if you have any questions, I&#8217;ll be happy to answer them.</p>
]]></content:encoded>
			<wfw:commentRss>http://jrepp.com/2007/07/19/xna-random-terrain-generation-sample-code/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>XNA BMFont Renderer, Logo and Some Screens</title>
		<link>http://jrepp.com/2006/10/24/thoughts-on-xna-development-and-some-screens/</link>
		<comments>http://jrepp.com/2006/10/24/thoughts-on-xna-development-and-some-screens/#comments</comments>
		<pubDate>Tue, 24 Oct 2006 10:37:36 +0000</pubDate>
		<dc:creator>proj</dc:creator>
				<category><![CDATA[game programming]]></category>
		<category><![CDATA[shmup]]></category>
		<category><![CDATA[xna]]></category>

		<guid isPermaLink="false">http://jrepp.com/2006/10/24/thoughts-on-xna-development-and-some-screens/</guid>
		<description><![CDATA[I&#8217;ll start this post with some XNA dev screenshots: When I was very young I did some coding in logo on an apple II. It has a very simple syntax and was fun to experiment with, a little turtle moved &#8230; <a href="http://jrepp.com/2006/10/24/thoughts-on-xna-development-and-some-screens/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ll start this post with some XNA dev screenshots:</p>

<p><img title="Logo Program Editor" alt="Logo Program Editor" src="http://jrepp.com/imgs/xna_screens/xna_logo_program.png" /></p>

<p><img title="Logo Program Editor Recursive" alt="Logo Program Editor Recursive" src="http://jrepp.com/imgs/xna_screens/xna_logo_program2.png" /></p>

<p>When I was very young I did some coding in <a href="http://en.wikipedia.org/wiki/Logo_turtle">logo</a> on an <a href="http://apple2history.org/history/ah17.html">apple II</a>. It has a very simple syntax and was fun to experiment with, a little turtle moved around the screen as you entered your program. As I was thinking about how to make procedural content for an action game I remembered those old times so I implemented a graphical editor for a simplified logo language interpreter. You use a 360 controller to alter the opcodes and operands and the scene updates in real-time.</p>

<p>I dropped the ziggyware font stuff from my project and went back to using <a href="http://www.angelcode.com/products/bmfont/">BMFont from angelcode</a>. The ziggyware stuff was pretty good but it lacked the precision I wanted and when I noticed that the XNA sprite batch stuff doesn&#8217;t batch the prim submission I was going to have to rewrite that anyways. It took me a little while to write the variable width rendering logic, kerning and line wrapping but now I have more control over the font layout and display. The textures generated from BMFont are very effeciently packed.</p>

<p>Watch out for the SpriteBatch it does not currently do any batching. Every call to draw a quad is a seperate batch. Check it out in PIX. It does however collect all the state changes into  a state block but I&#8217;m not impressed. It&#8217;s really not hard to manage your own collection of quads in a buffer and generate them off the font information. I might share the BMFont renderer at some point. I&#8217;m still working on a level editor right now.</p>
]]></content:encoded>
			<wfw:commentRss>http://jrepp.com/2006/10/24/thoughts-on-xna-development-and-some-screens/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>XNA Shmup Update</title>
		<link>http://jrepp.com/2006/09/28/5/</link>
		<comments>http://jrepp.com/2006/09/28/5/#comments</comments>
		<pubDate>Thu, 28 Sep 2006 08:47:00 +0000</pubDate>
		<dc:creator>proj</dc:creator>
				<category><![CDATA[game programming]]></category>
		<category><![CDATA[shmup]]></category>
		<category><![CDATA[xna]]></category>

		<guid isPermaLink="false">http://blog.jrepp.com/?p=5</guid>
		<description><![CDATA[More progress as of late on the xna based shmup concept. All of the gameplay mentioned in the previous post has been implemented. Some of it is not quite &#8216;fun&#8217; yet. The attack pod makes things entirely too one-sided and &#8230; <a href="http://jrepp.com/2006/09/28/5/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>More progress as of late on the xna based shmup concept. All of the gameplay mentioned in the previous post has been implemented. Some of it is not quite &#8216;fun&#8217; yet. The attack pod makes things entirely too one-sided and most of the weapons need to be tweaked.</p>

<p>Before ragging on the game any more I&#8217;ve gotten a bunch of neat things working. There&#8217;s a few big things that currently don&#8217;t exist in the XNA beta that will bite you as soon as you start to scratch the surface of the framework:
<ul>
    <li>No support for model loading or animation</li>
    <li>No support for fonts or UI</li>
</ul>
So I was pretty much okay with both of these not being there in the beta and just waiting for them to show up in a final version. Well the first thing I stumbled upon was the <a href="http://www.ziggyware.com/readarticle.php?article_id=44">ZiggyWare XNA font generator</a> and associated rendering code. This was super easy to throw into the code, it took me less than an hour to get the fonts support into the scene graph.</p>

<p>I then spent another hour and wrote a very small but usable UI/menuing system. When the debug camera is not enabled the left trigger brings up the menu. You use the DPAD to navigate the menu (A button also opens submenus). Certain items can have &#8216;tweakables&#8217; attached to them which can be either a float, vector3 or vector4 value type. The tweakable fields (3 or 4 for vectors) can be selected using the shoulder buttons. The right analog stick adjusts the value in the field and an update event is sent to an attach IEventTarget object. I use eventing all over the engine already for animations, game logic etc. The one tweakable I have now for example is the LightDir tweakable which is wired to an UpdateLightDirection event on the scene. In the first picture you can see the specular highlights on the water (please excuse cheazy really bad shader code). You can tweak the lighting with the controller to get the desired effect.</p>

<p><a href="http://photos1.blogger.com/blogger2/3211/2667/1600/xna_shmup.jpg"><img border="0" src="http://photos1.blogger.com/blogger2/3211/2667/320/xna_shmup.jpg" /></a>
So then that brings me to the issue of the model loading, which I was also content to let be and just use the standard cubes. I remembered that I had some old 3DS loader code laying around and porting C++ to C# is pretty darn easy IMO so I spent a few hours and ported the 3ds code. There were a few wierd things to work out in the translation but the C++ code was written with some nice abstractions so it went very smootly.</p>

<p>So now I&#8217;ve got some free 3ds models from the web running around in the engine with some more interesting lighting and it&#8217;s actually looking a little bit more decent at this point. The next two shots are just of a free 3ds model I found that is composed of about 16 mesh chunks and has custom basic materials (no textures). To handle the materials I created a MeshMaterialGroup object that accepts the material with face indexes from the loader and resolves the faces into prim indexes. When you call Mesh.SubmitPrimitives() it looks to see if it has any material groups and if so it submits them in order instead of sumbitting the entire prim batch for the whole mesh.</p>

<p>Close ups of 3ds model:
<img src="http://photos1.blogger.com/blogger2/3211/2667/320/xna_shmup2.jpg" />
<img src="http://photos1.blogger.com/blogger2/3211/2667/320/xna_shmup3.jpg" /></p>
]]></content:encoded>
			<wfw:commentRss>http://jrepp.com/2006/09/28/5/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>XNA Shmup</title>
		<link>http://jrepp.com/2006/09/23/6/</link>
		<comments>http://jrepp.com/2006/09/23/6/#comments</comments>
		<pubDate>Sat, 23 Sep 2006 10:27:00 +0000</pubDate>
		<dc:creator>proj</dc:creator>
				<category><![CDATA[game programming]]></category>
		<category><![CDATA[shmup]]></category>
		<category><![CDATA[xna]]></category>

		<guid isPermaLink="false">http://blog.jrepp.com/?p=6</guid>
		<description><![CDATA[So for anyone who cares and hasn&#8217;t heard me rant about what I wanted to do with the XNA stuff I&#8217;ll just explain it now. Ryan inspired me to go in the direction of a shmup, I have wanted to &#8230; <a href="http://jrepp.com/2006/09/23/6/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>So for anyone who cares and hasn&#8217;t heard me rant about what I wanted to do with the XNA stuff I&#8217;ll just explain it now. Ryan inspired me to go in the direction of a shmup, I have wanted to do one for a long time but this new framework seems ideally suited to a game like this. There isn&#8217;t any particular art style or theme set atm so I&#8217;m just laying out some really basic shmup gameplay elements that are pretty much &#8216;required&#8217; to have a respectable game. One of the key ideas though is to completely leverage the 360 controller. I want to have a very natural action mapping to the controller that makes sense and gives you more control than simply shoot and move.</p>

<p>A few concepts that I am borrowing for the GD are:
<ul>
    <li>Roll defense from <a href="http://starfox.com/">starfox</a></li>
    <li>Polarized attack for the enemies ala <a href="http://en.wikipedia.org/wiki/Ikaruga">ikaruga</a> (radiant silvergun), the difference here is that ground targets must be bombed, squigies must be railed with mass driver weapons and conventially shielded enemies require beam weapons.</li>
    <li>All weapons are effective against all enemies but certain weaons are much more effective. This technique is vital to survival.</li>
    <li>Ability to equip a small pod that can has limited controlled and it&#8217;s own set of upgrades.</li>
    <li>Clip/reload system for mass drivers/bombs, energy system for beam weapons. Ammo is plentiful but must actually be collected and you cannot hold the fire button the whole time.Here&#8217;s a screenshot debugging one of the triggers for a mob spawn and the new bullet system:</p>

<p><img src="http://photos1.blogger.com/blogger2/3211/2667/320/xna_world2.jpg" /></p>

<p>Again, not very impressive looking (it looks better in action) but I&#8217;ll just layout a few of the things that are working now.</li>
    <li>Follow camera</li>
    <li>Scene trigger system that can fire proximity events</li>
    <li>Mob controller with spawn/death management (hooked to trigger system)</li>
    <li>Mob action scripting pcodes with time driven events (Fire, Rotate, Change properties etc)</li>
    <li>Random terrain generator</li>
</ul>
I&#8217;m not trying to do a fully polished game currently. Just something that starts up allows you to play through a random level with increasing difficulty and records your high score. I will probably implement a few different types of weapons as well.</p>

<p>I don&#8217;t know if I want to finish it all in one shot.. I have to get back to some other stuff.. really <img src='http://jrepp.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://jrepp.com/2006/09/23/6/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>XNA: Yes I&#8217;m a Bit Addicted Now</title>
		<link>http://jrepp.com/2006/09/23/7/</link>
		<comments>http://jrepp.com/2006/09/23/7/#comments</comments>
		<pubDate>Sat, 23 Sep 2006 02:47:00 +0000</pubDate>
		<dc:creator>proj</dc:creator>
				<category><![CDATA[game programming]]></category>
		<category><![CDATA[shmup]]></category>
		<category><![CDATA[xna]]></category>

		<guid isPermaLink="false">http://blog.jrepp.com/?p=7</guid>
		<description><![CDATA[This stuff is really nice. I&#8217;m actually a bit addicted to the whole thing. I finally got some shader issues sorted out. I have a few very basic shaders right now, one that renders color coded normals for debugging purposes &#8230; <a href="http://jrepp.com/2006/09/23/7/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>This stuff is really nice. I&#8217;m actually a bit addicted to the whole thing. I finally got some shader issues sorted out. I have a few very basic shaders right now, one that renders color coded normals for debugging purposes and one that does a single directional light and diffuse shading. I picked up <a href="http://www.charlesriver.com/Books/BookDetail.aspx?productID=87398">a good shader book</a> and a new <a href="http://www.princetongraphics.com/product_lcd2008w.htm">20&#8243; LCD</a> yesterday when I was hanging out with Mike. Here&#8217;s a spinning cube inside a procedural landscape.</p>

<p><img src="http://photos1.blogger.com/blogger2/3211/2667/320/xna_world.jpg" /></p>
]]></content:encoded>
			<wfw:commentRss>http://jrepp.com/2006/09/23/7/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

