﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>C++博客-diceidea</title><link>http://www.cppblog.com/diceidea/</link><description>parser</description><language>zh-cn</language><lastBuildDate>Tue, 07 Apr 2026 19:21:28 GMT</lastBuildDate><pubDate>Tue, 07 Apr 2026 19:21:28 GMT</pubDate><ttl>60</ttl><item><title>Sep.10.2008</title><link>http://www.cppblog.com/diceidea/archive/2008/09/10/61550.html</link><dc:creator>diceidea</dc:creator><author>diceidea</author><pubDate>Wed, 10 Sep 2008 15:40:00 GMT</pubDate><guid>http://www.cppblog.com/diceidea/archive/2008/09/10/61550.html</guid><wfw:comment>http://www.cppblog.com/diceidea/comments/61550.html</wfw:comment><comments>http://www.cppblog.com/diceidea/archive/2008/09/10/61550.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/diceidea/comments/commentRss/61550.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/diceidea/services/trackbacks/61550.html</trackback:ping><description><![CDATA[1. Take it a step further, I want to be your husband, hehe.<br>2. Following is some issues I ran across.<br>3. The title had me cracking up.<br><br><img src ="http://www.cppblog.com/diceidea/aggbug/61550.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/diceidea/" target="_blank">diceidea</a> 2008-09-10 23:40 <a href="http://www.cppblog.com/diceidea/archive/2008/09/10/61550.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Golden Shield Project(GSP)</title><link>http://www.cppblog.com/diceidea/archive/2008/09/08/61343.html</link><dc:creator>diceidea</dc:creator><author>diceidea</author><pubDate>Mon, 08 Sep 2008 14:36:00 GMT</pubDate><guid>http://www.cppblog.com/diceidea/archive/2008/09/08/61343.html</guid><wfw:comment>http://www.cppblog.com/diceidea/comments/61343.html</wfw:comment><comments>http://www.cppblog.com/diceidea/archive/2008/09/08/61343.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/diceidea/comments/commentRss/61343.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/diceidea/services/trackbacks/61343.html</trackback:ping><description><![CDATA[The <strong>Golden Shield Project</strong> (<a href="http://en.wikipedia.org/wiki/Chinese_language" title="Chinese language">Chinese</a>: <span xml:lang="zh" lang="zh"><a href="http://en.wiktionary.org/wiki/%E9%87%91" class="extiw" title="wikt:金">金</a><a href="http://en.wiktionary.org/wiki/%E7%9B%BE" class="extiw" title="wikt:盾">盾</a><a href="http://en.wiktionary.org/wiki/%E5%B7%A5" class="extiw" title="wikt:工">工</a><a href="http://en.wiktionary.org/wiki/%E7%A8%8B" class="extiw" title="wikt:程">程</a></span>; <a href="http://en.wikipedia.org/wiki/Pinyin" title="Pinyin">pinyin</a>: jīnd&#249;n gōngch&#233;ng), sometimes referred to as the <strong><a href="http://en.wikipedia.org/wiki/Golden_Shield_Project#Censored_content" title="">Great Firewall of China</a></strong>, is a <a href="http://en.wikipedia.org/wiki/Censorship" title="Censorship">censorship</a> and surveillance project operated by the <a href="http://en.wikipedia.org/wiki/Ministry_of_Public_Security_of_the_People%27s_Republic_of_China" title="Ministry of Public Security of the People's Republic of China">Ministry of Public Security</a> (MPS) of the <a href="http://en.wikipedia.org/wiki/People%27s_Republic_of_China" title="People's Republic of China">People's Republic of China</a>. The project started in 1998 and began operations in November of 2003.<br>Googlepage is now forbidden by GSP.<br><img src ="http://www.cppblog.com/diceidea/aggbug/61343.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/diceidea/" target="_blank">diceidea</a> 2008-09-08 22:36 <a href="http://www.cppblog.com/diceidea/archive/2008/09/08/61343.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Sep.07.2008</title><link>http://www.cppblog.com/diceidea/archive/2008/09/07/61260.html</link><dc:creator>diceidea</dc:creator><author>diceidea</author><pubDate>Sun, 07 Sep 2008 14:10:00 GMT</pubDate><guid>http://www.cppblog.com/diceidea/archive/2008/09/07/61260.html</guid><wfw:comment>http://www.cppblog.com/diceidea/comments/61260.html</wfw:comment><comments>http://www.cppblog.com/diceidea/archive/2008/09/07/61260.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/diceidea/comments/commentRss/61260.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/diceidea/services/trackbacks/61260.html</trackback:ping><description><![CDATA[1. I <span style="background-color: yellow;">am very grateful to</span> my parents<br>2. Writing is the only art that must be learned by wrote.<br>3. She is <span style="background-color: yellow;">not my type.</span><br>4. A thousand percent.<br>5. stand by 待命<br>6. That sucked. 糟透了<span style="background-color: yellow;">？？？</span> Things that suck<br>7. The title had me <span style="background-color: yellow;">cracking up</span>. 这个标题让我崩溃了<br><br><img src ="http://www.cppblog.com/diceidea/aggbug/61260.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/diceidea/" target="_blank">diceidea</a> 2008-09-07 22:10 <a href="http://www.cppblog.com/diceidea/archive/2008/09/07/61260.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Blender+Ogre Preview</title><link>http://www.cppblog.com/diceidea/archive/2008/09/03/60827.html</link><dc:creator>diceidea</dc:creator><author>diceidea</author><pubDate>Wed, 03 Sep 2008 08:19:00 GMT</pubDate><guid>http://www.cppblog.com/diceidea/archive/2008/09/03/60827.html</guid><wfw:comment>http://www.cppblog.com/diceidea/comments/60827.html</wfw:comment><comments>http://www.cppblog.com/diceidea/archive/2008/09/03/60827.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/diceidea/comments/commentRss/60827.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/diceidea/services/trackbacks/60827.html</trackback:ping><description><![CDATA[<ol style="margin-left: 0.375in; direction: ltr; unicode-bidi: embed; margin-top: 0in; margin-bottom: 0in; font-family: calibri; font-size: 11pt;" type="1">
    <li value="1" style="margin-top: 0pt; margin-bottom: 0pt; vertical-align: middle;" lang="zh-CN"><span style="font-family: SimSun; font-size: 11pt;">开发背景</span></li>
