以元智大學3D校園場景為背景的一個小game.
主要意思是: 一個小機器人被困在元智大學的一個地方,你要拯救他, 但是拯救他需要在找到場景中的3個寶物才可以. 這個3個寶物的位置random產生, 你需要在3分鐘內全部拿到, 主要尋找的時候不能碰到bomb, 不讓就會死亡...
在行走的過程中, 有下角落會有一個小地圖, 大致表明你所在之位置與所需找物品之位置.
場景建立與skybox之中, skybox使用貼圖.
元智各個建築採用load obj model的方式呈現.
你所控制的機器人有幾個model組成, 行走時候不斷切換, 以達到走路時的動作效果.
2,過程與展示:
圖片:
開始game時的提示說明.
begin your game, right corner of the screen is the small map, red point is your position, green position is the position of treasures.
Now your friend say to you how to save him, that is find the treasures.
Then you begin your treasures finding. 從此踏上了尋寶之路...
See that , that is one. you are happy, and you are going to pick it.
-----由於錄影軟體限制, 錄製太長就會出現錯誤. 所以下面是分段的錄影.
first you find your friend..
find the treasures....
you can see you friend is rescued after you have found all the treasures...
-------------
3,心得與討論:
這個program的寫作費了不少功夫, 第一個問題, 文字如何顯示的?
這裡用到了glWindowPos, 本來這個函數子OpenGL1.4之後都支持的, 但是在windows系統上卻一直不能用, 不過好在glWindowPos並不複雜, 我把它放到了我的程式中的glwindow.h裡面, 然後在需要的地方就inclde "glwindowpos.h"就可以使用了.
Android機器人行走的問題. 此處引用3個不同的Android robot model, 用以表示不同的動作, 放到3個displaylist裡面, 向前或後時循環調用, 就可以出來這樣的效果了. 雖不精緻, 然大抵還是可以的.
至於skybox的問題, 自己已經比較熟悉了, 於是並不感到困難.
視角的變化亦是前面已經做過了的.
texture mapping 主要在skybox上面, model裡面的texture由於是jpg格式, 需要一些修改, 暫時還沒有做, 故看上去有的有一些顏色, 其實是material+lighting的緣故.
-------------
keyboard function:
w: look up
s: look down
a: turn left
d: trun right
UP: move forward
DOWN: move back
LEFT: move left
RIGHT: move right
-------------














