SlideShare ist ein Scribd-Unternehmen logo
1 von 33
Şeref AKYÜZ
Gazi Üniversitesi Bilgisayar Mühendisliği
1
Kimdir?
Şeref AKYÜZ
 2010 - www.serefakyuz.com
 2011 – Odtü Teknokent
 Andengine ile tanışma
 Android tabanlı oyunlar
 2012 – Android Oyun Programlama Kitabı
 2012 – Fatih Projesi
 Eğitim içerikli oyunlar.
 2013 – Son finallerine giriyor.
2
Sunum Planı
 Andengine(Gles1)
 Temel Kavramlar
 Resim Görüntüleme ve Animasyon Oluşturma
 Dokunmatik Ekran Kullanımı ve Multitouch
 Update Sistemi
 Sensör Kullanımı
 Parçacık Sistemleri
 Fizik kullanımı(Box2D)
3
Neden Oyun Motoru?
 Amaç: Daha kısa zamanda daha kaliteli oyunlar
geliştirmek
 Daha düzenli kod.
 Hazır altyapı sayesinde kodlama
aşamasında direkt oyun içeriğine odaklanma.
 Daha hızlı oyun geliştirme.
4
Andengine
 Nicolas Gramlich
 2d, açık kaynak kodlu oyun motoru. (Framework)
 Görsel ara yüz yok.
 Oyun yazmak için orta derecede java bilgisi yeterli.
 Kurulum;
 Bir jar dosyasının Java projesine eklenmesi.
5
Andengine
 BaseGameActivity Sınıfı
 4 metot:
 onLoadEngine (): Engine
 Motor ayarlarının yapıldığı metot.
 onLoadResources(): Void
 Resim, ses gibi dosyaların çağırılması ve hafızaya yüklenmesi.
 onLoadScene(): Scene
 Oyunun asıl yönetildiği kısım
 onLoadComplete(): Void
 Dosyalar hafızaya yüklenir, resimler sahnelere çizdirilir,
onLoadComplete metodu çalışır.
6
Temel Kavramlar(Nesneler)
 Engine
 Motor ayarları
 Kamera oluşturulması
 engine = new Engine(options);
 options;
 Tam Ekran – Yarım Ekran
 Ekran Yönü (Yatay-Dikey)
 Çözünürlük Yöntemi(Ekranı doldur, Boyutları sabit
tut)
7
Temel Kavramlar(Nesneler)
 Camera
 Engine nesnesi için kurulan(setScene) sahnenin
görüntülenmesi
 Ekran boyutunun belirtilmesi(Pixel)
 camera = new Camera(START_POSX, START_POSY,
CAMERA_WIDTH, CAMERA_HEIGHT);
8
Temel Kavramlar(Nesneler)
 Scene
 Oyun araçlarının üzerinde bulunduğu nesnedir.
 Resimler(Sprite) Scene nesneleri üzerine çizdirilirler.
 Dokunma özelliği vardır.
 Bir oyunda birden çok Scene nesnesi olabilir. (Menü
sahnesi, oyun sahnesi, durdurma-bitiş sahneleri gibi)
 this.sahne = new Scene();
9
Resim Görüntüleme
 Oyunların en önemli öğeleri: Resimler
 Texture  TextureRegion  Sprite  Resmi Yönet
10
Resim Görüntüleme: Texture
 Texture nesneleri;
 Görüntülenecek resmin kalıplarını oluştururlar.
 2n değerinde ebatlara sahip olabilirler.(64x64, 32x2,
512x1024)
 Bir texture nesnesi, birden çok resim için kullanılabilir.
(Performans açısından önemlidir.)
 Resmin boyutlarından büyük olabilir, küçük olamaz.
 TextureRegion nesnesi için Texture nesnesi gereklidir.
 texSaha = new Texture(textureWidth, textureHeight,
TextureOptions.BILINEAR_PREMULTIPLYALPHA);
11
Resim Görüntüleme: TextureRegion
 TextureRegion nesneleri;
 Resim yolu belirtilir.
 Parametre olarak Texture nesnesi.
 Sprite nesnesi için TextureRegion nesnesi gereklidir.
 texRegSaha = TextureRegionFactory.createFromAsset(
texSaha, context, "gfx/Arkaplan.jpg", textPosX,
textPosY);
12
Resim Görüntüleme: Sprite
 Resmin görüntülenmesi için gerekli nesne.
 Sprite Nesnesi, Texture nesnesi içinde belirtilen resim
