飞机射击游戏设计

上传人:j****9 文档编号:46045918 上传时间:2018-06-21 格式:DOC 页数:3 大小:54.50KB
返回 下载 相关 举报
飞机射击游戏设计_第1页
第1页 / 共3页
飞机射击游戏设计_第2页
第2页 / 共3页
飞机射击游戏设计_第3页
第3页 / 共3页
亲,该文档总共3页,全部预览完了,如果喜欢就下载吧!
资源描述

《飞机射击游戏设计》由会员分享,可在线阅读,更多相关《飞机射击游戏设计(3页珍藏版)》请在金锄头文库上搜索。

1、林克霖 BIT094109飛機射擊遊戲設計1. 設計天空場景 (1) add background 加入 water.gif(2) add room A. vertical speed:2(設計場景垂直移動) B. 加入 back water 背景圖2. 設計海島 (1) add sprite:加入 spr_island1, spr_island2, spr_island3 元素 (2) add object:加入 obj_ island1, obj_ island2, obj_ island3 物件 (3) 設定 Depth 參數 Depth:100003. 遊戲場景與物件設計 (1) 放置

2、 obj_island1 到場景(room) (2) 修改 obj_island1 的 eventcreateset the vertical speed(設定垂直移動 速度為 2) (3) 修改 obj_island1 的 eventstepif an expression is true y room_height (4) 修改 obj_island1 的 eventstepjump to a given position (random(room_width),-65) (5) obj_island2、obj_island3 也做同樣上述(1)(4)的修改。4.設計飛機物件 (1) ad

3、d sprite: 加入 spr_myplane *飛機物件是否會有碰撞的行為發生勾選 precise collision checking *飛機圖檔有無中心點的問題,按下 center,讓飛機置於中心點 (2) add object: 加入 obj_myplane (3) 將飛機加入遊戲場景(room) (4) 控制飛機的位置,設計鍵盤 上下左右 鍵控來控制飛機上下左右移動 A. 往左鍵 eventkeyboardleft,加入 if an expression is true x40,再加入 Jump to a given position(-4,0) B. 往右鍵 eventkeybo

4、ardleft,加入 if an expression is truex 40,再加入 Jump to a given position(0,-2) D. 往下鍵 eventkeyboardleft,加入 if an expression is truey Create a obj_bullet at ( 0,-16 ) (2)設計限制 玩家 只能單點發射子彈 a.點選 obj_myplane 物件 b. 先新增一變數 add eventcreateSet variable|:Can Shoot =1 c.到 event 事件,點選 space,先加入If an expression is t

5、rue” if can_shoot = 1”,如果變數 can_shoot = 1,就進行子彈發射” d. 加入 start of a blocke.Add event createkeyboard Create a obj_bullet at relative position ( 0,-16 ) f.加入 Set variable:Can Shoot =0:當按 space 發射完子彈後,讓變 數 Can shoot=0,讓玩家無法連續發射。 g. 加入 set an Alarm block 0 to 15:加入計時器,再經過 15 步後, 進行別的動作。 h. 加入 end of a b

6、lock i.Add event Alarm 0加入 Set variable|:Can Shoot =1:加入 1 個 計時器後,經過 15 個時間塊,可以再繼續射擊子彈。7.設計敵機(1) add sprite:加入 spr_enemy1 *敵機物件是否會有碰撞的行為發生勾選 precise collision checking *敵機圖檔有無中心點的問題,按下 center,讓敵機置於中心點 (2) add object:加入 obj_enemy1 Add eventcreateset the vertical speed 4:設定垂直移動速度為 4 (3) 敵機飛超過螢幕下方時,重新在

7、螢幕上方出現。 Add event Step Event加入If an expression is trueif y room_height+32jump to a given position (random(room_width),-16) (4) 當敵機碰撞到子彈時 a.子彈消失,敵機消失,敵機再次重新出現 *Add event Collision Event點選 obj_bullet *加入 Destroy the instance 點選 for other object:摧毀敵機,也讓子彈消 失 *Jump to a given position (random(room_width

8、),-16):敵機重新出現 b.產生爆炸效果 *增加 spr_explosion1 和 obj_explosion1 * Add event Other Even Animation End destroy the instanceself: 設定 obj_explosion1 於 Animation End 時消失 c. 將爆炸效果和子彈消失,敵機重新出現進行連結 * obj_enemy1Collision Event obj_bulletcreate instance of object:obj_explosion1 at relative position (0,0) d.加入爆炸音效

9、* 增加 snd_play_explosion1 * 加入 爆炸音效於 Collision Event with object obj_bullet * obj_enemy1Collision Event obj_bullet play sound snd_explosion1 e.加入得分機制 *set the score relative to 5 (5)當敵機碰撞到自己的飛機時collision(obj_plane)Change instance into obj_explosion1 Play sound snd_explosion2 Destory the instance(Self)

展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 生活休闲 > 社会民生

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号