</ol>
<p style="margin: 0in 0in 0in 0.375in; font-size: 11pt;"><span style="font-family: calibri;" lang="en-US">Ogre</span><span style="font-family: simsun;" lang="zh-CN">和</span><span style="font-family: calibri;" lang="en-US">Blender</span><span style="font-family: simsun;" lang="zh-CN">都是开源软件中的佼佼者，前者提供了作为一个</span><span style="font-family: calibri;" lang="en-US">real</span><span style="font-family: simsun;" lang="en-US"> time renderer</span><span style="font-family: simsun;" lang="zh-CN">的各种要素，后者作为</span><span style="font-family: simsun;" lang="en-US">offline</span><span style="font-family: simsun;" lang="zh-CN">的</span><span style="font-family: simsun;" lang="en-US">animation renderer</span><span style="font-family: simsun;" lang="zh-CN">和</span><span style="font-family: simsun;" lang="en-US">model</span><span style="font-family: simsun;" lang="zh-CN">工具</span><span style="font-family: simsun;" lang="en-US">, </span><span style="font-family: simsun;" lang="zh-CN">根据</span><span style="font-family: simsun;" lang="en-US">Ogre</span><span style="font-family: simsun;" lang="zh-CN">官网上的资料及一些开源爱好者的建议，可以作为</span><span style="font-family: simsun;" lang="en-US">level editor</span><span style="font-family: simsun;" lang="zh-CN">来与外部的</span><span style="font-family: simsun;" lang="en-US">renderer</span><span style="font-family: simsun;" lang="zh-CN">或者是游戏引擎合作。有了这两个强大的工具，其他诸如声音物理等等模块可以依赖于其他的开源工具很方便的解决，这也为我们呈现了一种低成本的游戏开发解决方案。</span></p>
<p style="margin: 0in 0in 0in 0.375in; font-family: simsun; font-size: 11pt;" lang="zh-CN">&nbsp;</p>
<p style="margin: 0in 0in 0in 0.375in; font-family: simsun; font-size: 11pt;" lang="zh-CN">&nbsp;</p>
<ol style="margin-left: 0.375in; direction: ltr; unicode-bidi: embed; margin-top: 0in; margin-bottom: 0in; font-family: simsun; font-size: 11pt;" type="1">
    <li value="2" style="margin-top: 0pt; margin-bottom: 0pt; vertical-align: middle;" lang="zh-CN"><span style="font-family: SimSun; font-size: 11pt;">案例</span></li>