kalıbını; TextureRegion içinde yolu belirtilen resmi
kullanır.
 Sprite ve Scene nesneleri üzerine çizdirilir.
 spriteSaha = new Sprite(spritePosX, spritePosY,
texRegSaha);
13
Animasyon Oluşturma
 Animasyonlar, resimlerden sonra en önemli oyun
dinamiklerinden biridir.
 Texture  TiledTextureRegion  AnimatedSprite 
Animasyonu Yönet
14
Animasyon Oluşturma: TiledTextureRegion
 Animasyon parçaları tek bir resimde toplanır.
 TiledTextureRegion, büyük resmi satır ve/veya
sütunlara böler.
 tiledTexReg = TextureRegionFactory.createTiledFromAsset(
texAnime, context, "gfx/anime.png", textPosX,
textPosY, columnCount, rowCount);
15
Animasyon Oluşturma: AnimatedSprite
 Sprite nesnesinin sahip olduğu tüm özellikler.
 Animasyon yönetme, kontrol etme.
 animate() metodu ile animasyon başlar.
 stopAnimation() metodu ile animasyon biter.
 animSprite = new AnimatedSprite(
animSpritePosX, animSpritePosY, tiledTexReg);
16
Dokunmatik Ekran Kullanımı
 Her bir nesnenin dokunma alanı mevcut ama pasif
durumda.
 Aktif etme;
 Bulunduğu sahne nesnesi üzerinde dokunma alanı
tanımlanır. (registerTouchArea(ITouchArea))
 Temelde 3 dokunma evresi;
 isActionDown
 isActionMove
 isActionUp
17
Dokunmatik Ekran Kullanımı
18
Multitouch
 andenginemultitouchextension.jar
 Engine nesnesine, uygulamanın çoklu dokunma
desteğine sahip olacağı belirtilir:
 engine.setTouchController(new MultiTouchController());
 Dokunma durumu tanımlanan nesneler, multitouch
özelliğine dahil olurlar.
19
Update Sistemi
 Oyunlar, her an durum kontrolü gerektirebilecek
uygulamalardır;
 Anlık nesne koordinat bilgileri vb.
20
Update Sistemi: Entity Sınıfı
 Sprite, ChangeableText, geometrik şekiller, vb.
 spriteOyuncu1 = new Sprite(600, CAMERA_HEIGHT/2 - 64, texRegOyuncu1){
protected void onManagedUpdate(float pSecondsElapsed) {
if(!maviHareketEder){
spriteOyuncu2.setPosition(parmakKoordinatiX, parmakKoordinatiY);
}else{
spriteOyuncu1.setPosition(parmakKoordinatiX, parmakKoordinatiY);
}
}
};
21
Update Sistemi: IUpdateHandler Arayüzü
 Engine, Scene gibi oyun boyunca kalıcı olan nesneler
üzerinde oluşturulur.

22
Sensör Kullanımı
 Oyunun eğlencesini arttırmak amacıyla sensör
dinamikleri kullanılabilir.
 IAccelerometerListener arayüzünün sağladığı metot:
 AccelerometerData nesnesi sensör bilgilerini içerir.
23
Parçacık Sistemleri
 Oyunun ana dinamiklerinin dışında, süslemelerde
kullanılır.
 Kullanımı;
 Küçük boyutlarda tek bir resim
 Çeşitlilik nasıl sağlanır?
 Parçaların her birinin;
 Hareket edecekleri hız ve yön değerleri
 Döndürülme miktarı
 Boyutu
değiştirilebilir.
24
Parçacık Sistemleri
 Yapılabilecek süslemeler;
 Sis efekti
 Buz parçaları
 Cam kırıkları
 Ve parçalanan her şey.
