For Mobile 6/2012: Vývoj her pro Windows Phone
-
Upload
tomas-slavicek -
Category
Technology
-
view
297 -
download
4
description
Transcript of For Mobile 6/2012: Vývoj her pro Windows Phone
![Page 2: For Mobile 6/2012: Vývoj her pro Windows Phone](https://reader034.fdocuments.in/reader034/viewer/2022052622/559523a11a28abd9318b464f/html5/thumbnails/2.jpg)
Agenda
WP7 z herního pohledu
Xbox LIVE, marketplace
principy XNA
praktická ukázka (vykreslování, pohyb)
možnosti 3D her
![Page 3: For Mobile 6/2012: Vývoj her pro Windows Phone](https://reader034.fdocuments.in/reader034/viewer/2022052622/559523a11a28abd9318b464f/html5/thumbnails/3.jpg)
Windows Phone
motivace
![Page 4: For Mobile 6/2012: Vývoj her pro Windows Phone](https://reader034.fdocuments.in/reader034/viewer/2022052622/559523a11a28abd9318b464f/html5/thumbnails/4.jpg)
Windows Phone
klíčová slova: Mango, Tango, Nokia
![Page 5: For Mobile 6/2012: Vývoj her pro Windows Phone](https://reader034.fdocuments.in/reader034/viewer/2022052622/559523a11a28abd9318b464f/html5/thumbnails/5.jpg)
Windows Phone
situace v ČR
![Page 6: For Mobile 6/2012: Vývoj her pro Windows Phone](https://reader034.fdocuments.in/reader034/viewer/2022052622/559523a11a28abd9318b464f/html5/thumbnails/6.jpg)
Budoucnost
Windows 8 / Windows RT (ARM)
WP Apollo
![Page 7: For Mobile 6/2012: Vývoj her pro Windows Phone](https://reader034.fdocuments.in/reader034/viewer/2022052622/559523a11a28abd9318b464f/html5/thumbnails/7.jpg)
Hry na Windows Phone
ukázka
![Page 8: For Mobile 6/2012: Vývoj her pro Windows Phone](https://reader034.fdocuments.in/reader034/viewer/2022052622/559523a11a28abd9318b464f/html5/thumbnails/8.jpg)
Pevné hardwarové požadavky
displej 800x480 pix, alespoň 4 dotyky
výkonný procesor, DirectX9 GPU
GPS, akcelerometr, kompas, (gyroskop)
mobilní internet, (fotoaparát)
tlačítka
![Page 9: For Mobile 6/2012: Vývoj her pro Windows Phone](https://reader034.fdocuments.in/reader034/viewer/2022052622/559523a11a28abd9318b464f/html5/thumbnails/9.jpg)
Ovládání
displej, senzory... ne tlačítka!
![Page 10: For Mobile 6/2012: Vývoj her pro Windows Phone](https://reader034.fdocuments.in/reader034/viewer/2022052622/559523a11a28abd9318b464f/html5/thumbnails/10.jpg)
Výkon telefonů
1. a 2. generace telefonů
Tango s 256 MB RAM
WP8?
Lumia 800: 41 FPS
Omnia 7: 15 FPS
Lumia 610: 24 FPS
![Page 11: For Mobile 6/2012: Vývoj her pro Windows Phone](https://reader034.fdocuments.in/reader034/viewer/2022052622/559523a11a28abd9318b464f/html5/thumbnails/11.jpg)
Hry v telefonu
![Page 12: For Mobile 6/2012: Vývoj her pro Windows Phone](https://reader034.fdocuments.in/reader034/viewer/2022052622/559523a11a28abd9318b464f/html5/thumbnails/12.jpg)
Xbox LIVE certifikace
výsostné postavení her
achievementy, online skóre...
těžké se tam dostat
![Page 13: For Mobile 6/2012: Vývoj her pro Windows Phone](https://reader034.fdocuments.in/reader034/viewer/2022052622/559523a11a28abd9318b464f/html5/thumbnails/13.jpg)
Marketplace CZ
přes 400 českých aplikací + 80 her
katalog smartmania.cz/wp
![Page 14: For Mobile 6/2012: Vývoj her pro Windows Phone](https://reader034.fdocuments.in/reader034/viewer/2022052622/559523a11a28abd9318b464f/html5/thumbnails/14.jpg)
Marketplace
![Page 15: For Mobile 6/2012: Vývoj her pro Windows Phone](https://reader034.fdocuments.in/reader034/viewer/2022052622/559523a11a28abd9318b464f/html5/thumbnails/15.jpg)
Marketplace
64% zdarma
27 Kč průměrná cena, hry dražší
57 Kč prům. cena aplikace v Top 100
možnost trial verzí
nejvíce se kupují hry
![Page 16: For Mobile 6/2012: Vývoj her pro Windows Phone](https://reader034.fdocuments.in/reader034/viewer/2022052622/559523a11a28abd9318b464f/html5/thumbnails/16.jpg)
Zkušenosti
hra Galaxy Jet
![Page 17: For Mobile 6/2012: Vývoj her pro Windows Phone](https://reader034.fdocuments.in/reader034/viewer/2022052622/559523a11a28abd9318b464f/html5/thumbnails/17.jpg)
Moje WP7 tvorba
Galaxy Jet, Ethereal Pad
![Page 18: For Mobile 6/2012: Vývoj her pro Windows Phone](https://reader034.fdocuments.in/reader034/viewer/2022052622/559523a11a28abd9318b464f/html5/thumbnails/18.jpg)
Moje WP7 tvorba
Glow Arkanoid
![Page 19: For Mobile 6/2012: Vývoj her pro Windows Phone](https://reader034.fdocuments.in/reader034/viewer/2022052622/559523a11a28abd9318b464f/html5/thumbnails/19.jpg)
Moje WP7 tvorba
Vroomstar
![Page 20: For Mobile 6/2012: Vývoj her pro Windows Phone](https://reader034.fdocuments.in/reader034/viewer/2022052622/559523a11a28abd9318b464f/html5/thumbnails/20.jpg)
Moje WP7 tvorba
Handwrite Notes http://bit.ly/sm-handwrite
![Page 21: For Mobile 6/2012: Vývoj her pro Windows Phone](https://reader034.fdocuments.in/reader034/viewer/2022052622/559523a11a28abd9318b464f/html5/thumbnails/21.jpg)
Moje WP7 tvorba
3D herní engine
![Page 22: For Mobile 6/2012: Vývoj her pro Windows Phone](https://reader034.fdocuments.in/reader034/viewer/2022052622/559523a11a28abd9318b464f/html5/thumbnails/22.jpg)
Moje tvorba – WM 6.x
hra HexaLines
![Page 23: For Mobile 6/2012: Vývoj her pro Windows Phone](https://reader034.fdocuments.in/reader034/viewer/2022052622/559523a11a28abd9318b464f/html5/thumbnails/23.jpg)
XNA Framework
pro PC, Xbox 360, WP7, (Zune)
nadstavba DirectX, akcelerováno GPU
2D a 3D hry
![Page 24: For Mobile 6/2012: Vývoj her pro Windows Phone](https://reader034.fdocuments.in/reader034/viewer/2022052622/559523a11a28abd9318b464f/html5/thumbnails/24.jpg)
XNA – vlastnosti
herní smyčka
Content Pipeline
operace s maticemi, přehrávání zvuků...
![Page 25: For Mobile 6/2012: Vývoj her pro Windows Phone](https://reader034.fdocuments.in/reader034/viewer/2022052622/559523a11a28abd9318b464f/html5/thumbnails/25.jpg)
Herní smyčka
sada připravených metod
![Page 26: For Mobile 6/2012: Vývoj her pro Windows Phone](https://reader034.fdocuments.in/reader034/viewer/2022052622/559523a11a28abd9318b464f/html5/thumbnails/26.jpg)
Webové zdroje
SmartMania.cz články
rozcestník – můj blog tomasslavicek.cz
![Page 27: For Mobile 6/2012: Vývoj her pro Windows Phone](https://reader034.fdocuments.in/reader034/viewer/2022052622/559523a11a28abd9318b464f/html5/thumbnails/27.jpg)
Ukázka
vykreslení obrázku na pozadí
práce s Content Pipeline
orientace displeje
![Page 28: For Mobile 6/2012: Vývoj her pro Windows Phone](https://reader034.fdocuments.in/reader034/viewer/2022052622/559523a11a28abd9318b464f/html5/thumbnails/28.jpg)
Další možnosti
běh až 60 FPS
32bit barvy
hardware scaler
56% pixelů
![Page 29: For Mobile 6/2012: Vývoj her pro Windows Phone](https://reader034.fdocuments.in/reader034/viewer/2022052622/559523a11a28abd9318b464f/html5/thumbnails/29.jpg)
Vykreslení raketky
třída Sprite
položky Position, Size, Texture
metody LoadContent, Draw
![Page 30: For Mobile 6/2012: Vývoj her pro Windows Phone](https://reader034.fdocuments.in/reader034/viewer/2022052622/559523a11a28abd9318b464f/html5/thumbnails/30.jpg)
Vstup z displeje
1. myš = 1-dotykové ovládání
2. TouchPanel.TouchCollection
(položky ID, State, Position)
3. gesta
![Page 31: For Mobile 6/2012: Vývoj her pro Windows Phone](https://reader034.fdocuments.in/reader034/viewer/2022052622/559523a11a28abd9318b464f/html5/thumbnails/31.jpg)
Gesta
TouchPanel.
EnabledGestures
![Page 32: For Mobile 6/2012: Vývoj her pro Windows Phone](https://reader034.fdocuments.in/reader034/viewer/2022052622/559523a11a28abd9318b464f/html5/thumbnails/32.jpg)
Ukázka – pohyb
pohyb při držení „myši“
rychlost animace nezávislá na FPS ElapsedGameTime.TotalMilliseconds
![Page 33: For Mobile 6/2012: Vývoj her pro Windows Phone](https://reader034.fdocuments.in/reader034/viewer/2022052622/559523a11a28abd9318b464f/html5/thumbnails/33.jpg)
Pohybový senzor
osy X / Y, hodnoty -1 až 1
osa Z (gravitace), normálně -1
![Page 34: For Mobile 6/2012: Vývoj her pro Windows Phone](https://reader034.fdocuments.in/reader034/viewer/2022052622/559523a11a28abd9318b464f/html5/thumbnails/34.jpg)
Nové Motion API
využívá kompasu, gyro i akcelerometru
vyhlazovaný výstup
+ Yaw, Pitch, Roll
![Page 35: For Mobile 6/2012: Vývoj her pro Windows Phone](https://reader034.fdocuments.in/reader034/viewer/2022052622/559523a11a28abd9318b464f/html5/thumbnails/35.jpg)
Portace hry na PC/Xbox
Create copy of project…
direktivy #if WINDOWS | XBOX #endif
#if WINDOWS_PHONE #endif
![Page 36: For Mobile 6/2012: Vývoj her pro Windows Phone](https://reader034.fdocuments.in/reader034/viewer/2022052622/559523a11a28abd9318b464f/html5/thumbnails/36.jpg)
WP7 vs. PC/Xbox
Reach profil DirectX 9, Shader Model 2.0
Textury – velikost mocniny 2, max. 2048 pix.
max. 65 535 primitiv / Draw() ...
HiDef Xbox 360 / PC
„vlastnosti DirectX 10“, Shader Model 3.0+
![Page 37: For Mobile 6/2012: Vývoj her pro Windows Phone](https://reader034.fdocuments.in/reader034/viewer/2022052622/559523a11a28abd9318b464f/html5/thumbnails/37.jpg)
WP7 a 3D grafika
nelze psát vlastní shadery
5 připravených efektů
BasicEffect
DualTextureEffect
![Page 38: For Mobile 6/2012: Vývoj her pro Windows Phone](https://reader034.fdocuments.in/reader034/viewer/2022052622/559523a11a28abd9318b464f/html5/thumbnails/38.jpg)
WP7 a 3D grafika
EnvironmentMapEffect
![Page 39: For Mobile 6/2012: Vývoj her pro Windows Phone](https://reader034.fdocuments.in/reader034/viewer/2022052622/559523a11a28abd9318b464f/html5/thumbnails/39.jpg)
Dostupné engine
SunBurn, delta, Helium…
konvertor Unity XNA
fyzika: Box2D.XNA, Chipmunk,
Farseer…
![Page 40: For Mobile 6/2012: Vývoj her pro Windows Phone](https://reader034.fdocuments.in/reader034/viewer/2022052622/559523a11a28abd9318b464f/html5/thumbnails/40.jpg)
Silverlight + XNA
možnost propojení i kombinace na 1 obrazovce
Silverlight = menu, XNA = herní část
![Page 41: For Mobile 6/2012: Vývoj her pro Windows Phone](https://reader034.fdocuments.in/reader034/viewer/2022052622/559523a11a28abd9318b464f/html5/thumbnails/41.jpg)
Webové zdroje
SmartMania.cz články
rozcestník – můj blog tomasslavicek.cz
Tomáš Slavíč[email protected] Twitter: @tomasslavicek