diceidea

parser

常用链接

Others

有用的东西

最新评论

2008年9月10日 #

Sep.10.2008

1. Take it a step further, I want to be your husband, hehe.
2. Following is some issues I ran across.
3. The title had me cracking up.

posted @ 2008-09-10 23:40 diceidea 阅读(159) | 评论 (0)编辑 收藏

2008年9月8日 #

Golden Shield Project(GSP)

The Golden Shield Project (Chinese: ; pinyin: jīndùn gōngchéng), sometimes referred to as the Great Firewall of China, is a censorship and surveillance project operated by the Ministry of Public Security (MPS) of the People's Republic of China. The project started in 1998 and began operations in November of 2003.
Googlepage is now forbidden by GSP.

posted @ 2008-09-08 22:36 diceidea 阅读(405) | 评论 (0)编辑 收藏

2008年9月7日 #

Sep.07.2008

1. I am very grateful to my parents
2. Writing is the only art that must be learned by wrote.
3. She is not my type.
4. A thousand percent.
5. stand by 待命
6. That sucked. 糟透了??? Things that suck
7. The title had me cracking up. 这个标题让我崩溃了

posted @ 2008-09-07 22:10 diceidea 阅读(140) | 评论 (0)编辑 收藏

2008年9月3日 #

Blender+Ogre Preview

  1. 开发背景

OgreBlender都是开源软件中的佼佼者,前者提供了作为一个real time renderer的各种要素,后者作为offlineanimation renderermodel工具, 根据Ogre官网上的资料及一些开源爱好者的建议,可以作为level editor来与外部的renderer或者是游戏引擎合作。有了这两个强大的工具,其他诸如声音物理等等模块可以依赖于其他的开源工具很方便的解决,这也为我们呈现了一种低成本的游戏开发解决方案。

 

 

  1. 案例

下面是一个使用这些混合物来开发的游戏(Mulver),质量考究:

以下文字和图片摘自:http://www.ogre3d.org/phpBB2/viewtopic.php?t=29907&postdays=0&postorder=asc&start=0,版权属于原作者

My alltime favourite game is Super Mario 64. In my eyes its still the king of the 3D Platform game category. Some people http://www.stevestreeting.com/?p=448 just dont get this genre though.

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.

 

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

 

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.

 

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...

 

  Here is a level concept with good old pen & paper I wrote a couple of days ago:


Here is the level starting to take shape in Blender. Last shot is a Blender render of the level.
......


Here is the level in Ogre:
......



AVI video (Microsoft encoded Im afraid):
Video ~10Mb (mp42 codec)

Older format:
Video ~10Mb (mpg4 codec)



A couple of other levels Ive been toying with:
...

 

Pasted from <http://www.ogre3d.org/phpBB2/viewtopic.php?t=39835&view=next&sid=ce193664e1d3d7c4af509e6f4e2718c6>

 

  1. 开发步骤:

网上有一些关于如何合作使用BlenderOgre的建议:

The Blender-Ogre process

So, it is decision time - how will I go about making levels Three level choices, as I see it :

1) Build my own level editor, build an importer, generate the levels

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

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

My understanding is that 3 has speed advantages. Dont really understand it all yet. More research needed. Probably NOT going to do 1, though - It’d be doable, particularly if I limited myself to rectangular, perpendicular rooms, but it’d be nice to be able to NOT limit myself that way.

More reading, more research.

 

Pasted from <http://israndomrandom.com/>

 

  4. 参考资料:

加州大学河滨分校的课程:

http://www.cs.ucr.edu/~macchiea/cs134/

Note:这个教程很好,课程名叫做Videogame Creation and Design,学完这门课程,基本上可以用Blender配合Ogre及其他的开源库做出一个游戏来


posted @ 2008-09-03 16:19 diceidea 阅读(1532) | 评论 (0)编辑 收藏

2008年9月2日 #

Prison Break IV(01-02)