25
Parçacık Sistemleri
26
Fizik Kullanımı(Box2D)
 Gerçek hayattaki fiziksel kanunlar oyunlara başarılı bir
şekilde uygulanmalı;
 Kuvvet
 Hız
 Kütle
 Yer çekimi
 Ağırlık
 Çarpışmalar
 Sürtünme
27
Fizik Kullanımı(Box2D)
 Bu fiziki olayların kontrolleri Andengine ile uyumlu
olan Box2D kütüphaneleri ile sağlanabilir.
 Tıpkı Andengine gibi bir jar dosyası ve projeye dahil
edilmesi aynı aşamaları kapsar.
 Andengine uzunluk ölçüsü olarak pixel; Box2d metre
kullanır.
 Uzunluk değerlerinde dönüşüm yapılmalı.
28
Fiziksel Ortamın Oluşturulması
 PhysicsWorld nesnesi;
 Fiziksel nesneleri içeren ortamdır.
 Bir oyunda birden çok PhysicsWorld olabilir.
 FixtureDef nesnesi;
 Fiziksel ortamın özelliklerinin belirlendiği nesnedir;
 Yoğunluk
 Esneklik
 Sürtünme
29
Andengine Nesnelerinin Fiziksel
Özellik Kazanması
 Body nesnesi;
 Sprite, AnimatedSprite ve diğer görsel Andengine
nesnelerinin etrafını kapsayarak fiziksel bir şerit
oluşturur.
 Body içindeki görseller, body nesnesinden bağımsız
hareket edemez.
 Body çeşitleri mevcuttur.
30
Body Çeşitleri
 Şekline göre;
 LineBody
 BoxBody
 CircleBody
 Hareket Durumlarına Göre
 StaticBody
 DynamicBody
 KinematicBody
31
Body Çeşitleri
32
Teşekkürler
akyuz.seref@gmail.com
www.serefakyuz.com
facebook.com/akyuzseref
twitter.com/serefakyuz
33

Weitere ähnliche Inhalte

Empfohlen

PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Applitools
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at WorkGetSmarter
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...DevGAMM Conference
 
Barbie - Brand Strategy Presentation
Barbie - Brand Strategy PresentationBarbie - Brand Strategy Presentation
Barbie - Brand Strategy PresentationErica Santiago
 

Empfohlen (20)

PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike RoutesMore than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
 
Barbie - Brand Strategy Presentation
Barbie - Brand Strategy PresentationBarbie - Brand Strategy Presentation
Barbie - Brand Strategy Presentation
 

