2008年9月10日
#
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.
2008年9月8日
#
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.
2008年9月7日
#
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. 這個(gè)標(biāo)題讓我崩潰了
2008年9月3日
#
- 開(kāi)發(fā)背景
Ogre和Blender都是開(kāi)源軟件中的佼佼者,前者提供了作為一個(gè)real time renderer的各種要素,后者作為offline的animation renderer和model工具, 根據(jù)Ogre官網(wǎng)上的資料及一些開(kāi)源愛(ài)好者的建議,可以作為level editor來(lái)與外部的renderer或者是游戲引擎合作。有了這兩個(gè)強(qiáng)大的工具,其他諸如聲音物理等等模塊可以依賴(lài)于其他的開(kāi)源工具很方便的解決,這也為我們呈現(xiàn)了一種低成本的游戲開(kāi)發(fā)解決方案。
- 案例
下面是一個(gè)使用這些混合物來(lái)開(kāi)發(fā)的游戲(Mulver),質(zhì)量考究:
以下文字和圖片摘自:http://www.ogre3d.org/phpBB2/viewtopic.php?t=29907&postdays=0&postorder=asc&start=0,版權(quán)屬于原作者
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>
- 開(kāi)發(fā)步驟:
網(wǎng)上有一些關(guān)于如何合作使用Blender和Ogre的建議:
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. Don’t 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. 參考資料:
加州大學(xué)河濱分校的課程:
http://www.cs.ucr.edu/~macchiea/cs134/
Note:這個(gè)教程很好,課程名叫做Videogame Creation and Design,學(xué)完這門(mén)課程,基本上可以用Blender配合Ogre及其他的開(kāi)源庫(kù)做出一個(gè)游戲來(lái)
2008年9月2日
#
1. in and out. 快去快回
2. be right back(I'm right back)
3. Do you believe in fate?
4. You left this behind 你落下了這個(gè)
5. likewise. 彼此彼此
6. start over. 重新開(kāi)始
If anything goes wrong, we'll have to start over again.
2008年9月1日
#
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?
2008年5月25日
#
具體參見(jiàn)http://www.2fstory.net/blog/View.aspx?blogID=47,效果如下,剛才試了一下C++博客的編輯器,我選定了代碼折疊,可是沒(méi)效果。給我自己提個(gè)醒,放在:F:\Downloads\GameTools
2008年5月24日
#
寫(xiě)了個(gè)批處理的source control, 用很野蠻的辦法, 就是把當(dāng)前目錄下的源程序backup到一個(gè)用戶(hù)指定目錄里,perforce雖然很好用,可是我的本本太慢了,打開(kāi)VS2005+perforce差不多要1分鐘,下個(gè)月買(mǎi)臺(tái)式,這個(gè)批處理也就沒(méi)什么用了。
SourceControl.bat(下載后更換后綴,運(yùn)行時(shí)會(huì)提示復(fù)制源程序到哪個(gè)文件夾里,一般我用當(dāng)天的日期)
對(duì)于hand written的lexical analyzer來(lái)說(shuō),NFA和DFA的運(yùn)用是不可避免的,除非你的grammer十分簡(jiǎn)單。
一旦給出了source program(也就是你想處理的character stream)的一個(gè)pattern的正則表達(dá)式,就可以構(gòu)造對(duì)應(yīng)的NFA,然后轉(zhuǎn)換為DFA,這個(gè)DFA就可以用來(lái)處理你的source program, 將里面能夠match這個(gè)pattern的lexeme全都找出來(lái)。按照這樣的流程,對(duì)于一種編程語(yǔ)言,不管是常用的語(yǔ)言,還是腳本語(yǔ)言,只要對(duì)所有的pattern構(gòu)造DFA,就能夠?qū)懗鲎约旱膌exical analyzer了。
有兩篇關(guān)于正則表達(dá)式到DFA的文章寫(xiě)的很好:
1.Writing own regular expression parser
By Amer Gerzic英文的
http://www.codeproject.com/KB/recipes/OwnRegExpressionsParser.aspx
有源碼
2.
《構(gòu)造正則表達(dá)式引擎》新鮮出爐啦!中文的,by vczh,華南理工大學(xué)
http://www.shnenglu.com/vczh/archive/2008/05/22/50763.html
閱讀完上面兩篇文章,寫(xiě)個(gè)能夠運(yùn)行的lexer就不成問(wèn)題了。
另外附上龍書(shū)(Compilers, principles techniques and tools)里一段token,pattern和lexeme術(shù)語(yǔ)的區(qū)別:
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
2008年5月12日
#
Compiler Principles Techniques and Tools by Alfred Aho(CPTAT)Dragon book
此書(shū)極為通俗易懂,尤其是在布局上,第二章安排了一個(gè)小compiler的實(shí)現(xiàn),而且先從parser開(kāi)始,不是通常的lexical analysis。閱讀完第二章,我已對(duì)編譯器如何寫(xiě)有了初步的認(rèn)識(shí),當(dāng)然,這期間也穿插著閱讀了別的電子書(shū),還有別人給我的大學(xué)教材,以及網(wǎng)上的資料。那本大學(xué)教材是數(shù)學(xué)性最強(qiáng)的,可惜是最難讀懂的,因?yàn)樽髡咴谶\(yùn)用大量符號(hào)的時(shí)候省略了很多解釋工作,而且直到看完一章我還不知道這一章是干什么的,后來(lái)先看Dragon book,再看這本教材,發(fā)現(xiàn)他們的結(jié)構(gòu)原來(lái)是差不多的,為什么這本教材就那么難懂呢?
如果你想學(xué)習(xí)編譯原理,想寫(xiě)自己的parser,Dragon book絕對(duì)是居家旅行,殺人必備之寶物。