Branch Target Platform API LanguageCocos2d-x iOS, Android, Windows 8, Windows Phone 8, Windows, Linux, Mac OS X C++, Lua, Javascript Cocos2d-iPhone iOS, Mac OS X, Android Objective-C Co
Trang 1Click to continue…
Khoa KH & KT Máy Tính
ĐẠI HỌC BÁCH KHOA TP.HCM
Trang 4P 4
Trang 5Giới thiệu
P 5
• No document
Trang 6Những điểm chính
• Sprites
• Animations and Modifications of Sprites (Rotation, Scale)
P 6
Trang 7Những điểm chính
• Sound and Music Integration
• Split screens
P 7
Trang 9Những điểm chính
• Scales on any Screen
P 9
Trang 12Thành phần cơ bản
P 12
SimpleBaseGameActivity
Engine Scene
Camera Entities
Textures
Trang 15COCOS2D
Trang 16• Cocos2D là gì?
Được phát triển bởi Ricardo và cộng sự
ShinyCocos, in Ruby.
Cocos2D-Android.
Cocos2D-windows, in C++ for WindowXP/7 only.
Cocos2D-javascript, in javascript for browsers.
CocosNet, in C# base on Mono.
Giới thiệu
Trang 17• Lịch sử phát triển
Tháng 3/2008, Cocos2d ver 0.1 (Ricardo)
Trang 18CocosStudio CocosBuilder Cocos2d-Iphone
ShinyCocos
Cocos2d-net Cocos2d-Javascript Cocos2d-x Cocos2d-Windows Cocos2d-Android
Trang 19Branch Target Platform API Language
Cocos2d-x iOS, Android, Windows 8, Windows Phone 8,
Windows, Linux, Mac OS X
C++, Lua, Javascript
Cocos2d-iPhone iOS, Mac OS X, Android Objective-C
Cocos2d-html5 HTML5-ready browsers Javascript
Cocos2d-xna Windows Phone 7&8, Windows 7&8, XBox360 C#
Các phiên bản
Trang 20Vì sao lại sử dụng Cocos2D?
Đặt vấn đề
Trang 21Hiệu suất tuyệt vời
Trang 22Lense, Ripple, Wave
Move, Rotate, Scale
Trang 23Showcase
Trang 25Cấu trúc Cocos2d
Mỗi Scene có các layer
Layers bao gồm Sprites và tương tác người dùng
Director quản lý các Scenes
Trang 26Cấu trúc Cocos2d
Scenes workflow
Trang 27Cấu trúc Cocos2d
Layers -Bao gồm toàn bộ màn hình -Xử lý các tác vụ như chạm, lắc, -Có thể chứa layer khác hoặc Sprite
Trang 28http://dan.clarke.name/2011/04/how-to-make-a-simple-android-game-with-cocos2d/
Trang 29Introduction to
libGDX
Trang 301/7/16 Seite 30 ANDLABS – Introduction to AndEngine
Trang 311/7/16 Seite 31 ANDLABS – Introduction to AndEngine
Introduction
Trang 321/7/16 Seite 32 ANDLABS – Introduction to AndEngine
• Founder Mario Zechner
• Game development framework
• Written in Java with some C/C++ mixed in
Introduction
Trang 331/7/16 Seite 33 ANDLABS – Introduction to AndEngine
History
Trang 341/7/16 Seite 34 ANDLABS – Introduction to AndEngine
Trang 351/7/16 Seite 35 ANDLABS – Introduction to AndEngine
Pros and Cons
Trang 361/7/16 Seite 36 ANDLABS – Introduction to AndEngine
Trang 371/7/16 Seite 37 ANDLABS – Introduction to AndEngine
• Lack of documentation
Cons
Trang 381/7/16 Seite 38 ANDLABS – Introduction to AndEngine
Architecture
Trang 391/7/16 Seite 39 ANDLABS – Introduction to AndEngine
Trang 401/7/16 Seite 40 ANDLABS – Introduction to AndEngine
• Instantiate sub-modules
• Create window on destop or activity on Android
The Application
Trang 411/7/16 Seite 41 ANDLABS – Introduction to AndEngine
• Rendering thread
• RenderListener
Graphics Module
Trang 421/7/16 Seite 42 ANDLABS – Introduction to AndEngine
• Sound and Music class
• AudioDevice, AudioRecorder for more control
Audio Module
Trang 431/7/16 Seite 43 ANDLABS – Introduction to AndEngine
• Polling access
• Event based handling
Input Module
Trang 441/7/16 Seite 44 ANDLABS – Introduction to AndEngine
• Read and write file
• FileHandle
File Module
Trang 45Application Life-Cycle
Trang 46Overview
Trang 47Questions?