</ol>
<p style="margin: 0in 0in 0in 0.375in; font-size: 11pt;"><span style="font-family: simsun;" lang="zh-CN">下面是一个使用这些混合物来开发的游戏（</span><a href="http://www.ogre3d.org/phpBB2/viewtopic.php?t=29907&amp;start=25&amp;postdays=0&amp;postorder=asc&amp;highlight="><span style="font-family: calibri;" lang="en-US">Mulver</span></a><span style="font-family: simsun;" lang="zh-CN">），质量考究：</span></p>
<p style="margin: 0in 0in 0in 0.375in; font-size: 11pt;"><span style="font-family: simsun;" lang="zh-CN">以下文字和图片摘自：<a href="http://www.ogre3d.org/phpBB2/viewtopic.php?t=29907&amp;postdays=0&amp;postorder=asc&amp;start=0">http://www.ogre3d.org/phpBB2/viewtopic.php?t=29907&amp;postdays=0&amp;postorder=asc&amp;start=0</a>，版权属于原作者<br></span></p>
<p style="margin: 0in 0in 0in 0.375in; font-family: Calibri; font-size: 11pt;"><span lang="en-US">My alltime favourite game is Super Mario 64. In my eyes its still
the king of the 3D Platform game category. Some people </span><a href="http://www.stevestreeting.com/?p=448"><span lang="zh-CN">http://www.stevestreeting.com/?p=448</span></a><span lang="en-US"> just dont get this genre though.</span></p>
<p style="margin: 0in 0in 0in 0.375in; font-family: Calibri; font-size: 11pt;">Anyway
I have been trying to make a similar game using Ogre of course and a couple of
other open source libraries out there ODE, LUA, OIS, FMod (not OS). I have also
used AC3D for some modelling and Blender for Level Design and modelling. </p>
<p style="margin: 0in 0in 0in 0.375in; font-family: calibri; font-size: 11pt;" lang="zh-CN">&nbsp;</p>
<p style="margin: 0in 0in 0in 0.375in; font-family: Calibri; font-size: 11pt;">Its
intresting that the core engine and first test level was up and running just a
couple of months after I started in May 2006. But to create a useful Art/level
pipeline took much longer than I expected. I took a long break from programming
during autumn and winter but still it was almost as much work as writing the
game engine! Learning Python programming and the Blender Python API was also an
intresting experience. Don forget those tabs </p>
<p style="margin: 0in 0in 0in 0.375in; font-family: calibri; font-size: 11pt;" lang="zh-CN">&nbsp;</p>
<p style="margin: 0in 0in 0in 0.375in; font-family: Calibri; font-size: 11pt;">Levels
are built in Blender using a custom level exporter together with reimpells Ogre
mesh exporter. The generated levels are just LUA scripts that calls into the
game engine to set up the world and handle events. </p>
<p style="margin: 0in 0in 0in 0.375in; font-family: calibri; font-size: 11pt;" lang="zh-CN">&nbsp;</p>
<p style="margin: 0in 0in 0in 0.375in; font-family: Calibri; font-size: 11pt;">FMod
integration and building a Demo with 5 complete levels is my next step. And
getting rid of the crappy programmer art of course. That will be a tough one...
</p>
<p style="margin: 0in 0in 0in 0.375in; font-family: calibri; font-size: 11pt;" lang="zh-CN">&nbsp;</p>
<p style="margin: 0in 0in 0in 0.375in; font-family: calibri; font-size: 11pt;" lang="zh-CN">&nbsp;<span class="postbody">
Here is a level concept with good old pen &amp; paper I wrote a couple of days ago:
<br>
<a href="http://eredluin.web.surftown.se/Projects/Mulver/Files/LevelConcept.png" target="_blank" class="postlink"><img src="http://eredluin.web.surftown.se/Projects/Mulver/Files/Thumbs/LevelConcept.png" border="0"></a>
<br>
<br>
Here is the level starting to take shape in Blender. Last shot is a Blender render of the level.
<br>
<a href="http://eredluin.web.surftown.se/Projects/Mulver/Files/BlenderLvl1.png" target="_blank" class="postlink"><img src="http://eredluin.web.surftown.se/Projects/Mulver/Files/Thumbs/BlenderLvl1.png" border="0"></a>...<a href="http://eredluin.web.surftown.se/Projects/Mulver/Files/BlenderLvl2.png" target="_blank" class="postlink"><img src="http://eredluin.web.surftown.se/Projects/Mulver/Files/Thumbs/BlenderLvl2.png" border="0"></a>...<a href="http://eredluin.web.surftown.se/Projects/Mulver/Files/BlenderLvlRender.png" target="_blank" class="postlink"><img src="http://eredluin.web.surftown.se/Projects/Mulver/Files/Thumbs/BlenderLvlRender.png" border="0"></a>
<br>
<br>
<br>
Here is the level in Ogre:
<br>
<a href="http://eredluin.web.surftown.se/Projects/Mulver/Files/OgreLvl1.png" target="_blank" class="postlink"><img src="http://eredluin.web.surftown.se/Projects/Mulver/Files/Thumbs/OgreLvl1.png" border="0"></a>...<a href="http://eredluin.web.surftown.se/Projects/Mulver/Files/OgreLvl2.png" target="_blank" class="postlink"><img src="http://eredluin.web.surftown.se/Projects/Mulver/Files/Thumbs/OgreLvl2.png" border="0"></a>...<a href="http://eredluin.web.surftown.se/Projects/Mulver/Files/OgreLvl3.png" target="_blank" class="postlink"><img src="http://eredluin.web.surftown.se/Projects/Mulver/Files/Thumbs/OgreLvl3.png" border="0"></a>
<br>
<br>
<br>
<br>
AVI video (Microsoft encoded Im afraid):
<br>
<a href="http://eredluin.web.surftown.se/Projects/Mulver/Files/Mulver.avi" target="_blank" class="postlink"><span style="font-weight: bold;">Video ~10Mb (mp42 codec)</span></a>
<br>
<br>
Older format:
<br>
<a href="http://eredluin.web.surftown.se/Projects/Mulver/Files/Mulver_mpg4.avi" target="_blank" class="postlink"><span style="font-weight: bold;">Video ~10Mb (mpg4 codec)</span></a>
<br>
<br>
<br>
<br>
A couple of other levels Ive been toying with:
<br>
<a href="http://eredluin.web.surftown.se/Projects/Mulver/Files/OgreLvl4.png" target="_blank" class="postlink"><img src="http://eredluin.web.surftown.se/Projects/Mulver/Files/Thumbs/OgreLvl4.png" border="0"></a>...<a href="http://eredluin.web.surftown.se/Projects/Mulver/Files/OgreLvl5.png" target="_blank" class="postlink"><img src="http://eredluin.web.surftown.se/Projects/Mulver/Files/Thumbs/OgreLvl5.png" border="0"></a>
</span></p>
<p style="margin: 0in 0in 0in 0.375in; font-family: calibri; font-size: 11pt;" lang="zh-CN">&nbsp;</p>
<p style="margin: 0in 0in 0in 0.375in; font-family: Tahoma; font-size: 8pt; color: #666666;">Pasted from &lt;<a href="http://www.ogre3d.org/phpBB2/viewtopic.php?t=39835&amp;view=next&amp;sid=ce193664e1d3d7c4af509e6f4e2718c6">http://www.ogre3d.org/phpBB2/viewtopic.php?t=39835&amp;view=next&amp;sid=ce193664e1d3d7c4af509e6f4e2718c6</a>&gt;
</p>
<p style="margin: 0in 0in 0in 0.375in; font-family: calibri; font-size: 11pt;" lang="zh-CN">&nbsp;</p>
<ol style="margin-left: 0.375in; direction: ltr; unicode-bidi: embed; margin-top: 0in; margin-bottom: 0in; font-family: simsun; font-size: 11pt;" type="1">
    <li value="3" style="margin-top: 0pt; margin-bottom: 0pt; vertical-align: middle;" lang="zh-CN"><span style="font-family: SimSun; font-size: 11pt;">开发步骤：</span></li>
