<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-9293400</id><updated>2011-10-12T09:44:04.422-07:00</updated><title type='text'>Storyteller Software</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://storytellersoftware.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9293400/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://storytellersoftware.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>George W. Clingerman</name><uri>http://www.blogger.com/profile/00097708175900324725</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>12</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-9293400.post-113185580075996939</id><published>2005-11-12T20:12:00.000-08:00</published><updated>2006-04-11T11:09:32.133-07:00</updated><title type='text'>Learning a lot about creating graphics...FINALLY!</title><content type='html'>Well, it's been a while but I'm finally getting to the point where I can created some decent images using graphic software. This is a Goblin warrior I created using &lt;a href="http://www.gimp.org/"&gt;Gimp&lt;/a&gt;. I'm getting to the point where I can actually create images like this one in just an hour or so.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/2726/671/1600/Goblin.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger/2726/671/320/Goblin.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;"Goblin Warrior"&lt;/div&gt;&lt;br /&gt;Also, I did the testing on the line class (suggested by ZMan) and I hope to post those results sometime this week as well (for those of you who don't want to wait for those, he was right, doing the draws in a batch was faster).&lt;br /&gt;&lt;br /&gt;Anway, I'm still working on the game, still trying to blog my progress (ever so slowly) and hopefully my research and work at figuring out how to use Managed DirectX to created a 2D game will benefit others as well.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9293400-113185580075996939?l=storytellersoftware.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://storytellersoftware.blogspot.com/feeds/113185580075996939/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9293400&amp;postID=113185580075996939' title='9 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9293400/posts/default/113185580075996939'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9293400/posts/default/113185580075996939'/><link rel='alternate' type='text/html' href='http://storytellersoftware.blogspot.com/2005/11/learning-lot-about-creating.html' title='Learning a lot about creating graphics...FINALLY!'/><author><name>George W. Clingerman</name><uri>http://www.blogger.com/profile/00097708175900324725</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>9</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9293400.post-113025200693309730</id><published>2005-10-25T07:36:00.000-07:00</published><updated>2005-10-25T08:46:22.133-07:00</updated><title type='text'>Creating a Line in Managed DirectX</title><content type='html'>Well, I finally saw a question I thought I could answer in the Microsoft forums. A guy was asking how to easily create a Line in DirectX and I thought for sure I knew the answer. I thought you would just create a square from two triangles. I was going to make a really slick line class and deliver the solution too him. I had even began the development.&lt;br /&gt;&lt;br /&gt;Then I rechecked the forums and Andy the ZMan had already answered the guys question with a short one liner. Use the Line class. What??!? There's a line class? Started looking around and what do you know? There's actually a line class.&lt;br /&gt;&lt;br /&gt;I wrote up some sample code using the line class and then posted it to the forums and I casually tossed out that I would wrap all those steps in a line function to make it easier to work with the DirectX Line class.&lt;br /&gt;&lt;br /&gt;Now, I've went one step further. Below is the code I've written to wrap the Line class in the simplest sense, to make it very easier to create and render a line.&lt;br /&gt;&lt;br /&gt;&lt;font color="Green"&gt;'Description: Microsoft.DirectX.Direct3D.Line class wrapper to make it easier to &lt;/font&gt; &lt;br&gt;&lt;font color="Green"&gt;'&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;   work with and manipulates Lines &lt;/font&gt; &lt;br&gt;&lt;font color="Blue"&gt;Public&lt;/font&gt; &lt;font color="Blue"&gt;Class&lt;/font&gt; DXLine &lt;br&gt; &lt;br&gt;    &lt;font color="Green"&gt;'Line object &lt;/font&gt; &lt;br&gt;    &lt;font color="Blue"&gt;Private&lt;/font&gt; mLine &lt;font color="Blue"&gt;As&lt;/font&gt; Microsoft.DirectX.Direct3D.Line &lt;br&gt; &lt;br&gt;    &lt;font color="Green"&gt;'Starting point for the line &lt;/font&gt; &lt;br&gt;    &lt;font color="Blue"&gt;Private&lt;/font&gt; mStartPoint &lt;font color="Blue"&gt;As&lt;/font&gt; Point &lt;br&gt;    &lt;font color="Blue"&gt;Public&lt;/font&gt; &lt;font color="Blue"&gt;Property&lt;/font&gt; StartPoint() &lt;font color="Blue"&gt;As&lt;/font&gt; Point &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;   &lt;font color="Blue"&gt;Get&lt;/font&gt; &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;  &lt;font color="Blue"&gt;Return&lt;/font&gt; mStartPoint &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;   &lt;font color="Blue"&gt;End&lt;/font&gt; &lt;font color="Blue"&gt;Get&lt;/font&gt; &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;   &lt;font color="Blue"&gt;Set&lt;/font&gt;(&lt;font color="Blue"&gt;ByVal&lt;/font&gt; Value &lt;font color="Blue"&gt;As&lt;/font&gt; Point) &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;  mStartPoint = Value &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;   &lt;font color="Blue"&gt;End&lt;/font&gt; &lt;font color="Blue"&gt;Set&lt;/font&gt; &lt;br&gt;    &lt;font color="Blue"&gt;End&lt;/font&gt; &lt;font color="Blue"&gt;Property&lt;/font&gt; &lt;br&gt; &lt;br&gt;    &lt;font color="Green"&gt;'Ending point for the line &lt;/font&gt; &lt;br&gt;    &lt;font color="Blue"&gt;Private&lt;/font&gt; mEndPoint &lt;font color="Blue"&gt;As&lt;/font&gt; Point &lt;br&gt;    &lt;font color="Blue"&gt;Public&lt;/font&gt; &lt;font color="Blue"&gt;Property&lt;/font&gt; EndPoint() &lt;font color="Blue"&gt;As&lt;/font&gt; Point &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;   &lt;font color="Blue"&gt;Get&lt;/font&gt; &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;  &lt;font color="Blue"&gt;Return&lt;/font&gt; mEndPoint &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;   &lt;font color="Blue"&gt;End&lt;/font&gt; &lt;font color="Blue"&gt;Get&lt;/font&gt; &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;   &lt;font color="Blue"&gt;Set&lt;/font&gt;(&lt;font color="Blue"&gt;ByVal&lt;/font&gt; Value &lt;font color="Blue"&gt;As&lt;/font&gt; Point) &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;  mEndPoint = Value &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;   &lt;font color="Blue"&gt;End&lt;/font&gt; &lt;font color="Blue"&gt;Set&lt;/font&gt; &lt;br&gt;    &lt;font color="Blue"&gt;End&lt;/font&gt; &lt;font color="Blue"&gt;Property&lt;/font&gt; &lt;br&gt; &lt;br&gt;    &lt;font color="Green"&gt;'Width of the line &lt;/font&gt; &lt;br&gt;    &lt;font color="Blue"&gt;Private&lt;/font&gt; mWidth &lt;font color="Blue"&gt;As&lt;/font&gt; &lt;font color="Blue"&gt;Integer&lt;/font&gt; &lt;br&gt;    &lt;font color="Blue"&gt;Public&lt;/font&gt; &lt;font color="Blue"&gt;Property&lt;/font&gt; Width() &lt;font color="Blue"&gt;As&lt;/font&gt; &lt;font color="Blue"&gt;Integer&lt;/font&gt; &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;   &lt;font color="Blue"&gt;Get&lt;/font&gt; &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;  &lt;font color="Blue"&gt;Return&lt;/font&gt; mWidth &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;   &lt;font color="Blue"&gt;End&lt;/font&gt; &lt;font color="Blue"&gt;Get&lt;/font&gt; &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;   &lt;font color="Blue"&gt;Set&lt;/font&gt;(&lt;font color="Blue"&gt;ByVal&lt;/font&gt; Value &lt;font color="Blue"&gt;As&lt;/font&gt; &lt;font color="Blue"&gt;Integer&lt;/font&gt;) &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;  mWidth = Value &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;   &lt;font color="Blue"&gt;End&lt;/font&gt; &lt;font color="Blue"&gt;Set&lt;/font&gt; &lt;br&gt;    &lt;font color="Blue"&gt;End&lt;/font&gt; &lt;font color="Blue"&gt;Property&lt;/font&gt; &lt;br&gt; &lt;br&gt;    &lt;font color="Green"&gt;'Color for the line &lt;/font&gt; &lt;br&gt;    &lt;font color="Blue"&gt;Private&lt;/font&gt; mColor &lt;font color="Blue"&gt;As&lt;/font&gt; System.Drawing.Color &lt;br&gt;    &lt;font color="Blue"&gt;Public&lt;/font&gt; &lt;font color="Blue"&gt;Property&lt;/font&gt; Color() &lt;font color="Blue"&gt;As&lt;/font&gt; System.Drawing.Color &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;   &lt;font color="Blue"&gt;Get&lt;/font&gt; &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;  &lt;font color="Blue"&gt;Return&lt;/font&gt; mColor &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;   &lt;font color="Blue"&gt;End&lt;/font&gt; &lt;font color="Blue"&gt;Get&lt;/font&gt; &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;   &lt;font color="Blue"&gt;Set&lt;/font&gt;(&lt;font color="Blue"&gt;ByVal&lt;/font&gt; Value &lt;font color="Blue"&gt;As&lt;/font&gt; System.Drawing.Color) &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;  mColor = Value &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;   &lt;font color="Blue"&gt;End&lt;/font&gt; &lt;font color="Blue"&gt;Set&lt;/font&gt; &lt;br&gt;    &lt;font color="Blue"&gt;End&lt;/font&gt; &lt;font color="Blue"&gt;Property&lt;/font&gt; &lt;br&gt; &lt;br&gt;    &lt;font color="Green"&gt;'Line class constructor &lt;/font&gt; &lt;br&gt;    &lt;font color="Blue"&gt;Public&lt;/font&gt; &lt;font color="Blue"&gt;Sub&lt;/font&gt; &lt;font color="Blue"&gt;New&lt;/font&gt;(&lt;font color="Blue"&gt;ByVal&lt;/font&gt; startPoint &lt;font color="Blue"&gt;As&lt;/font&gt; Point, &lt;font color="Blue"&gt;ByVal&lt;/font&gt; endPoint &lt;font color="Blue"&gt;As&lt;/font&gt; Point, &lt;font color="Blue"&gt;ByVal&lt;/font&gt; width &lt;font color="Blue"&gt;As&lt;/font&gt; Integer, &lt;font color="Blue"&gt;ByVal&lt;/font&gt; color &lt;font color="Blue"&gt;As&lt;/font&gt; System.Drawing.Color, &lt;font color="Blue"&gt;ByVal&lt;/font&gt; dxDevice &lt;font color="Blue"&gt;As&lt;/font&gt; Microsoft.DirectX.Direct3D.Device) &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;   &lt;font color="Green"&gt;'Store the data passed into the class constructor &lt;/font&gt; &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;   mStartPoint = startPoint &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;   mEndPoint = endPoint &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;   mWidth = width &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;   mColor = color &lt;br&gt; &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;   &lt;font color="Green"&gt;'Create the line object &lt;/font&gt; &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;   mLine = &lt;font color="Blue"&gt;New&lt;/font&gt; Microsoft.DirectX.Direct3D.Line(dxDevice) &lt;br&gt; &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;   &lt;font color="Green"&gt;'Automatically antialias the line &lt;/font&gt; &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;   mLine.Antialias = &lt;font color="Blue"&gt;True&lt;/font&gt; &lt;br&gt;    &lt;font color="Blue"&gt;End&lt;/font&gt; &lt;font color="Blue"&gt;Sub&lt;/font&gt; &lt;br&gt; &lt;br&gt;    &lt;font color="Green"&gt;'Draw the line using the current class values for starpoint, endpoint, width and color &lt;/font&gt; &lt;br&gt;    &lt;font color="Blue"&gt;Public&lt;/font&gt; &lt;font color="Blue"&gt;Sub&lt;/font&gt; Draw() &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;   &lt;font color="Green"&gt;'Give the line it's width&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt; &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;   mLine.Width = Width &lt;br&gt; &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;   &lt;font color="Green"&gt;'Render the line &lt;/font&gt; &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;   mLine.Begin() &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;   mLine.Draw(LineVectors, Color) &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;   mLine.&lt;font color="Blue"&gt;End&lt;/font&gt;() &lt;br&gt;    &lt;font color="Blue"&gt;End&lt;/font&gt; &lt;font color="Blue"&gt;Sub&lt;/font&gt; &lt;br&gt; &lt;br&gt;    &lt;font color="Green"&gt;'Construct the Line Vectors based on the Start and End Points &lt;/font&gt; &lt;br&gt;    &lt;font color="Blue"&gt;Private&lt;/font&gt; &lt;font color="Blue"&gt;Function&lt;/font&gt; LineVectors() &lt;font color="Blue"&gt;As&lt;/font&gt; Microsoft.DirectX.Vector2() &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;   &lt;font color="Green"&gt;'Vector object (for passing startpoint and endpoint into Line.Draw function) &lt;/font&gt; &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;   &lt;font color="Blue"&gt;Dim&lt;/font&gt; aLineVectors(1) &lt;font color="Blue"&gt;As&lt;/font&gt; Microsoft.DirectX.Vector2 &lt;br&gt; &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;   &lt;font color="Green"&gt;'Set the starting point of the line &lt;/font&gt; &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;   aLineVectors(0).X = StartPoint.X &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;   aLineVectors(0).Y = StartPoint.Y &lt;br&gt; &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;   &lt;font color="Green"&gt;'Set the end point of the line &lt;/font&gt; &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;   aLineVectors(1).X = EndPoint.X &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;   aLineVectors(1).Y = EndPoint.Y &lt;br&gt; &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;   &lt;font color="Blue"&gt;Return&lt;/font&gt; aLineVectors &lt;br&gt;    &lt;font color="Blue"&gt;End&lt;/font&gt; &lt;font color="Blue"&gt;Function&lt;/font&gt; &lt;br&gt; &lt;br&gt;&lt;font color="Blue"&gt;End&lt;/font&gt; &lt;font color="Blue"&gt;Class&lt;/font&gt; &lt;br&gt; &lt;br /&gt;&lt;br /&gt;So basically to use this class, I first create a line object in my Main module when I'm initializing all my DX objects. Then during my Render code I just call the objects .Draw method and that's it, a Line will be drawn to your scene.&lt;br /&gt;&lt;br /&gt;&lt;font color="Blue"&gt;Module&lt;/font&gt; Main &lt;br&gt; &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="Blue"&gt;Private&lt;/font&gt; mLine &lt;font color="Blue"&gt;As&lt;/font&gt; DXLine &lt;br&gt; &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="Blue"&gt;Public&lt;/font&gt; &lt;font color="Blue"&gt;Sub&lt;/font&gt; Main &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;... &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;.... &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;mLine = &lt;font color="Blue"&gt;New&lt;/font&gt; DXLine(&lt;font color="Blue"&gt;New&lt;/font&gt; Point(5, 100), &lt;font color="Blue"&gt;New&lt;/font&gt; Point(5, 300), 10, System.Drawing.Color.BurlyWood, mDXEngine.myDevice) &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;.. &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;.... &lt;br&gt; &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="Blue"&gt;Do&lt;/font&gt; &lt;font color="Blue"&gt;While&lt;/font&gt; GameOver = &lt;font color="Blue"&gt;False&lt;/font&gt; &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;... &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;.... &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="Blue"&gt;Call&lt;/font&gt; Render() &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Application.DoEvents() &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;... &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;.... &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="Blue"&gt;Loop&lt;/font&gt; &lt;font color="Green"&gt;'While GameOver = False &lt;/font&gt; &lt;br&gt; &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;... &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;.... &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="Blue"&gt;End&lt;/font&gt; &lt;font color="Blue"&gt;Sub&lt;/font&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="Blue"&gt;Public&lt;/font&gt; &lt;font color="Blue"&gt;Sub&lt;/font&gt; Render() &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;... &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;.... &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="Green"&gt;'Draw the line &lt;/font&gt; &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;mLine.Draw &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;... &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;.... &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="Blue"&gt;End&lt;/font&gt; &lt;font color="Blue"&gt;Sub&lt;/font&gt; &lt;br&gt; &lt;br&gt;&lt;font color="Blue"&gt;End&lt;/font&gt; &lt;font color="Blue"&gt;Module&lt;/font&gt; &lt;br&gt;&lt;br /&gt;&lt;br /&gt;Hopefully that helps someone, it's a pretty simple implementation, but I think that I will be using it a bit.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9293400-113025200693309730?l=storytellersoftware.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://storytellersoftware.blogspot.com/feeds/113025200693309730/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9293400&amp;postID=113025200693309730' title='50 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9293400/posts/default/113025200693309730'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9293400/posts/default/113025200693309730'/><link rel='alternate' type='text/html' href='http://storytellersoftware.blogspot.com/2005/10/creating-line-in-managed-directx.html' title='Creating a Line in Managed DirectX'/><author><name>George W. Clingerman</name><uri>http://www.blogger.com/profile/00097708175900324725</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>50</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9293400.post-112930631537750165</id><published>2005-10-14T09:05:00.000-07:00</published><updated>2005-10-14T09:11:55.383-07:00</updated><title type='text'>My Background is Scrolling like a Champ</title><content type='html'>Well, I quickly created my background graphics last night. Made some changes to my Background class and I now have a successfully scrolling background.&lt;br /&gt;&lt;br /&gt;One thing I like about my background class is that I really tried to make an effot to make it very reusable for future projects. It will take any number of background images that comprise your background and scroll through them properly. &lt;br /&gt;&lt;br /&gt;The code isn't really that impressive, but I like that fact that I can change what backgrounds are scrolling just by passing in new images to the class.&lt;br /&gt;&lt;br /&gt;Looking the the DevExpress metrics for my class though, I do have 3 functions that have unacceptable complexity (I try to keep everything below 100 and these three are above 300) so I want to work on lowering their complexity before I post my class code.&lt;br /&gt;&lt;br /&gt;&lt;img src="http://i16.photobucket.com/albums/b50/clingermangw/Background1.jpg" alt="Image hosted by Photobucket.com"&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9293400-112930631537750165?l=storytellersoftware.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://storytellersoftware.blogspot.com/feeds/112930631537750165/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9293400&amp;postID=112930631537750165' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9293400/posts/default/112930631537750165'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9293400/posts/default/112930631537750165'/><link rel='alternate' type='text/html' href='http://storytellersoftware.blogspot.com/2005/10/my-background-is-scrolling-like-champ.html' title='My Background is Scrolling like a Champ'/><author><name>George W. Clingerman</name><uri>http://www.blogger.com/profile/00097708175900324725</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9293400.post-112915172645050304</id><published>2005-10-12T14:00:00.000-07:00</published><updated>2005-10-12T14:15:26.460-07:00</updated><title type='text'>Getting back to development...</title><content type='html'>Well, in an effort to get back to doing some actual development and quit monkeying around with Paintshop so much, I've laid out some simple goals so that I don't overextend myself creating oodles of art and not doing any actual development.&lt;br /&gt;&lt;br /&gt;1. Create animations for the main character,&lt;br /&gt;This will consist of 2 different sets of animation, approximately 5 frames each.&lt;br /&gt;&lt;br /&gt;a. Walking left to right&lt;br /&gt;b. Attacking&lt;br /&gt;&lt;br /&gt;2. Create the Level 1 background.&lt;br /&gt;&lt;br /&gt;I had this finished at one point, but I created it in basic paint so the quality was definitely not there. So I plan on recreating this using Paint Shop pro (and take advantage of its WONDERFUL WONDERFUL layers!!!)&lt;br /&gt;&lt;br /&gt;So I have approximately, 11 graphics to create. Then, once those graphics are done, I have the following plans.&lt;br /&gt;&lt;br /&gt;3. Have the game start with loading the background without the character and displaying the "Level 1 (press any key to start)" text in black (using DrawText I'm guessing)&lt;br /&gt;&lt;br /&gt;4. After user presses key, make a game start sound and draw the character on the screen. &lt;br /&gt;&lt;br /&gt;5. Begin playing a background track (most likely a free one from the web for now)&lt;br /&gt;&lt;br /&gt;6. User can walk to the right (and back up by moving left)&lt;br /&gt;&lt;br /&gt;7. Allow the user to walk and begin scrolling the background when appropriate.&lt;br /&gt;&lt;br /&gt;8. Display "Success!" once the user has walked to the end and off the level.&lt;br /&gt;&lt;br /&gt;With these plans, I'm hoping to limit the amount of time spent creating character animations (later I'll want to add Jump, Take Damage, Duck, etc) so that I can get back to actually doing some more Managed DirectX development.&lt;br /&gt;&lt;br /&gt;I'll post some character shots after I get them done as well so you can see when I'm moving from the initial graphic stage into tackling some new development.&lt;br /&gt;&lt;br /&gt;I'm really looking forward to doing the music and text pieces as well since I haven't actually coded anything for those pieces yet in Managed DirectX.&lt;br /&gt;&lt;br /&gt;Then once, I get that level 1 initial round of coding done, I'll try and post some more complete examples of how my classes and code actually work.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9293400-112915172645050304?l=storytellersoftware.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://storytellersoftware.blogspot.com/feeds/112915172645050304/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9293400&amp;postID=112915172645050304' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9293400/posts/default/112915172645050304'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9293400/posts/default/112915172645050304'/><link rel='alternate' type='text/html' href='http://storytellersoftware.blogspot.com/2005/10/getting-back-to-development.html' title='Getting back to development...'/><author><name>George W. Clingerman</name><uri>http://www.blogger.com/profile/00097708175900324725</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9293400.post-112817962786103156</id><published>2005-10-01T08:07:00.000-07:00</published><updated>2005-10-01T08:13:47.870-07:00</updated><title type='text'>Ye Olde Weapon Shop</title><content type='html'>I've started spending a lot of time on the intro and first level of my game. In doing so I've had to spend a lot of time learning how to use Jasc Paint Shop Pro 8 (I've never used anything other than the default paint program before). At first I got so frustrated I felt like I should just draw everything by hand, scan it in and then edit my scanned images, but I think I'm starting to get the hang of things now. &lt;br /&gt;&lt;br /&gt;&lt;img src="http://i16.photobucket.com/albums/b50/clingermangw/WeaponShop2.jpg" alt="Image hosted by Photobucket.com" /&gt;&lt;br /&gt;&lt;br /&gt;I'm pretty happy with the way this turned out. The Weapon Shop looks exactly how I was picturing it in my head and I was able to create it in the same graphic style I want to use for the whole game.&lt;br /&gt;&lt;br /&gt;I'll try and post some other graphic samples as I get them completed and then hopefully I can get back to the coding. I only plan on doing the graphics needed for the first level and for the game introduction (and both are rather small in scale) so soon I will be able to focus once again on 2D game development with Managed DirectX.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9293400-112817962786103156?l=storytellersoftware.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://storytellersoftware.blogspot.com/feeds/112817962786103156/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9293400&amp;postID=112817962786103156' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9293400/posts/default/112817962786103156'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9293400/posts/default/112817962786103156'/><link rel='alternate' type='text/html' href='http://storytellersoftware.blogspot.com/2005/10/ye-olde-weapon-shop.html' title='Ye Olde Weapon Shop'/><author><name>George W. Clingerman</name><uri>http://www.blogger.com/profile/00097708175900324725</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9293400.post-112629211889024290</id><published>2005-09-09T11:50:00.000-07:00</published><updated>2005-09-09T11:55:18.896-07:00</updated><title type='text'>Creating the 2D Graphics: The unstoppable blackhole of time</title><content type='html'>Well, I've been learning some about animating 2D characters. I understand now why people hire artists to do the work for them. One, it's very time consuming and two, you begin to realize you're not very good and to take the time to become good takes away the time from development so number two is basically the same as number one, it's time consuming.&lt;br /&gt;&lt;br /&gt;I'm hoping to get some screenshots up soon of some of my in game graphics. I'm also hoping that I'm doing the animations right. So far, how I'm accomplishing animation is just loading up a different texture (or a new section of a texture) that has the same graphic with some slight changes.&lt;br /&gt;&lt;br /&gt;This becomes kind of like flipping through once of those stick pencil flipbooks. So when you start walking a character you start cycling through the textures to simulate his movement while walking. &lt;br /&gt;&lt;br /&gt;When the player stops walking, you revert back to your standing still texture. &lt;br /&gt;&lt;br /&gt;Anyway, hoping to get some screenshots up soon as well as get some more code posted.&lt;br /&gt;&lt;br /&gt;It's just unbelievable the number of images needed for each type of movement. Even for creating dropped items like coins. If you want them to have some type of glimmer or such, yep, need a couple of images for each item. Like I said, time consuming.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9293400-112629211889024290?l=storytellersoftware.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://storytellersoftware.blogspot.com/feeds/112629211889024290/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9293400&amp;postID=112629211889024290' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9293400/posts/default/112629211889024290'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9293400/posts/default/112629211889024290'/><link rel='alternate' type='text/html' href='http://storytellersoftware.blogspot.com/2005/09/creating-2d-graphics-unstoppable.html' title='Creating the 2D Graphics: The unstoppable blackhole of time'/><author><name>George W. Clingerman</name><uri>http://www.blogger.com/profile/00097708175900324725</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9293400.post-112612693346525747</id><published>2005-09-07T13:56:00.000-07:00</published><updated>2005-09-07T14:02:13.466-07:00</updated><title type='text'>Background Class</title><content type='html'>Well, I didn't finish my background class like I thought I would this weekend. A recent purchase kind of got in the way (Guild Wars is awesome!)&lt;br /&gt;&lt;br /&gt;But I have thought about somethings that it needs to be able to do so I thought I would jot some of those thoughts down here.&lt;br /&gt;&lt;br /&gt;1. Autoscroll flag - basically sometimes you want the background to autoscroll and sometimes you don't.&lt;br /&gt;&lt;br /&gt;2. Wrap textures flag - sometimes you want to keep cycling through your background textures and sometimes you don't.&lt;br /&gt;&lt;br /&gt;3. Multiple background textures - break the level up into smaller graphics&lt;br /&gt;&lt;br /&gt;4. Horizontal Scroll/Vertical scroll - able to scroll backgrounds horizontally or vertically depending on game and level.&lt;br /&gt;&lt;br /&gt;So currnetly I have the ability to autoscroll a single background image horizontally continuously. Still a ways to go to provide all the other functionality.&lt;br /&gt;&lt;br /&gt;Still pretty cool that it's working though. I had some fun with it thise weekend by having my son draw a background on paper and then draw some characters on another paper. We scanned those in, I added them to the game and viola his litte guy he drew was now walking all around the background he drew. He thought that was pretty cool!&lt;br /&gt;&lt;br /&gt;Maybe I'll post up some pictures of that later.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9293400-112612693346525747?l=storytellersoftware.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://storytellersoftware.blogspot.com/feeds/112612693346525747/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9293400&amp;postID=112612693346525747' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9293400/posts/default/112612693346525747'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9293400/posts/default/112612693346525747'/><link rel='alternate' type='text/html' href='http://storytellersoftware.blogspot.com/2005/09/background-class.html' title='Background Class'/><author><name>George W. Clingerman</name><uri>http://www.blogger.com/profile/00097708175900324725</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9293400.post-112576430271845077</id><published>2005-09-03T09:11:00.000-07:00</published><updated>2005-09-07T13:53:18.930-07:00</updated><title type='text'>Scrolling a 2D Background: Trouble a brewing!</title><content type='html'>Well, after doing the post yesterday with a small little code sample of how I was scrolling my 2D background, I stumbled across a LITTLE problem.&lt;br /&gt;&lt;br /&gt;I began working on my project on another computer and lo and behold the Managed DirectX function Draw2D was not recognized.&lt;br /&gt;&lt;br /&gt;So I'm going to have to do some research into which computer has the newest DirectX 9 dlls and figure out wether Draw2D will be in the final relase or will not be in the final release. Until then, I have fixed my code using the standard Draw function which is seems to work fine in both versions.&lt;br /&gt;&lt;br /&gt;I'll update my final findings on this matter once it has been cleared up for me.&lt;br /&gt;&lt;br /&gt;Drawing the 2D background using the standard Draw function.&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&lt;span style='color:green'&gt;'Scroll and draw the Background&lt;/span&gt;&lt;br /&gt;&lt;span style='color:blue'&gt;Public Sub&lt;/span&gt; Draw()&lt;br /&gt;&amp;nbsp; &amp;nbsp; mBackgroundSprite.Begin(SpriteFlags.AlphaBlend)&lt;br /&gt;&amp;nbsp; &amp;nbsp; mBackgroundTextureSize = &lt;span style='color:blue'&gt;New &lt;/span&gt;Rectangle(mXPosition, _&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 0, mWidth, mHeight)&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; mBackgroundSprite.Draw(mBackgroundSpriteTexture, _&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; mBackgroundTextureSize(0), &lt;span style='color:blue'&gt;New&lt;/span&gt; Vector3(0, 0, 0), _&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style='color:blue'&gt;New&lt;/span&gt; Vector3(0, 0, 0), TransparentColor)&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; mBackgroundSprite.End()&lt;br /&gt;&amp;nbsp; &amp;nbsp; mXPosition += 1&lt;br /&gt;&lt;span style='color:blue'&gt;End Sub&lt;/span&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Basically using the Draw function is very similar to using the Draw2D function, you'rejust passingin vectors now instead of a point.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9293400-112576430271845077?l=storytellersoftware.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://storytellersoftware.blogspot.com/feeds/112576430271845077/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9293400&amp;postID=112576430271845077' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9293400/posts/default/112576430271845077'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9293400/posts/default/112576430271845077'/><link rel='alternate' type='text/html' href='http://storytellersoftware.blogspot.com/2005/09/scrolling-2d-background-trouble.html' title='Scrolling a 2D Background: Trouble a brewing!'/><author><name>George W. Clingerman</name><uri>http://www.blogger.com/profile/00097708175900324725</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9293400.post-112569846982456775</id><published>2005-09-02T08:28:00.000-07:00</published><updated>2005-09-09T08:46:37.736-07:00</updated><title type='text'>Scrolling a 2D Background</title><content type='html'>The first hurdle I encountered when working on a 2D game with Managed DirectX WITHOUT using DirectDraw was trying to figure out just how in the world to scroll a 2D background.&lt;br /&gt;&lt;br /&gt;Luckily I was pointed towards the &lt;a href="http://forums.microsoft.com/msdn/ShowForum.aspx?ForumID=106"&gt;MSDN DirectX forums&lt;/a&gt; and asked just that &lt;a href="http://forums.microsoft.com/msdn/ShowPost.aspx?PostID=78283"&gt;question&lt;/a&gt; and was immediately provided with a solution. After examining the &lt;a href="http://www.ircomm.net/blogs/mykre/archive/2005/04/26/280.aspx"&gt;code example provided&lt;/a&gt;, I was able to adapt it for my own needs and get my 2D background scrolling.&lt;br /&gt;&lt;br /&gt;Basically the important parts of my code to create an auto-scrolling 2D background in Managed DirectX are shown below in a Draw sub of a Background class I created.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&lt;span style='color:blue'&gt;Public Sub&lt;/span&gt; Draw()&lt;br /&gt;&amp;nbsp; &amp;nbsp; mBackgroundSprite.Begin(SpriteFlags.AlphaBlend)&lt;br /&gt;&amp;nbsp;   &amp;nbsp; &lt;span style='color:green'&gt;'Change the X position of the texture size. This will keep &lt;/span&gt;&lt;br /&gt;&amp;nbsp;  &amp;nbsp; &lt;span style='color:green'&gt;'changing the portion of the texture that is drawn to the screen &lt;/span&gt;&lt;br /&gt;&amp;nbsp;  &amp;nbsp; mBackgroundTextureSize = &lt;span style='color:blue'&gt;New&lt;/span&gt; Rectangle(mXPosition, 0, mWidth, mHeight)&lt;br /&gt;&amp;nbsp;  &amp;nbsp; mBackgroundSprite.Draw2D(mBackgroundSpriteTexture, _&lt;br /&gt;&amp;nbsp;  &amp;nbsp;  &amp;nbsp; mBackgroundTextureSize, mBackgroundTextureSize, _&lt;br /&gt;&amp;nbsp;  &amp;nbsp;  &amp;nbsp; &lt;span style='color:blue'&gt;New&lt;/span&gt; Point(0, 0), TransparentColor.ToArgb)&lt;br /&gt;&amp;nbsp;  &amp;nbsp; mBackgroundSprite.End&lt;br /&gt;&lt;br /&gt;         &amp;nbsp;  &amp;nbsp; mXPosition += 1&lt;br /&gt; &lt;span style='color:blue'&gt;  End Sub&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;The following class level objects were used in the above sub:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&lt;span style='color:blue'&gt;Private&lt;/span&gt; mBackgroundSpriteTexture &lt;span style='color:blue'&gt;As Texture&lt;/span&gt;&lt;br /&gt;&lt;span style='color:blue'&gt;   Private&lt;/span&gt; mBackgroundTextureSize &lt;span style='color:blue'&gt;As Rectangle&lt;/span&gt;&lt;br /&gt;&lt;span style='color:blue'&gt;   Private&lt;/span&gt; mBackgroundSprite &lt;span style='color:blue'&gt;As Microsoft.DirectX.Direct3D.Sprite&lt;/span&gt;&lt;br /&gt;&lt;span style='color:blue'&gt;   Private&lt;/span&gt; mWidth &lt;span style='color:blue'&gt;As Integer&lt;/span&gt;&lt;br /&gt;&lt;span style='color:blue'&gt;   Private&lt;/span&gt; mHeight &lt;span style='color:blue'&gt;As Integer&lt;/span&gt;&lt;br /&gt;&lt;span style='color:blue'&gt;   Private&lt;/span&gt; mXPosition &lt;span style='color:blue'&gt;As Integer&lt;/span&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Now the above code is far from complete in getting a &lt;span style="font-size: 12pt; font-family: &amp;quot;Times New Roman&amp;quot;;"&gt;successful &lt;/span&gt;auto-scrolling background and my code does quite a bit more than what I have provided here (continual autoscroll of the background, ability to scroll in X direction or Y direction, etc). I'm just not ready to show that code just yet (still enhancing it) but I did want to give anyone else out there trying to figure out how to scroll a 2D background some more code samples to pick from on the web.&lt;br /&gt;&lt;br /&gt;I'll post more on my Background class after more enhancements take place.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9293400-112569846982456775?l=storytellersoftware.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://storytellersoftware.blogspot.com/feeds/112569846982456775/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9293400&amp;postID=112569846982456775' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9293400/posts/default/112569846982456775'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9293400/posts/default/112569846982456775'/><link rel='alternate' type='text/html' href='http://storytellersoftware.blogspot.com/2005/09/scrolling-2d-background.html' title='Scrolling a 2D Background'/><author><name>George W. Clingerman</name><uri>http://www.blogger.com/profile/00097708175900324725</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9293400.post-112560436730572073</id><published>2005-09-01T12:32:00.000-07:00</published><updated>2005-09-01T12:52:47.320-07:00</updated><title type='text'>Managed DirectX: A new beginning</title><content type='html'>Well, it's been a long time since I last posted. (Not that anyone was really coming here including myself)&lt;br /&gt;&lt;br /&gt;But I've decided this is the ideal place to begin journaling my current project. I am currently working on building a 2D game using Managed DirectX and VB.NET. My goal was to learn to use Managed DirectX while learning how to drop the now deprecated DirectDraw.&lt;br /&gt;&lt;br /&gt;My previous experience with DirectX has been slight. I've written a Tetris clone which I almost completed (it didn't change level and had no splash screen or menu, but it was playable, kept score, had music and sound effects and even flashed when you got a Tetris), which was done using VB and DirectX 8. But that game used only DirectDraw.&lt;br /&gt;&lt;br /&gt;I did a few more using VB and DirectDraw as well, I had a starfighter game I made for my son. It kept score, a scrolling background and multiple enemies and shots on the screen at one time, collision detection and music. I purposefully made that game so the star fighter couldn't die (the ultimate hero!) so that I didn't have to keep restarting it for my son an he could play for eternity. (He still enjoys playing it).&lt;br /&gt;&lt;br /&gt;I've also done some simpler games using the BitBlt API and I have a swath of those in various stages of completion.&lt;br /&gt;&lt;br /&gt;But this! This is my first project that I'm going to take all the way. End goal is to have a fully compiled game with all the works. I haven't decided on everything I want it to do yet (I'm obviously going to keep it simple since I"m just starting out with Managed DirectX), but as I learn more of what I can do with DirectX (again WITHOUT using DirectDraw), the shape and form of my 2D Managed DirectX game will being to take shape.&lt;br /&gt;&lt;br /&gt;My plan is to not so much publish how my game looks and how it plays but more to chronicle the DirectX hurdles I come across and what I did to solve them. I'm hoping to accomplish a few things with that.&lt;br /&gt;&lt;br /&gt;1. To repay the favor to the many other DirectX coders that have helped me out in numerous ways by posting their code samples and answering my questions. Especially one I met in the &lt;a href="http://forums.microsoft.com/msdn/ShowPost.aspx?PostID=78283"&gt;MSDN Forums &lt;/a&gt;who helped kick start this project with an answer to my question&lt;br /&gt;&lt;br /&gt;2. To take the sound advice of &lt;a href="http://www.blogusmaximus.com"&gt;someone&lt;/a&gt; I met at the Portland Code camp who said if you are starting a project, make sure you journal it. You'll thank me later for doing that. Just make sure you record what you're doing.&lt;br /&gt;&lt;br /&gt;3. To learn how to work with Managed DirectX to program a 2D game &lt;span style="font-weight: bold;"&gt;WITHOUT &lt;/span&gt;DirectDraw. DirectDraw has been deprecated (i.e. meaning it's no going to be supported much longer) so I want to learn how to develop games without it. Unfortunately there's not a lot of code examples out there for the 2D coder that don't use DirectDraw so I'm kind of blazing some new ground here for the 2D game developer.&lt;br /&gt;&lt;br /&gt;3. To provide a log for what I hope is going to be a fun and interesting project.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;So this is it. The grand project kick off. Let's see how it goes.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9293400-112560436730572073?l=storytellersoftware.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://storytellersoftware.blogspot.com/feeds/112560436730572073/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9293400&amp;postID=112560436730572073' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9293400/posts/default/112560436730572073'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9293400/posts/default/112560436730572073'/><link rel='alternate' type='text/html' href='http://storytellersoftware.blogspot.com/2005/09/managed-directx-new-beginning.html' title='Managed DirectX: A new beginning'/><author><name>George W. Clingerman</name><uri>http://www.blogger.com/profile/00097708175900324725</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9293400.post-110131261961645568</id><published>2004-11-24T08:09:00.000-08:00</published><updated>2004-11-24T08:10:19.616-08:00</updated><title type='text'>Improving the Fighting Game</title><content type='html'>So after seeing a commercial last night on TV for a new DragonBallZ game, I thought to myself, when was the last time I played a fighting game? I remember playing Street Fighter I and II in high school along with Mortal Kombat and then I played Tekken 3 a little in college, but I remember being very tired of the genre. It was always frustrating to me to learn all of the moves and then be beaten by a button pusher or to fight someone who knew all the moves for a particular game (when I didn't) and have the fight be over in a matter of seconds.   &lt;p&gt; It seems too, that the action got faster, more things happening on the screen at once, which to someone who's picking up the control to that game for the first time, is a little overwhelming (Street Fighter vs. Capcom comes to mind for an example of that). Basically I have these gripes about the genre and I haven't been really interested in playing a fighting game for a very long time. &lt;/p&gt;    &lt;p&gt;So, coming back to my opening line, I saw the commercial, thought about how long it's been since I played and thought, what changes could be made to the genre to make me interested again and I actually came up with a few. &lt;/p&gt; &lt;p&gt;   &lt;/p&gt; &lt;ol&gt; &lt;li&gt;Extend the life of the combatants. I know you can modify the hit levels so less damage is done in most games, but I mean REALLY extend the life of the combatants. Make it so that even if the guy is just standing there you can't be the tar out of him in less than 4 or 5 minutes. I think that will give everyone the chance to get the hang of the game and fights can start swinging both ways in that length of time. &lt;/li&gt;&lt;br /&gt;&lt;li&gt;Change it so you can't always be on the attack. Make the player tire out so they have to switch to defense to regain energy. In real life you couldn't just wail on the other person non-stop, your arms get tired, your fists start hurting, you have to back off and circle the guy, giving yourself a little break. I mean adrenaline does play a part in a fight, but it's just for small bursts, it eventually wears out too. I was thinking that depending on the intensity of the punches thrown, the complexity of the combos and special moves delivery, actually cause the player to start panting, make his punches and kicks to get weaker, make him fall down if he tires himself out too much. I think by making this change you will add a new element of strategy to the game, forcing players to learn to play offensively a little smarter and push into the forefront the importance of defense in any fight. &lt;/li&gt; &lt;/ol&gt;    &lt;p&gt;So there you have two suggestions for breathing new life into a genre that for me lost its luster years ago. Maybe I'm wrong about it all and people like the fighting games the way they are, but I personally think it's time for a change. &lt;/p&gt;   What do you think?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9293400-110131261961645568?l=storytellersoftware.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://storytellersoftware.blogspot.com/feeds/110131261961645568/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9293400&amp;postID=110131261961645568' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9293400/posts/default/110131261961645568'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9293400/posts/default/110131261961645568'/><link rel='alternate' type='text/html' href='http://storytellersoftware.blogspot.com/2004/11/improving-fighting-game.html' title='Improving the Fighting Game'/><author><name>George W. Clingerman</name><uri>http://www.blogger.com/profile/00097708175900324725</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9293400.post-110122980671560980</id><published>2004-11-23T08:55:00.000-08:00</published><updated>2004-11-23T09:12:37.123-08:00</updated><title type='text'>Storyteller Software</title><content type='html'>  &lt;p class="MsoNormal"&gt;Well, this is it. My first foray (on my own) into the world of blogging. We will see how this goes. Will I have the dedication and motivation to keep making new posts? Will the posts be interesting in any way and attract any visitors outside of friends and family? I doubt it! But it will be fun trying.&lt;br /&gt;&lt;br /&gt;First off, let me say a little bit about &lt;span style="font-weight: bold;"&gt;Storyteller Software&lt;/span&gt;. I picked that name because it's my dream to one day start my own company and call it Storyteller Software (so please, please don't steal it you bastards!) I don't plan on it being huge; it's just one of those goals I set for myself in college that someday I want to achieve. Even if it just consists of registering the business name with the state I live in and throwing up a website, I really want to say someday, "I have my own company." Am I the only one with those dreams? Or is it pretty typical for the computer industry in general. Anyway, I haven't done it yet but I have put the name out there in the form of this blog so it's kind of a start in a way (in a very roundabout, not like it at all kind of way).&lt;br /&gt;&lt;br /&gt;Anyways, so here it is. This is my blog. I don't have any grandiose plans or themes. I just wanted another forum to express my thoughts and ideas. I've got another blog which I post to with four other guys (&lt;a href="http://www.4guysfromviewpoint.com/"&gt;www.4guysfromViewpoint.com&lt;/a&gt;), but I kind of wanted something I could call my own and branch off down some other creative paths I didn't feel like doing on the group blog.&lt;br /&gt;&lt;br /&gt;I know I probably should have introduced myself a little more (name, where I'm from, age, etc.) but I figure that will happen over time and who &lt;span style="font-style: italic;"&gt;REALLY &lt;/span&gt;wants to read that boring crap anyway?&lt;br /&gt;&lt;br /&gt;So here I am. Let's see how this goes. And welcome to the blog.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9293400-110122980671560980?l=storytellersoftware.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://storytellersoftware.blogspot.com/feeds/110122980671560980/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9293400&amp;postID=110122980671560980' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9293400/posts/default/110122980671560980'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9293400/posts/default/110122980671560980'/><link rel='alternate' type='text/html' href='http://storytellersoftware.blogspot.com/2004/11/storyteller-software.html' title='Storyteller Software'/><author><name>George W. Clingerman</name><uri>http://www.blogger.com/profile/00097708175900324725</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