Android Oyun Geliştirme (Andengine)

  • 1. Şeref AKYÜZ Gazi Üniversitesi Bilgisayar Mühendisliği 1
  • 2. Kimdir? Şeref AKYÜZ  2010 - www.serefakyuz.com  2011 – Odtü Teknokent  Andengine ile tanışma  Android tabanlı oyunlar  2012 – Android Oyun Programlama Kitabı  2012 – Fatih Projesi  Eğitim içerikli oyunlar.  2013 – Son finallerine giriyor. 2
  • 3. Sunum Planı  Andengine(Gles1)  Temel Kavramlar  Resim Görüntüleme ve Animasyon Oluşturma  Dokunmatik Ekran Kullanımı ve Multitouch  Update Sistemi  Sensör Kullanımı  Parçacık Sistemleri  Fizik kullanımı(Box2D) 3
  • 4. Neden Oyun Motoru?  Amaç: Daha kısa zamanda daha kaliteli oyunlar geliştirmek  Daha düzenli kod.  Hazır altyapı sayesinde kodlama aşamasında direkt oyun içeriğine odaklanma.  Daha hızlı oyun geliştirme. 4
  • 5. Andengine  Nicolas Gramlich  2d, açık kaynak kodlu oyun motoru. (Framework)  Görsel ara yüz yok.  Oyun yazmak için orta derecede java bilgisi yeterli.  Kurulum;  Bir jar dosyasının Java projesine eklenmesi. 5
  • 6. Andengine  BaseGameActivity Sınıfı  4 metot:  onLoadEngine (): Engine  Motor ayarlarının yapıldığı metot.  onLoadResources(): Void  Resim, ses gibi dosyaların çağırılması ve hafızaya yüklenmesi.  onLoadScene(): Scene  Oyunun asıl yönetildiği kısım  onLoadComplete(): Void  Dosyalar hafızaya yüklenir, resimler sahnelere çizdirilir, onLoadComplete metodu çalışır. 6
  • 7. Temel Kavramlar(Nesneler)  Engine  Motor ayarları  Kamera oluşturulması  engine = new Engine(options);  options;  Tam Ekran – Yarım Ekran  Ekran Yönü (Yatay-Dikey)  Çözünürlük Yöntemi(Ekranı doldur, Boyutları sabit tut) 7
  • 8. Temel Kavramlar(Nesneler)  Camera  Engine nesnesi için kurulan(setScene) sahnenin görüntülenmesi  Ekran boyutunun belirtilmesi(Pixel)  camera = new Camera(START_POSX, START_POSY, CAMERA_WIDTH, CAMERA_HEIGHT); 8
  • 9. Temel Kavramlar(Nesneler)  Scene  Oyun araçlarının üzerinde bulunduğu nesnedir.  Resimler(Sprite) Scene nesneleri üzerine çizdirilirler.  Dokunma özelliği vardır.  Bir oyunda birden çok Scene nesnesi olabilir. (Menü sahnesi, oyun sahnesi, durdurma-bitiş sahneleri gibi)  this.sahne = new Scene(); 9
  • 10. Resim Görüntüleme  Oyunların en önemli öğeleri: Resimler  Texture  TextureRegion  Sprite  Resmi Yönet 10
  • 11. Resim Görüntüleme: Texture  Texture nesneleri;  Görüntülenecek resmin kalıplarını oluştururlar.  2n değerinde ebatlara sahip olabilirler.(64x64, 32x2, 512x1024)  Bir texture nesnesi, birden çok resim için kullanılabilir. (Performans açısından önemlidir.)  Resmin boyutlarından büyük olabilir, küçük olamaz.  TextureRegion nesnesi için Texture nesnesi gereklidir.  texSaha = new Texture(textureWidth, textureHeight, TextureOptions.BILINEAR_PREMULTIPLYALPHA); 11
  • 12. Resim Görüntüleme: TextureRegion  TextureRegion nesneleri;  Resim yolu belirtilir.  Parametre olarak Texture nesnesi.  Sprite nesnesi için TextureRegion nesnesi gereklidir.  texRegSaha = TextureRegionFactory.createFromAsset( texSaha, context, "gfx/Arkaplan.jpg", textPosX, textPosY); 12
  • 13. Resim Görüntüleme: Sprite  Resmin görüntülenmesi için gerekli nesne.  Sprite Nesnesi, Texture nesnesi içinde belirtilen resim kalıbını; TextureRegion içinde yolu belirtilen resmi kullanır.  Sprite ve Scene nesneleri üzerine çizdirilir.  spriteSaha = new Sprite(spritePosX, spritePosY, texRegSaha); 13
  • 14. Animasyon Oluşturma  Animasyonlar, resimlerden sonra en önemli oyun dinamiklerinden biridir.  Texture  TiledTextureRegion  AnimatedSprite  Animasyonu Yönet 14
  • 15. Animasyon Oluşturma: TiledTextureRegion  Animasyon parçaları tek bir resimde toplanır.  TiledTextureRegion, büyük resmi satır ve/veya sütunlara böler.  tiledTexReg = TextureRegionFactory.createTiledFromAsset( texAnime, context, "gfx/anime.png", textPosX, textPosY, columnCount, rowCount); 15
  • 16. Animasyon Oluşturma: AnimatedSprite  Sprite nesnesinin sahip olduğu tüm özellikler.  Animasyon yönetme, kontrol etme.  animate() metodu ile animasyon başlar.  stopAnimation() metodu ile animasyon biter.  animSprite = new AnimatedSprite( animSpritePosX, animSpritePosY, tiledTexReg); 16
  • 17. Dokunmatik Ekran Kullanımı  Her bir nesnenin dokunma alanı mevcut ama pasif durumda.  Aktif etme;  Bulunduğu sahne nesnesi üzerinde dokunma alanı tanımlanır. (registerTouchArea(ITouchArea))  Temelde 3 dokunma evresi;  isActionDown  isActionMove  isActionUp 17
  • 19. Multitouch  andenginemultitouchextension.jar  Engine nesnesine, uygulamanın çoklu dokunma desteğine sahip olacağı belirtilir:  engine.setTouchController(new MultiTouchController());  Dokunma durumu tanımlanan nesneler, multitouch özelliğine dahil olurlar. 19
  • 20. Update Sistemi  Oyunlar, her an durum kontrolü gerektirebilecek uygulamalardır;  Anlık nesne koordinat bilgileri vb. 20
  • 21. Update Sistemi: Entity Sınıfı  Sprite, ChangeableText, geometrik şekiller, vb.  spriteOyuncu1 = new Sprite(600, CAMERA_HEIGHT/2 - 64, texRegOyuncu1){ protected void onManagedUpdate(float pSecondsElapsed) { if(!maviHareketEder){ spriteOyuncu2.setPosition(parmakKoordinatiX, parmakKoordinatiY); }else{ spriteOyuncu1.setPosition(parmakKoordinatiX, parmakKoordinatiY); } } }; 21
  • 22. Update Sistemi: IUpdateHandler Arayüzü  Engine, Scene gibi oyun boyunca kalıcı olan nesneler üzerinde oluşturulur.  22
  • 23. Sensör Kullanımı  Oyunun eğlencesini arttırmak amacıyla sensör dinamikleri kullanılabilir.  IAccelerometerListener arayüzünün sağladığı metot:  AccelerometerData nesnesi sensör bilgilerini içerir. 23
  • 24. Parçacık Sistemleri  Oyunun ana dinamiklerinin dışında, süslemelerde kullanılır.  Kullanımı;  Küçük boyutlarda tek bir resim  Çeşitlilik nasıl sağlanır?  Parçaların her birinin;  Hareket edecekleri hız ve yön değerleri  Döndürülme miktarı  Boyutu değiştirilebilir. 24
  • 25. Parçacık Sistemleri  Yapılabilecek süslemeler;  Sis efekti  Buz parçaları  Cam kırıkları  Ve parçalanan her şey. 25
  • 27. Fizik Kullanımı(Box2D)  Gerçek hayattaki fiziksel kanunlar oyunlara başarılı bir şekilde uygulanmalı;  Kuvvet  Hız  Kütle  Yer çekimi  Ağırlık  Çarpışmalar  Sürtünme 27
  • 28. Fizik Kullanımı(Box2D)  Bu fiziki olayların kontrolleri Andengine ile uyumlu olan Box2D kütüphaneleri ile sağlanabilir.  Tıpkı Andengine gibi bir jar dosyası ve projeye dahil edilmesi aynı aşamaları kapsar.  Andengine uzunluk ölçüsü olarak pixel; Box2d metre kullanır.  Uzunluk değerlerinde dönüşüm yapılmalı. 28
  • 29. Fiziksel Ortamın Oluşturulması  PhysicsWorld nesnesi;  Fiziksel nesneleri içeren ortamdır.  Bir oyunda birden çok PhysicsWorld olabilir.  FixtureDef nesnesi;  Fiziksel ortamın özelliklerinin belirlendiği nesnedir;  Yoğunluk  Esneklik  Sürtünme 29
  • 30. Andengine Nesnelerinin Fiziksel Özellik Kazanması  Body nesnesi;  Sprite, AnimatedSprite ve diğer görsel Andengine nesnelerinin etrafını kapsayarak fiziksel bir şerit oluşturur.  Body içindeki görseller, body nesnesinden bağımsız hareket edemez.  Body çeşitleri mevcuttur. 30
  • 31. Body Çeşitleri  Şekline göre;  LineBody  BoxBody  CircleBody  Hareket Durumlarına Göre  StaticBody  DynamicBody  KinematicBody 31