</ol>
<p style="margin: 0in 0in 0in 0.375in; font-size: 11pt;"><span style="font-family: simsun;" lang="zh-CN">网上有一些关于如何合作使用</span><span style="font-family: calibri;" lang="en-US">Blender</span><span style="font-family: simsun;" lang="zh-CN">和</span><span style="font-family: calibri;" lang="en-US">Ogre</span><span style="font-family: simsun;" lang="zh-CN">的建议：</span></p>
<p style="margin: 0in 0in 0in 0.375in; font-family: Calibri; font-size: 11pt;">The
Blender-Ogre process</p>
<p style="margin: 0in 0in 0in 0.375in; font-family: Calibri; font-size: 11pt;"><span lang="en-US">So, it is decision time - how will I go about making levels</span><span lang="zh-CN">&#8230;</span><span lang="en-US"> Three level choices, as I see it : </span></p>
<p style="margin: 0in 0in 0in 0.375in; font-family: Calibri; font-size: 11pt;">1)
Build my own level editor, build an importer, generate the levels</p>
<p style="margin: 0in 0in 0in 0.375in; font-family: Calibri; font-size: 11pt;">2)
Use Blender to build the scene, export all the meshes, export the scene to
dotscene format and bring it in that way, using the generic Ogre scene manager</p>
<p style="margin: 0in 0in 0in 0.375in; font-family: Calibri; font-size: 11pt;">3)
Use Blender to build the scene, export all the meshes, export the scene to
dotscene format, then import it to octree and bring it in using the Ogre octree
scene manager</p>
<p style="margin: 0in 0in 0in 0.375in; font-family: Calibri; font-size: 11pt;"><span lang="en-US">My understanding is that 3 has speed advantages. Don</span><span lang="zh-CN">&#8217;</span><span lang="en-US">t really understand it all yet. More
research needed. Probably NOT going to do 1, though - It&#8217;d be doable,
particularly if I limited myself to rectangular, perpendicular rooms, but it&#8217;d
be nice to be able to NOT limit myself that way.</span></p>
<p style="margin: 0in 0in 0in 0.375in; font-family: Calibri; font-size: 11pt;">More
reading, more research.</p>
<p style="margin: 0in 0in 0in 0.375in; font-family: calibri; font-size: 11pt;" lang="zh-CN">&nbsp;</p>
<p style="margin: 0in 0in 0in 0.375in; font-family: SimSun; font-size: 11pt;">Pasted from &lt;<a href="http://israndomrandom.com/">http://israndomrandom.com/</a>&gt;<br><br>&nbsp; <br><br><span style="font-family: SimSun; font-size: 11pt;">&nbsp; 4. 参考资料：</span></p>
<p style="margin: 0in 0in 0in 0.375in; font-family: simsun; font-size: 11pt;" lang="zh-CN">加州大学河滨分校的课程：</p>
<p style="margin: 0in 0in 0in 0.375in; font-family: calibri; font-size: 11pt;" lang="zh-CN"><a href="http://www.cs.ucr.edu/~macchiea/cs134/">http://www.cs.ucr.edu/~macchiea/cs134/</a></p>
<p style="margin: 0in 0in 0in 0.375in; font-family: calibri; font-size: 11pt;" lang="zh-CN"><span style="background-color: yellow;">Note：这个教程很好，课程名叫做Videogame Creation and Design，学完这门课程，基本上可以用Blender配合Ogre及其他的开源库做出一个游戏来</span></p>
<p style="margin: 0in 0in 0in 0.375in; font-family: calibri; font-size: 11pt;" lang="zh-CN"><a style="background-color: yellow;" href="http://www.cs.ucr.edu/~macchiea/cs134/"><br></a><a href="http://www.cs.ucr.edu/%7Emacchiea/cs134"></a></p><img src ="http://www.cppblog.com/diceidea/aggbug/60827.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/diceidea/" target="_blank">diceidea</a> 2008-09-03 16:19 <a href="http://www.cppblog.com/diceidea/archive/2008/09/03/60827.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Prison Break IV(01-02)</title><link>http://www.cppblog.com/diceidea/archive/2008/09/02/60781.html</link><dc:creator>diceidea</dc:creator><author>diceidea</author><pubDate>Tue, 02 Sep 2008 15:31:00 GMT</pubDate><guid>http://www.cppblog.com/diceidea/archive/2008/09/02/60781.html</guid><wfw:comment>http://www.cppblog.com/diceidea/comments/60781.html</wfw:comment><comments>http://www.cppblog.com/diceidea/archive/2008/09/02/60781.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/diceidea/comments/commentRss/60781.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/diceidea/services/trackbacks/60781.html</trackback:ping><description><![CDATA[1. in and out. 快去快回<br>2. be right back(I'm right back)<br>3. Do you believe in fate?<br>4. You left this behind 你落下了这个<br>5. likewise. 彼此彼此<br>6. start over. 重新开始<br>If anything goes wrong, we'll have to start over again.<br><br><img src ="http://www.cppblog.com/diceidea/aggbug/60781.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/diceidea/" target="_blank">diceidea</a> 2008-09-02 23:31 <a href="http://www.cppblog.com/diceidea/archive/2008/09/02/60781.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Face the facts that...</title><link>http://www.cppblog.com/diceidea/archive/2008/09/01/60552.html</link><dc:creator>diceidea</dc:creator><author>diceidea</author><pubDate>Sun, 31 Aug 2008 16:16:00 GMT</pubDate><guid>http://www.cppblog.com/diceidea/archive/2008/09/01/60552.html</guid><wfw:comment>http://www.cppblog.com/diceidea/comments/60552.html</wfw:comment><comments>http://www.cppblog.com/diceidea/archive/2008/09/01/60552.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/diceidea/comments/commentRss/60552.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/diceidea/services/trackbacks/60552.html</trackback:ping><description><![CDATA[Today's Fantasy:<br>1. We must <span style="color: red;">face the facts</span> that the future of our products <span style="color: red;">is not optimistic.</span><br>2. I think 27 is an <span style="color: red;">European-size</span> for shoe, right?<br>3. When you want to do something, you'd better make clear first that your work is <span style="color: red;">worth of while or just waste of time</span>.<br>4. When a project starts, I always ask myself a question: <span style="color: red;">Where do I fit</span> in in our team?<br><br><img src ="http://www.cppblog.com/diceidea/aggbug/60552.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/diceidea/" target="_blank">diceidea</a> 2008-09-01 00:16 <a href="http://www.cppblog.com/diceidea/archive/2008/09/01/60552.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>带行号和折叠的在线编辑器--双鱼文本编辑器</title><link>http://www.cppblog.com/diceidea/archive/2008/05/25/51046.html</link><dc:creator>diceidea</dc:creator><author>diceidea</author><pubDate>Sun, 25 May 2008 07:09:00 GMT</pubDate><guid>http://www.cppblog.com/diceidea/archive/2008/05/25/51046.html</guid><wfw:comment>http://www.cppblog.com/diceidea/comments/51046.html</wfw:comment><comments>http://www.cppblog.com/diceidea/archive/2008/05/25/51046.html#Feedback</comments><slash:comments>3</slash:comments><wfw:commentRss>http://www.cppblog.com/diceidea/comments/commentRss/51046.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/diceidea/services/trackbacks/51046.html</trackback:ping><description><![CDATA[<span style="font-size: 14pt;">具体参见<a href="http://www.2fstory.net/blog/View.aspx?blogID=47">http://www.2fstory.net/blog/View.aspx?blogID=47</a>，效果如下，刚才试了一下C++博客的编辑器，我选定了代码折叠，可是没效果。给我自己提个醒，放在：F:\Downloads\GameTools</span>
<div style="border: 1px solid #cccccc; padding: 4px; font-size: 10pt; width: 98%; color: #000000; line-height: 16px; font-family: Verdana,宋体; background-color: #eeeeee;"><font style="color: #eeeeee;">0</font><font style="color: #008080;">1</font> <img src="http://www.2fstory.net/upload/PiscesTextEditor/codeimages/InBlock.gif" align="top">BOOL CAG_RegEx::Eval() <br><font style="color: #eeeeee;">0</font><font style="color: #008080;">2</font> <img style="display: inline;" onclick="CodeFunction6996_shrink_img.style.display='inline';CodeFunction6996_expand_img.style.display='none';CodeFunction6996_expand_text.style.display='none';CodeFunction6996_shrink_text.style.display='inline'" src="http://www.2fstory.net/upload/PiscesTextEditor/codeimages/ExpandedBlockStart.gif" name="CodeFunction6996_expand_img" align="top"><img style="display: none;" onclick="CodeFunction6996_shrink_img.style.display='none';CodeFunction6996_expand_img.style.display='inline';CodeFunction6996_expand_text.style.display='inline';CodeFunction6996_shrink_text.style.display='none';" src="http://www.2fstory.net/upload/PiscesTextEditor/codeimages/ContractedBlock.gif" name="CodeFunction6996_shrink_img" align="top"><span id="CodeFunction6996_shrink_text" style="border: 1px solid #808080; padding: 0px; display: none; color: #808080; background-color: #ffffff;">...</span><span id="CodeFunction6996_expand_text" style="display: inline;">{ <br><font style="color: #eeeeee;">0</font><font style="color: #008080;">3</font> <img src="http://www.2fstory.net/upload/PiscesTextEditor/codeimages/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;<font style="color: #008000;">// First pop the operator from the stack </font><br><font style="color: #eeeeee;">0</font><font style="color: #008080;">4</font> <img src="http://www.2fstory.net/upload/PiscesTextEditor/codeimages/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;<font style="color: #0000ff;">if</font>(m_OperatorStack.size()&gt;0) <br><font style="color: #eeeeee;">0</font><font style="color: #008080;">5</font> <img style="display: inline;" onclick="CodeFunction3210_shrink_img.style.display='inline';CodeFunction3210_expand_img.style.display='none';CodeFunction3210_expand_text.style.display='none';CodeFunction3210_shrink_text.style.display='inline'" src="http://www.2fstory.net/upload/PiscesTextEditor/codeimages/ExpandedSubBlockStart.gif" name="CodeFunction3210_expand_img" align="top"><img style="display: none;" onclick="CodeFunction3210_shrink_img.style.display='none';CodeFunction3210_expand_img.style.display='inline';CodeFunction3210_expand_text.style.display='inline';CodeFunction3210_shrink_text.style.display='none';" src="http://www.2fstory.net/upload/PiscesTextEditor/codeimages/ContractedSubBlock.gif" name="CodeFunction3210_shrink_img" align="top">&nbsp;&nbsp;&nbsp;&nbsp;<span id="CodeFunction3210_shrink_text" style="border: 1px solid #808080; padding: 0px; display: none; color: #808080; background-color: #ffffff;">...</span><span id="CodeFunction3210_expand_text" style="display: inline;">{ <br><font style="color: #eeeeee;">0</font><font style="color: #008080;">6</font> <img src="http://www.2fstory.net/upload/PiscesTextEditor/codeimages/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font style="color: #0000ff;">char</font> chOperator = m_OperatorStack.top(); <br><font style="color: #eeeeee;">0</font><font style="color: #008080;">7</font> <img src="http://www.2fstory.net/upload/PiscesTextEditor/codeimages/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;m_OperatorStack.pop(); <br><font style="color: #eeeeee;">0</font><font style="color: #008080;">8</font> <img src="http://www.2fstory.net/upload/PiscesTextEditor/codeimages/InBlock.gif" align="top"> <br><font style="color: #eeeeee;">0</font><font style="color: #008080;">9</font> <img src="http://www.2fstory.net/upload/PiscesTextEditor/codeimages/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font style="color: #008000;">// Check which operator it is </font><br><font style="color: #008080;">10</font> <img src="http://www.2fstory.net/upload/PiscesTextEditor/codeimages/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font style="color: #0000ff;">switch</font>(chOperator) <br><font style="color: #008080;">11</font> <img style="display: inline;" onclick="CodeFunction3619_shrink_img.style.display='inline';CodeFunction3619_expand_img.style.display='none';CodeFunction3619_expand_text.style.display='none';CodeFunction3619_shrink_text.style.display='inline'" src="http://www.2fstory.net/upload/PiscesTextEditor/codeimages/ExpandedSubBlockStart.gif" name="CodeFunction3619_expand_img" align="top"><img style="display: none;" onclick="CodeFunction3619_shrink_img.style.display='none';CodeFunction3619_expand_img.style.display='inline';CodeFunction3619_expand_text.style.display='inline';CodeFunction3619_shrink_text.style.display='none';" src="http://www.2fstory.net/upload/PiscesTextEditor/codeimages/ContractedSubBlock.gif" name="CodeFunction3619_shrink_img" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span id="CodeFunction3619_shrink_text" style="border: 1px solid #808080; padding: 0px; display: none; color: #808080; background-color: #ffffff;">...</span><span id="CodeFunction3619_expand_text" style="display: inline;">{ <br><font style="color: #008080;">12</font> <img src="http://www.2fstory.net/upload/PiscesTextEditor/codeimages/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font style="color: #0000ff;">case</font> 42: <br><font style="color: #008080;">13</font> <img src="http://www.2fstory.net/upload/PiscesTextEditor/codeimages/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font style="color: #0000ff;">return</font> Star(); <br><font style="color: #008080;">14</font> <img src="http://www.2fstory.net/upload/PiscesTextEditor/codeimages/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font style="color: #0000ff;">break</font>; <br><font style="color: #008080;">15</font> <img src="http://www.2fstory.net/upload/PiscesTextEditor/codeimages/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font style="color: #0000ff;">case</font> 124: <br><font style="color: #008080;">16</font> <img src="http://www.2fstory.net/upload/PiscesTextEditor/codeimages/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font style="color: #0000ff;">return</font> Union(); <br><font style="color: #008080;">17</font> <img src="http://www.2fstory.net/upload/PiscesTextEditor/codeimages/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font style="color: #0000ff;">break</font>; <br><font style="color: #008080;">18</font> <img src="http://www.2fstory.net/upload/PiscesTextEditor/codeimages/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font style="color: #0000ff;">case</font> 8: <br><font style="color: #008080;">19</font> <img src="http://www.2fstory.net/upload/PiscesTextEditor/codeimages/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font style="color: #0000ff;">return</font> Concat(); <br><font style="color: #008080;">20</font> <img src="http://www.2fstory.net/upload/PiscesTextEditor/codeimages/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font style="color: #0000ff;">break</font>; <br><font style="color: #008080;">21</font> <img src="http://www.2fstory.net/upload/PiscesTextEditor/codeimages/ExpandedSubBlockEnd.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</span> <br><font style="color: #008080;">22</font> <img src="http://www.2fstory.net/upload/PiscesTextEditor/codeimages/InBlock.gif" align="top"> <br><font style="color: #008080;">23</font> <img src="http://www.2fstory.net/upload/PiscesTextEditor/codeimages/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font style="color: #0000ff;">return</font> FALSE; <br><font style="color: #008080;">24</font> <img src="http://www.2fstory.net/upload/PiscesTextEditor/codeimages/ExpandedSubBlockEnd.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;}</span> <br><font style="color: #008080;">25</font> <img src="http://www.2fstory.net/upload/PiscesTextEditor/codeimages/InBlock.gif" align="top"> <br><font style="color: #008080;">26</font> <img src="http://www.2fstory.net/upload/PiscesTextEditor/codeimages/InBlock.gif" align="top">&nbsp;&nbsp;&nbsp;&nbsp;<font style="color: #0000ff;">return</font> FALSE; <br><font style="color: #008080;">27</font> <img src="http://www.2fstory.net/upload/PiscesTextEditor/codeimages/ExpandedBlockEnd.gif" align="top">}</span></div>
<div style="border: 1px solid #cccccc; padding: 4px; font-size: 10pt; width: 98%; color: #000000; line-height: 16px; font-family: Verdana,宋体; background-color: #eeeeee;"><span id="CodeFunction5265_expand_text" style="display: inline;"></span></div><img src ="http://www.cppblog.com/diceidea/aggbug/51046.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/diceidea/" target="_blank">diceidea</a> 2008-05-25 15:09 <a href="http://www.cppblog.com/diceidea/archive/2008/05/25/51046.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>批处理source control(Handy source control using batch file)</title><link>http://www.cppblog.com/diceidea/archive/2008/05/24/50975.html</link><dc:creator>diceidea</dc:creator><author>diceidea</author><pubDate>Sat, 24 May 2008 13:41:00 GMT</pubDate><guid>http://www.cppblog.com/diceidea/archive/2008/05/24/50975.html</guid><wfw:comment>http://www.cppblog.com/diceidea/comments/50975.html</wfw:comment><comments>http://www.cppblog.com/diceidea/archive/2008/05/24/50975.html#Feedback</comments><slash:comments>2</slash:comments><wfw:commentRss>http://www.cppblog.com/diceidea/comments/commentRss/50975.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/diceidea/services/trackbacks/50975.html</trackback:ping><description><![CDATA[写了个批处理的source control, 用很野蛮的办法, 就是把当前目录下的源程序backup到一个用户指定目录里，perforce虽然很好用，可是我的本本太慢了，打开VS2005+perforce差不多要1分钟，下个月买台式，这个批处理也就没什么用了。<br><a title=SourceControl.bat href="http://www.cppblog.com/Files/diceidea/SourceControl.txt">SourceControl.bat</a>(下载后更换后缀，运行时会提示复制源程序到哪个文件夹里，一般我用当天的日期) 
<img src ="http://www.cppblog.com/diceidea/aggbug/50975.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/diceidea/" target="_blank">diceidea</a> 2008-05-24 21:41 <a href="http://www.cppblog.com/diceidea/archive/2008/05/24/50975.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>DFA和lexical analysis</title><link>http://www.cppblog.com/diceidea/archive/2008/05/24/50954.html</link><dc:creator>diceidea</dc:creator><author>diceidea</author><pubDate>Sat, 24 May 2008 05:59:00 GMT</pubDate><guid>http://www.cppblog.com/diceidea/archive/2008/05/24/50954.html</guid><wfw:comment>http://www.cppblog.com/diceidea/comments/50954.html</wfw:comment><comments>http://www.cppblog.com/diceidea/archive/2008/05/24/50954.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/diceidea/comments/commentRss/50954.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/diceidea/services/trackbacks/50954.html</trackback:ping><description><![CDATA[对于hand written的lexical analyzer来说，NFA和DFA的运用是不可避免的，除非你的grammer十分简单。<br>一旦给出了source program(也就是你想处理的character stream)的一个pattern的正则表达式，就可以构造对应的NFA，然后转换为DFA，这个DFA就可以用来处理你的source program, 将里面能够match这个pattern的lexeme全都找出来。按照这样的流程，对于一种编程语言，不管是常用的语言，还是脚本语言，只要对所有的pattern构造DFA，就能够写出自己的lexical analyzer了。<br>有两篇关于正则表达式到DFA的文章写的很好：<br><span id="ctl00_ArticleTopHeader_ArticleTitle" class="ArticleTopTitle">1.Writing own regular expression parser</span>
<strong>By <a href="http://www.codeproject.com/script/Articles/MemberArticles.aspx?amid=30261">Amer Gerzic英文的</a></strong><span id="ctl00_ArticleTopHeader_ArticleTitle" class="ArticleTopTitle"><br></span><a>http://www.codeproject.com/KB/recipes/OwnRegExpressionsParser.aspx<br>有源码<br></a>2. <a href="http://www.cppblog.com/vczh/archive/2008/05/22/50763.html" id="viewpost1_TitleUrl" class="postTitle2">《构造正则表达式引擎》新鲜出炉啦！</a>中文的，by vczh,华南理工大学<br>http://www.cppblog.com/vczh/archive/2008/05/22/50763.html<br>阅读完上面两篇文章，写个能够运行的lexer就不成问题了。<br>另外附上龙书（Compilers, principles techniques and tools）里一段token,pattern和lexeme术语的区别：<br>1. A t o k e n&nbsp; is&nbsp; a&nbsp; pair&nbsp; consisting&nbsp; of&nbsp; a&nbsp; token&nbsp; name&nbsp; and&nbsp; an optional attribute <br>value.&nbsp;&nbsp; The&nbsp; token&nbsp; name&nbsp; is&nbsp; <span style="background-color: yellow;">an&nbsp; abstract</span>&nbsp; symbol&nbsp; representing&nbsp; a&nbsp; kind&nbsp; of <br><span style="background-color: yellow;">lexical unit</span><span style="background-color: yellow;">(lexeme)</span>, e.g., a&nbsp; particular keyword, or a sequence of&nbsp; input&nbsp; characters <br>denoting an identifier.&nbsp; The token&nbsp; names are the input&nbsp; symbols that the <br>parser&nbsp; processes.&nbsp; In what&nbsp; follows, we&nbsp; shall generally write the name of&nbsp; a <br>token&nbsp; in boldface.&nbsp; We&nbsp; will often refer to a token&nbsp; by&nbsp; its token name. <br>2. A pattern is a description of the form that the lexemes of&nbsp; a token may take. <br>In&nbsp; the case of&nbsp; a&nbsp; keyword as&nbsp; a token,&nbsp; the pattern&nbsp; is just&nbsp; the sequence of <br>characters that form the keyword.&nbsp; For identifiers and some other tokens, <br>the pattern is a more complex structure that is matched by many strings. <br>3. A lexeme is a sequence of&nbsp; characters in the source program that matches <br>the&nbsp; pattern&nbsp; for&nbsp; a&nbsp; token&nbsp; and&nbsp; is&nbsp; identified&nbsp; by&nbsp; the&nbsp; lexical&nbsp; analyzer&nbsp; as&nbsp; an <br><span style="background-color: yellow;">instance of&nbsp; that token. </span><br>&nbsp;notes: <br>1. more than&nbsp; one lexeme&nbsp; can&nbsp; match&nbsp; a&nbsp; pattern<br>2. 看看example 3.1<br><br><br> <img src ="http://www.cppblog.com/diceidea/aggbug/50954.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/diceidea/" target="_blank">diceidea</a> 2008-05-24 13:59 <a href="http://www.cppblog.com/diceidea/archive/2008/05/24/50954.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Material related</title><link>http://www.cppblog.com/diceidea/archive/2008/05/12/49677.html</link><dc:creator>diceidea</dc:creator><author>diceidea</author><pubDate>Mon, 12 May 2008 14:53:00 GMT</pubDate><guid>http://www.cppblog.com/diceidea/archive/2008/05/12/49677.html</guid><wfw:comment>http://www.cppblog.com/diceidea/comments/49677.html</wfw:comment><comments>http://www.cppblog.com/diceidea/archive/2008/05/12/49677.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/diceidea/comments/commentRss/49677.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/diceidea/services/trackbacks/49677.html</trackback:ping><description><![CDATA[Compiler Principles Techniques and Tools by Alfred Aho（CPTAT）Dragon book<br>此书极为通俗易懂，尤其是在布局上，第二章安排了一个小compiler的实现，而且先从parser开始，不是通常的lexical analysis。阅读完第二章，我已对编译器如何写有了初步的认识，当然，这期间也穿插着阅读了别的电子书，还有别人给我的大学教材，以及网上的资料。那本大学教材是数学性最强的，可惜是最难读懂的，因为作者在运用大量符号的时候省略了很多解释工作，而且直到看完一章我还不知道这一章是干什么的，后来先看Dragon book,再看这本教材，发现他们的结构原来是差不多的，为什么这本教材就那么难懂呢？<br><br>如果你想学习编译原理，想写自己的parser，Dragon book绝对是居家旅行，杀人必备之宝物。<br><br> <img src ="http://www.cppblog.com/diceidea/aggbug/49677.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/diceidea/" target="_blank">diceidea</a> 2008-05-12 22:53 <a href="http://www.cppblog.com/diceidea/archive/2008/05/12/49677.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>