1. in and out. 快去快回
2. be right back(I'm right back)
3. Do you believe in fate?
4. You left this behind 你落下了这个
5. likewise. 彼此彼此
6. start over. 重新开始
If anything goes wrong, we'll have to start over again.

posted @ 2008-09-02 23:31 diceidea 阅读(119) | 评论 (0)编辑 收藏

2008年9月1日 #

Face the facts that...

Today's Fantasy:
1. We must face the facts that the future of our products is not optimistic.
2. I think 27 is an European-size for shoe, right?
3. When you want to do something, you'd better make clear first that your work is worth of while or just waste of time.
4. When a project starts, I always ask myself a question: Where do I fit in in our team?

posted @ 2008-09-01 00:16 diceidea 阅读(171) | 评论 (0)编辑 收藏

2008年5月25日 #

带行号和折叠的在线编辑器--双鱼文本编辑器

具体参见http://www.2fstory.net/blog/View.aspx?blogID=47,效果如下,刚才试了一下C++博客的编辑器,我选定了代码折叠,可是没效果。给我自己提个醒,放在:F:\Downloads\GameTools
01 BOOL CAG_RegEx::Eval()
02 {
03     // First pop the operator from the stack
04     if(m_OperatorStack.size()>0)
05     {
06         char chOperator = m_OperatorStack.top();
07         m_OperatorStack.pop();
08
09         // Check which operator it is
10         switch(chOperator)
11         {
12         case 42:
13             return Star();
14             break;
15         case 124:
16             return Union();
17             break;
18         case 8:
19             return Concat();
20             break;
21         }

22
23         return FALSE;
24     }

25
26     return FALSE;
27 }

posted @ 2008-05-25 15:09 diceidea 阅读(1422) | 评论 (3)编辑 收藏

2008年5月24日 #

批处理source control(Handy source control using batch file)

写了个批处理的source control, 用很野蛮的办法, 就是把当前目录下的源程序backup到一个用户指定目录里,perforce虽然很好用,可是我的本本太慢了,打开VS2005+perforce差不多要1分钟,下个月买台式,这个批处理也就没什么用了。
SourceControl.bat(下载后更换后缀,运行时会提示复制源程序到哪个文件夹里,一般我用当天的日期)

posted @ 2008-05-24 21:41 diceidea 阅读(323) | 评论 (2)编辑 收藏

DFA和lexical analysis

对于hand written的lexical analyzer来说,NFA和DFA的运用是不可避免的,除非你的grammer十分简单。
一旦给出了source program(也就是你想处理的character stream)的一个pattern的正则表达式,就可以构造对应的NFA,然后转换为DFA,这个DFA就可以用来处理你的source program, 将里面能够match这个pattern的lexeme全都找出来。按照这样的流程,对于一种编程语言,不管是常用的语言,还是脚本语言,只要对所有的pattern构造DFA,就能够写出自己的lexical analyzer了。
有两篇关于正则表达式到DFA的文章写的很好:
1.Writing own regular expression parser By Amer Gerzic英文的
http://www.codeproject.com/KB/recipes/OwnRegExpressionsParser.aspx
有源码
2. 《构造正则表达式引擎》新鲜出炉啦!中文的,by vczh,华南理工大学
http://www.cppblog.com/vczh/archive/2008/05/22/50763.html
阅读完上面两篇文章,写个能够运行的lexer就不成问题了。
另外附上龙书(Compilers, principles techniques and tools)里一段token,pattern和lexeme术语的区别:
1. A t o k e n  is  a  pair  consisting  of  a  token  name  and  an optional attribute
value.   The  token  name  is  an  abstract  symbol  representing  a  kind  of
lexical unit(lexeme), e.g., a  particular keyword, or a sequence of  input  characters
denoting an identifier.  The token  names are the input  symbols that the
parser  processes.  In what  follows, we  shall generally write the name of  a
token  in boldface.  We  will often refer to a token  by  its token name.
2. A pattern is a description of the form that the lexemes of  a token may take.
In  the case of  a  keyword as  a token,  the pattern  is just  the sequence of
characters that form the keyword.  For identifiers and some other tokens,
the pattern is a more complex structure that is matched by many strings.
3. A lexeme is a sequence of  characters in the source program that matches
the  pattern  for  a  token  and  is  identified  by  the  lexical  analyzer  as  an
instance of  that token.
 notes:
1. more than  one lexeme  can  match  a  pattern
2. 看看example 3.1


posted @ 2008-05-24 13:59 diceidea 阅读(516) | 评论 (0)编辑 收藏

2008年5月12日 #

Material related

Compiler Principles Techniques and Tools by Alfred Aho(CPTAT)Dragon book
此书极为通俗易懂,尤其是在布局上,第二章安排了一个小compiler的实现,而且先从parser开始,不是通常的lexical analysis。阅读完第二章,我已对编译器如何写有了初步的认识,当然,这期间也穿插着阅读了别的电子书,还有别人给我的大学教材,以及网上的资料。那本大学教材是数学性最强的,可惜是最难读懂的,因为作者在运用大量符号的时候省略了很多解释工作,而且直到看完一章我还不知道这一章是干什么的,后来先看Dragon book,再看这本教材,发现他们的结构原来是差不多的,为什么这本教材就那么难懂呢?

如果你想学习编译原理,想写自己的parser,Dragon book绝对是居家旅行,杀人必备之宝物。

posted @ 2008-05-12 22:53 diceidea 阅读(260) | 评论 (0)编辑 收藏

仅列出标题  下一页