<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
    <channel>
        <title>Joey&apos;s Code Lab</title>
        <link>http://www.personal.psu.edu/hxw5034/blogs/computer_graphics/</link>
        <description>things that I am interested in</description>
        <language>en</language>
        <copyright>Copyright 2009</copyright>
        <lastBuildDate>Mon, 01 Jun 2009 02:30:26 -0500</lastBuildDate>
        <generator>http://www.sixapart.com/movabletype/</generator>
        <docs>http://www.rssboard.org/rss-specification</docs>
        
        <item>
            <title>recent random things</title>
            <description><![CDATA[Now that I have been in China for almost 1 month, I am glad that I bought almost all the books that I need, and I am so ready to read them all.<br /><br />the crucial problem now for my next project is to create a flexible and robust structure, involving solid software engineering knowledge.<br /><br />Now I found the book "game script mastery" really good for this kind of subject. cuz in order to get flexibility, I have to add script capability to my program, and this is the most important link between different subsystems, like audio,game logic, renderer, io system, etc..<br /><br />at the same time, because I have already had some knowledge on OpenGL, the further direction is to learn computer graphics, and that will be accomplished by reading "Interactive Computer Graphics: a top-down approach using OpenGL", which shows pretty much what I need to know right now. It's the most suitable book I can have right now.<br /><br />moreover, my C programming language skill still needs to be improved by reading "Poiners on C", then I will be able to understand how C deal with memory, the most important resource in programming.<br /><br />after reading the 1st volume of "Write Great Code", I already have some basic knowledge on computer archietecture, the next thing I need to do, after reading the three books mentioned before, is to read some books on "computer archietecture", and "operating system".<br /><br />John Carmack has begun the Doom Classic Iphone project, which is a very good opportunity for me to build a Doom-like engine now along with John, good timing. <a href="http://www.idsoftware.com/iphone-doom-classic-progress/">Link</a><br /><br />The week before last, when I was in Beijing, I talked to my girl about making a simple CPU after reading computer architecture book, and now, one video game programmer Steve Chamberlin in the US has made that reality. <a href="http://www.stevechamberlin.com/cpu/2009/05/28/bmow-project-summary/">Link </a><br /><br />Looking back on my time back in China, I am really not satisfied with my low-efficiency!<br /><br />I want peace, I want peaceful mind.....<br /><br />I HATE!<br />]]></description>
            <link>http://www.personal.psu.edu/hxw5034/blogs/computer_graphics/2009/06/recent-random-things.html</link>
            <guid>http://www.personal.psu.edu/hxw5034/blogs/computer_graphics/2009/06/recent-random-things.html</guid>
            
            
            <pubDate>Mon, 01 Jun 2009 02:30:26 -0500</pubDate>
			
			



        </item>
        
        <item>
            <title>left US, enter Korea, head China</title>
            <description><![CDATA[Nothing special, really.<br /><br />The thing is that I feel that there is no such thing as "foreign" any more. no matter where you are, as long as there are people, the rule stays, the human rules stay.<br /><br />so... um....<br /><br />yea, bad thing is i have to wait here for another 5 hours....<br /><br />tata<br /><br /><br /> ]]></description>
            <link>http://www.personal.psu.edu/hxw5034/blogs/computer_graphics/2009/05/left-us-enter-korea-head-china.html</link>
            <guid>http://www.personal.psu.edu/hxw5034/blogs/computer_graphics/2009/05/left-us-enter-korea-head-china.html</guid>
            
            
            <pubDate>Fri, 08 May 2009 16:14:08 -0500</pubDate>
			
			



        </item>
        
        <item>
            <title>work log 4/30/2009</title>
            <description><![CDATA[dynamically manage resource can make all things more flexible<br /><br />Simple Race <br /><br />+ dynamically load map data<br />* dynamically manage game data <br />* texture management<br />* car information management<br />* music data management<br /><br /><br /><br /> ]]></description>
            <link>http://www.personal.psu.edu/hxw5034/blogs/computer_graphics/2009/05/work-log-4302009.html</link>
            <guid>http://www.personal.psu.edu/hxw5034/blogs/computer_graphics/2009/05/work-log-4302009.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">opengl</category>
            
                <category domain="http://www.sixapart.com/ns/types#category">work log</category>
            
            
            <pubDate>Fri, 01 May 2009 03:45:04 -0500</pubDate>
			
			



        </item>
        
        <item>
            <title>Simple Race 1.07</title>
            <description><![CDATA[----------------------------------------------------<br />Simple Race v1.07 beta @2009<br />----------------------------------------------------<br /><br /><br />added features:<br />1. added Ferrari F2008 car<br />2. added one ultimate map<br />3. added two more in-game music<br />4. different topspeed for different cars<br />5. need to find 4 ferrari logos<br />6. all files in one single install file, easy to use<br /><br />game file:<br /><br /><a href="http://www.personal.psu.edu/hxw5034/blogs/computer_graphics/resource/SimpleRace_v1.07.zip">download</a><br /><br /> ]]></description>
            <link>http://www.personal.psu.edu/hxw5034/blogs/computer_graphics/2009/04/simple-race-107.html</link>
            <guid>http://www.personal.psu.edu/hxw5034/blogs/computer_graphics/2009/04/simple-race-107.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">opengl</category>
            
                <category domain="http://www.sixapart.com/ns/types#category">work log</category>
            
            
            <pubDate>Sun, 26 Apr 2009 06:45:39 -0500</pubDate>
			
			



        </item>
        
        <item>
            <title>email from john carmack</title>
            <description><![CDATA[<pre>HUAIDONG WANG wrote:<br />&gt; Dear John Carmack:<br />&gt;<br />&gt; I don't know if you can get this email or not, I have been following <br />&gt; your work for a long time, but I was in China, cannot be there at <br />&gt; Quakecon, now that I am in Penn State, I can come to Quakecon this year.<br />&gt;<br />&gt; For this quakecon, can you talk a little about how far have you been <br />&gt; on the unified rendering architecture? that you mentioned in a couple <br />&gt; of quakecon, you said you are close to build a architecture for <br />&gt; rendering like Renderman did.<br />The short answer is that I backed away from that.  When targeting a 60hz <br />game on current gen consoles, it is still necessary to think like a game <br />engine.  You could make a commercial game with a truly general <br />architecture, but it wouldn't be at the AAA level currently due to the <br />compromises.<br /><br />John Carmack<br /><br /><br /><br /><br /></pre> ]]></description>
            <link>http://www.personal.psu.edu/hxw5034/blogs/computer_graphics/2009/04/email-from-john-carmack.html</link>
            <guid>http://www.personal.psu.edu/hxw5034/blogs/computer_graphics/2009/04/email-from-john-carmack.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">general programming</category>
            
                <category domain="http://www.sixapart.com/ns/types#category">opengl</category>
            
                <category domain="http://www.sixapart.com/ns/types#category">trivia</category>
            
            
            <pubDate>Fri, 24 Apr 2009 15:18:39 -0500</pubDate>
			
			



        </item>
        
        <item>
            <title>won&apos;t update regularly</title>
            <description><![CDATA[I am in my next learning period now, probably won't update the blog unless I found something that impresses me or I make some breakthrough...<br /><br />current learning content:<br />*deeper OpenGL<br />*algorithm<br /><br />I watched ACM 2009 world final last night, it was amazing.<br /> ]]></description>
            <link>http://www.personal.psu.edu/hxw5034/blogs/computer_graphics/2009/04/wont-update-regularly.html</link>
            <guid>http://www.personal.psu.edu/hxw5034/blogs/computer_graphics/2009/04/wont-update-regularly.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">general programming</category>
            
                <category domain="http://www.sixapart.com/ns/types#category">trivia</category>
            
                <category domain="http://www.sixapart.com/ns/types#category">work log</category>
            
            
            <pubDate>Thu, 23 Apr 2009 19:58:40 -0500</pubDate>
			
			



        </item>
        
        <item>
            <title>Simple Race v1.06 beta </title>
            <description><![CDATA[Simple Race v1.06 beta<br /><br />added features:<br />1. in game music<br />2. in game special sound<br />3. "R" key that can be used as Reset, when freezed in the wall <br /><br />I used SDL_mixer as my music loader and player.<br />Music is from DOOM, they'r in midi format.<br />id software holds all the rights.<br /><br />this is a non-comercial game, the music is used only in this project, and the source code is gonna be released with the game.<br /><br />------------------------------------<br />here is the link:<br /><a href="http://www.personal.psu.edu/hxw5034/blogs/computer_graphics/resource/SimpleRace_v1.06_beta_test.zip">download</a><br /><br />-----------------------------------<br />if you have some suggestions, please leave a comment here.<br />]]></description>
            <link>http://www.personal.psu.edu/hxw5034/blogs/computer_graphics/2009/04/simple-race-v106-beta.html</link>
            <guid>http://www.personal.psu.edu/hxw5034/blogs/computer_graphics/2009/04/simple-race-v106-beta.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">opengl</category>
            
                <category domain="http://www.sixapart.com/ns/types#category">work log</category>
            
            
            <pubDate>Sun, 19 Apr 2009 15:31:04 -0500</pubDate>
			
			



        </item>
        
        <item>
            <title>work log (4/18/2009) // TWO MONTHS since OPENGL</title>
            <description><![CDATA[now it's officially 2 months since I started to learn graphics programming, my first game is about to finish, I am happy! <br /><br />celebrate a little bit..... <br /><br />write a little something here:<br /><br />in these two months, I really really learned a lot, I spent days and nights on my game, I can say, I now have a rough overview of what I am going to do in the future, and the computer graphics area. I learned a lot from building my own game from scratch, like, how to organize the code for a big project, how to work on codes piece by piece, how to build a good-to-use class so that it can fit into the whole project......etc, except computer graphics, I learned a lot on software engineering, and thanks to my CMPSC122, I know some basic data structures and algorithms, that course opened a gate to me, the computer programming's gate.<br /><br />these two months created a boat for me, for me to surf to the deeper part of computer world. These two months is the most important months in my life, I can feel it, I can feel my future just because of the two months. I have always wanted to sail, but I didn't really started before the two months.. now I do.<br /><br />I wanna really thank my professor Max, Fomitchev, he made me rethink my ability on computer programming, he made me wanna do a lot of things that I wouldn't do before, he helped me to find my potential on programming. I wanna thank him!<br /><br />The journey has just begun.<br /><br /><br />here is a little plan:<br />*revisit C programming, take it low-level<br />*study deeper towards OpenGL<br />*study deeper towards algorithm<br />*computational geometry<br />*GLSL<br /><br />at the same time, learn a little java and programming under Mac<br />do a little cross-platform practice by porting my game to iphone and java<br /><br />-----------------------<br /><br />anyway:<br /><br />today's work log:<br /><br />+remixed some midi from the original DOOM, will be used as the game music<br />+fixed some hard-coding code<br />+fixed texture size<br />+fixed some inefficient memory use<br /><br />*add music module to my game<br />*structurize my code<br /><br /><br /> ]]></description>
            <link>http://www.personal.psu.edu/hxw5034/blogs/computer_graphics/2009/04/work-log-4182009-two-months-since-opengl.html</link>
            <guid>http://www.personal.psu.edu/hxw5034/blogs/computer_graphics/2009/04/work-log-4182009-two-months-since-opengl.html</guid>
            
            
            <pubDate>Sat, 18 Apr 2009 20:08:27 -0500</pubDate>
			
			



        </item>
        
        <item>
            <title>Simple Race v1.05 beta test release</title>
            <description><![CDATA[<br />added features:<br /><br />1. choose from 2 cars<br />2. choose from 2 maps<br />3. restart game<br />4. add openning, instruction, map choice, car choice windows.<br /><br />still testing item:<br />*collision response<br /><br />here is the link<br /><br /><a href="http://www.personal.psu.edu/hxw5034/blogs/computer_graphics/resource/SimpleRace_v1.05_beta_test.zip">download</a><br /><br /><br /> ]]></description>
            <link>http://www.personal.psu.edu/hxw5034/blogs/computer_graphics/2009/04/simple-race-v105-beta-test-release.html</link>
            <guid>http://www.personal.psu.edu/hxw5034/blogs/computer_graphics/2009/04/simple-race-v105-beta-test-release.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">opengl</category>
            
                <category domain="http://www.sixapart.com/ns/types#category">work log</category>
            
            
            <pubDate>Sat, 18 Apr 2009 01:58:49 -0500</pubDate>
			
			



        </item>
        
        <item>
            <title>Hashing......</title>
            <description><![CDATA[Listed as one of the Five Top technics proposed by Richard Stallman.<br /><br />Choosing a hashing function is just art not science<br /><br />anyway, keep digging<br />]]></description>
            <link>http://www.personal.psu.edu/hxw5034/blogs/computer_graphics/2009/04/hashing.html</link>
            <guid>http://www.personal.psu.edu/hxw5034/blogs/computer_graphics/2009/04/hashing.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">general programming</category>
            
                <category domain="http://www.sixapart.com/ns/types#category">work log</category>
            
            
            <pubDate>Wed, 15 Apr 2009 22:25:52 -0500</pubDate>
			
			



        </item>
        
        <item>
            <title>SimpleRace v1.04 test version</title>
            <description><![CDATA[fixed item<br />collision detection (needs to be tested)<br /><br />features added:<br />1. full screen option (needs to be tested)<br />2. randomly place the target logo<br />3. high resolution and low resolution textures to choose from<br /><br />Please Note:<br />if you want to replace the texture with low resolution, go to "Texture" folder and copy the low res ones to the "Texture" folder, reload the game.<br /><br />this zip is bigger than before, because it contains high res textures<br /><br /><a href="http://www.personal.psu.edu/hxw5034/blogs/computer_graphics/resource/SimpleRace_demo_1.04.zip">download</a><br /><br />if you are using Windows XP and don't have opengl, you can download this<br /><a href="http://www.personal.psu.edu/hxw5034/blogs/computer_graphics/resource/xp_opengl.zip">XPOpenGL</a><br /><br />Here is the source code for this beta version, if you are interested, please take a look and give me some advice!<br /><a href="http://www.personal.psu.edu/hxw5034/blogs/computer_graphics/resource/SimpleRace_1.04_beta_src.zip">Source Code</a><br /><br />welcome everybody to <a href="mailto:hxw5034@psu.edu">email</a> me report bugs and places needed to improve to me.<br /> ]]></description>
            <link>http://www.personal.psu.edu/hxw5034/blogs/computer_graphics/2009/04/simplerace-v104-test-version.html</link>
            <guid>http://www.personal.psu.edu/hxw5034/blogs/computer_graphics/2009/04/simplerace-v104-test-version.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">opengl</category>
            
                <category domain="http://www.sixapart.com/ns/types#category">work log</category>
            
            
            <pubDate>Mon, 13 Apr 2009 22:11:49 -0500</pubDate>
			
			



        </item>
        
        <item>
            <title>Huffman tree and map</title>
            <description><![CDATA[I was doing a little coding on my school's work, it's about Huffman code, I just think that it is very useful, and I was having a little issue of retrieving data correctly from the huffman tree. So I figure I just post the code here, in case some one else is gonna need it.<br /><br />Method 1: search the Huffman Tree every time to get the code<br /><br />// this function take "temp"as a temporary variable to store the code string<br />// aChar is char we are looking for in the tree<br />// tree is the Huffman tree we built<br />// the function will return the huffman code for this character<br /><br />string findHuffCode(string temp,const char&amp; aChar,const HuffTreeNode* tree)<br />{<br />&nbsp;&nbsp;&nbsp; if (tree-&gt;IsLeaf())<br />&nbsp;&nbsp;&nbsp; {<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if (tree-&gt;Value.Symbol==aChar)<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; return temp;<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; else<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; return "";<br />&nbsp;&nbsp;&nbsp; }<br />&nbsp;&nbsp;&nbsp; else<br />&nbsp;&nbsp;&nbsp; {<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if (findHuffCode(temp+"0",aChar,tree-&gt;Left)=="")<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; return findHuffCode(temp+"1",aChar,tree-&gt;Right);<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; else<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; return findHuffCode(temp+"0",aChar,tree-&gt;Left);<br />&nbsp;&nbsp;&nbsp; }<br />}<br /><br />Method 2: using a map structure to store the Huffman code for every character<br /><br />// huffMap is the map we will build<br />// temp is the temp string store the Huffman code<br />// tree is the Huffman tree we built<br />void buildHuffMap(map&lt;char,string&gt;&amp; huffMap,string temp,const HuffTreeNode* tree)<br />{<br />&nbsp;&nbsp;&nbsp; if (tree-&gt;IsLeaf())<br />&nbsp;&nbsp;&nbsp; {<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; huffMap[tree-&gt;Value.Symbol]=temp;<br />&nbsp;&nbsp;&nbsp; }<br />&nbsp;&nbsp;&nbsp; else<br />&nbsp;&nbsp;&nbsp; {<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; buildHuffMap(huffMap,temp+"1",tree-&gt;Right);<br />&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; buildHuffMap(huffMap,temp+"0",tree-&gt;Left);<br />&nbsp;&nbsp;&nbsp; }<br />}<br /><br />tree structure is the most useful data structure that I v seen, and recursion is the most magical process I v known....<br /><br />]]></description>
            <link>http://www.personal.psu.edu/hxw5034/blogs/computer_graphics/2009/04/huffman-tree-and-map.html</link>
            <guid>http://www.personal.psu.edu/hxw5034/blogs/computer_graphics/2009/04/huffman-tree-and-map.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">general programming</category>
            
                <category domain="http://www.sixapart.com/ns/types#category">work log</category>
            
            
            <pubDate>Sun, 12 Apr 2009 21:55:52 -0500</pubDate>
			
			



        </item>
        
        <item>
            <title>plans for the next few months</title>
            <description><![CDATA[read some books<br /><br />1. write great code<br /><br />2. thinking in C++<br /><br />3. introduction to algorithms<br /><br />4. computational geometry with c<br /><br />I am not quite sure if I am gonna finish them or not, I will use all my free time to do that.<br /> ]]></description>
            <link>http://www.personal.psu.edu/hxw5034/blogs/computer_graphics/2009/04/plans-for-the-next-few-months.html</link>
            <guid>http://www.personal.psu.edu/hxw5034/blogs/computer_graphics/2009/04/plans-for-the-next-few-months.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">work log</category>
            
            
            <pubDate>Fri, 10 Apr 2009 21:05:28 -0500</pubDate>
			
			



        </item>
        
        <item>
            <title>plan for v1.04</title>
            <description><![CDATA[here is a brief plan of what I am gonna do in 1.04 version<br /><br />1. I am gonna rewrite the collision code, doing the right physics calculation not those crappy approximation, I tried to do all those approximation and didn't pay off, physics is almost the core of my racing game.&nbsp; (I am amazed by modern computers' capability, they allow me to do a lot of complex calculations)<br /><br />2. a better software structure. I read some code from others, their programming style is so clear and neat, I am gonna improve my programming style.<br /><br />3. the game play side of things, can be considered later, cuz they are the relatively easy part. the game play mode now so far is not bad.<br /><br /><br />I got a great book today, Randall Hyde's &lt;Write Great Code&gt; think low-level,write high-level... That's the exact thing I need right now, I need to understand more low-level stuff to fundamentally improve my programming skill.<br />quote John Carmack's words here:<br /><br />Low-level programming is good for programmers' soul.<br /> ]]></description>
            <link>http://www.personal.psu.edu/hxw5034/blogs/computer_graphics/2009/04/plan-for-v104.html</link>
            <guid>http://www.personal.psu.edu/hxw5034/blogs/computer_graphics/2009/04/plan-for-v104.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">general programming</category>
            
                <category domain="http://www.sixapart.com/ns/types#category">trivia</category>
            
                <category domain="http://www.sixapart.com/ns/types#category">work log</category>
            
            
            <pubDate>Wed, 08 Apr 2009 14:32:06 -0500</pubDate>
			
			



        </item>
        
        <item>
            <title>SimpleRace beta test version release</title>
            <description><![CDATA[<br />I finally got the texture loading problem solved, it was the size problem. It took me so long time to find that out.... :-(&nbsp; <br />some card doesn't support GL_ARB_texture_non_power_of_two<br />here is a link on this issue: <a href="http://www.gamedev.net/community/forums/topic.asp?topic_id=460868">http://www.gamedev.net/community/forums/topic.asp?topic_id=460868</a><br /><br />anyway, here is the beta test version, hopefully it's gonna run on every windows machines.<br /><br /><a href="http://www.personal.psu.edu/hxw5034/blogs/computer_graphics/resource/SimpleRace_v1.03_beta_test.zip">download</a><br /><br />there is still some jittering with the physics engine, I will fix that in my next version.<br />]]></description>
            <link>http://www.personal.psu.edu/hxw5034/blogs/computer_graphics/2009/04/simplerace-beta-test-version-release.html</link>
            <guid>http://www.personal.psu.edu/hxw5034/blogs/computer_graphics/2009/04/simplerace-beta-test-version-release.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">opengl</category>
            
                <category domain="http://www.sixapart.com/ns/types#category">work log</category>
            
            
            <pubDate>Mon, 06 Apr 2009 23:57:24 -0500</pubDate>
			
			



        </item>
        
    </channel>
</rss>
