手機遊戲的開發—超級瑪麗的設計與實現JBUILDER

學識都 人氣:1.26W
畢業論文

目錄
前  言 1
1 相關技術介紹 2
1.1 J2ME介紹 2
1.2 手機遊戲應具有的特徵 2
1.3 開發環境 3
1.4 JAVA語言特點 3
1.5 關於JBUILDER 2005 4
1.6 關於WIRELESS TOOL KIT 5
1.7 JAVA APPICATION MANAGER 5
1.8 本章小結 5
2 需求分析 6
2.1 功能需求分析 6
2.2 可行性研究 6
3 概要設計 8
3.1 本程序需要解決的主要技術問題 8
3.2 遊戲的總體架構 8
3.3 程序的類結構 10
3.5 CANVAS類 13
3.6 GRAPHICS類 13
3.7 MIDP1.0技術下的繪製背景技術 13
3.8 MIDP2.0新增的GAMECANVAS包 14
3.9 PNG圖片格式 14
3.10 內存檢測器 15
3.11 關於混淆器 15
3.12 本章小結 15
4 詳細設計及實現 16
4.1 地圖繪製的實現 16
4.2 碰撞檢測 17
4.3 鍵控處理的實現 19
4.4 主要人物瑪麗的實現 21
4.5 烏龜的實現 26
4.6 菜單的實現 26
4.7 遊戲的主CANVAS類的實現 28
4.8 本章小結 32
5 遊戲的優化及注意點 33
5.1 遊戲中屏幕繪製技術的優化 33
5.2 遊戲中新對象的產生和垃圾收集 33
5.3 遊戲優化中時間、空間的權衡 34
5.4 遊戲中關於來電掛起和恢復處理的注意點 34
5.5 本章小結 35
6 總結 36
6.1 小結 36
6.2 感想 36
參考文獻 37
致謝 38


手機遊戲開發
—超級瑪麗的設計與實現
 
摘要:在現在這個時候,手機中軟件技術出現前所未有的成熟,各種工具都已經開始簡單化並逐步完善,無線終端性能在不斷提高,運行速度加快,傳輸能力加強,內存的增大,色彩、清晰度更高,終端價格的下降,以及彩屏手機用戶的增長,使得中國手機遊戲市場空前繁榮。
   隨着手機的日益普及、Java功能在移動設備上的實現,Java應用程序產生的手機增值服務逐漸體現出其影響力,對豐富人們的生活內容、提供快捷的資訊起着不可忽視的作用。本遊戲以J2ME爲主要技術核心,藉助WTK、JBUILDER等強大的工具支持,通過各種核心類實現了遊戲中的主要人物和角色,並通過各類函數實現了地圖的繪製、碰撞檢測、鍵控、滾屏等核心功能,並對遊戲進行了1系列優化,例如產生新對象,收集垃圾,對時間、空間的權衡,來電掛起和恢復處理,實現了1個手機版的超級瑪麗。
關鍵詞:J2ME;WTK;手機遊戲

The Mobile Game Development
—The Designing And Realizing Of The Super Mario
 
Abstract:At present time, in the handset the software technology appears the unprecedented maturity, each kind of tools all already starts the simplification and gradually consummates, the wireless terminal performance unceasingly is enhancing, the running rate speed up, the through-put capacity strengthens, memory increasing, the color, the clarity are higher, the terminal price drops, as well as the colored tablet handset users growth, caused the Chinese handset game market unprecedented prosperity.
Along with the handset daily popularization, the realization of the Java function on the mobile equipment, the handset increment service which the Java application procedure produces gradually manifests its influence, and plays the noticeable role to the rich peoples life content, providing the quick information. The present paper focuses to the J2ME technology application, develops section to be possible the commercial handset game procedure. This game takes J2ME as the main technical core, with the aid of WTK, JBUILDER and so on the powerful tools’ support, has realized main character and the roles in the game. Through each kind of core class, and realized core function like map plan, collision examination, key modulation, rolls screen through various class functions, and has carried on a series of optimizations to the game, for example producing the new object, collecting trashes, to the time, spatial measuring, call and restoring processing, and has realized a handset version super Mary

Keyword:J2ME;WTK;The game of the mobilephone
前  言
在信息社會中,手機及其他無線設備越來越多的走進普通百姓的工作和生活,隨着信息網絡化的不斷進展,手機及其他無線設備上網絡勢在必行。但是傳統手機存在以下弊端:
1.  傳統手機出廠時均由硬件廠商固化程序,程序不能增加、刪除,有了錯誤也不能更新、修改,若要增加新功能必須另換1部手機。
2.  傳統手機訪問互聯網是通過WAP(Wireless Application Protocal),所有網絡資源必須接通網絡才能在線訪問,非常耗時、費用亦很高。
而Java技術在無線應用方面的優勢非常明顯:
1.  應用程序可按需下載,而不是購買由硬件商提供的套件,可升級空間大。
2.  Java技術提供了1個類庫,它使的應用開發商可以創建更爲直覺、豐富的用戶界面(GUI);
3.  Java技術使網絡帶寬的應用更爲有效,因爲應用程序可以下載到器件上,並在本地運行,僅僅是在連接到服務器時纔會佔用網絡帶寬。
基於以上分析,Java手機將是未來手機的發展方向,是業界的熱點。而隨着無線電子商務等業務的.發展,JAVA的系列產品之1J2ME被引入無線領域,它爲無線應用的客戶端和服務器端建立了完整的開發、部署環境。隨着J2ME的應用,它爲移動互聯引入了1種新的模型,即允許手機可以從互聯網上下載各種應用程序,並在手機創造可執行環境離線運行這些程序。因此,在移動通信業第1次爲遊戲開發商創造了巨大的商業機會,手機用戶在得到豐富的娛樂體驗的同時,也大大提高了運營商的網絡流量。
鑑於J2ME的以上特點,它在手機遊戲開發中顯現出不可替代的優勢。通過遊戲的開發和製作,掌握製作手機遊戲的基礎知識和基本流程,熟悉並掌握這1強大的開發利器,開發出適合國內玩家的遊戲,提高國產遊戲的市場份額,是每個開發人員的任務。

手機遊戲的開發—超級瑪麗的設計與實現JBUILDER