SlideShare a Scribd company logo
1 of 26
Adventures in OpenGL ES Or: What Not To Expect From OpenGL ESPresented by: David Kolb, Undergrad, Columbus State University
Why iPhone/iPod Touch? Copyright Apple, 2009. Source: http://www.apple.com/ipodtouch/
Requirements Requirements: An Intel Mac An iPod Touch Development License iPhone Developer University Program Free for degree-granting institutions Allows for a development team of up to 200 student developers.
Programming for iPhone OS Objective-C The OpenGL ES Pipeline
Objective-C
Obj-C Crashcourse Creating a new object: Rectangle *rect = [[Rectangle alloc] init]; id rect = [Rectangle alloc]; Sending a message: [rectinitWithWidth: 30 andHeight: 45 int area = [rect area]; Accessing a field rect.width = 10;
Obj-C Crashcourse Defining a class: @interface Rectangle : NSObject {int width;int height;}@property (nonatomic) int width, height;-(id) init;-(id) initWithHeight: (int) handWidth:       (int) w;-(int) area;@end
Obj-C Crashcourse Implementing a class @implementation Rectangle@synthesize width, height;-(id) init{     self = [super init];     if (self)     {self.width = 0;self.height = 0;     }     return self;}@end
Obj-C Crashcourse SelectorsSEL draw = @selector(“draw”);SEL init = @selector(“initWithHeight:andWidth:”);if([rectrespondsToSelector:draw]) {...} Can freely mix in C-style arrays, pointers, calls to malloc() and free(). Obj-C class pointers managed through retain, release, autorelease messages[rect release];
OpenGL ES Source: iPhone Game Development Technologies, Part 1 http://developer.apple.com/adconitunes
OpenGL ES Continued Geometry glVertexPointer, glNormalPointer, glTexCoordPointer Points, Lines, Triangles, Triangle Fans, Triangle Strips glDrawArrays, glDrawElement Textures 8888, 4444,  and more. PVRTC 2D only iPhone hardware optimized for floats, not double’s or fixed.
The Game A clone of other “block” exploding games. Select an orb of a particular color, if it neighbors at least one orb of the same color, all orbs of the same color connected to that orb will be removed from the game. The remaining orbs fall into the space remaining. Simple enough concept to give experience in the OpenGL ES API and interacting with touches.
The Experience Wrapping a C API in a set of Objective-C classes Lack of glu functions Object selection when receiving a touch event. Writing a framework from scratch
Program Structure Vector3D Required for nearly any work in a 3D space. Supports add and copy operations. Sphere Contains the geometry for the Bubble class. Vertices are computed ahead of time, at application load.
Program Structure Bubble Main “game piece” Maintains a reference to a Sphere Provides bounding boxes and drawing functions Receives an update message for future animation Scene3D Manages, updates, draws objects Manages lights and camera, which have their own objects.
Program Structure BubblesGame Root of game logic and drawing. Receives regular update calls via EAGLView’sdrawView message Receives “taps” via EAGLView’stouchesEnd:Event: message Contains the “game board” and game logic.
Selection No rendering in selection mode. Most commonly suggested solution: Generate and bind an entirely new set of buffers (color, depth, etc.) Disable lighting, fog, and any other features that may change the color of a pixel. Render the entire scene into the buffers, making each object a slightly different color. Read the pixel located under the touch and match the color to one of the objects.
Another Solution Produce the projection and model/view matrices. Multiply the matrices together. Invert the resulting matrix. Multiply the screen coordinates by the inverted matrix, generating a line. Compute the intersection of the line with an object.
My Solution ,[object Object]
Use an orthographic projection that aligns 0,0 with one corner of the screen and matches a distance of 1.0 with the length of a pixel.
Simply use screen coordinates as 2D world coordinates with simple adjustments as needed.
Cheating?,[object Object]
Foundation Collections NSArray/NSMutableArray Does not accept nil object references. A deletion at n adjusts all elements at valid indices greater than n down by one. The game board needs to accept empty slots. Solution is to use a dictionary with NSNumber objects as keys and the actual Bubble objects as values.
Conclusions Even for very active and animated 2D games, Quartz should be seriously considered and fully discounted before selecting OpenGL ES. Consider using one of the available iPhone game frameworks. Cocos2D Sio2Engine Oolong Engine
Next Steps Complete logic and animations Control the direction of falling/compacting with accelerometer Scoring Endless mode
Demo

More Related Content

What's hot

The Ring programming language version 1.3 book - Part 38 of 88
The Ring programming language version 1.3 book - Part 38 of 88The Ring programming language version 1.3 book - Part 38 of 88
The Ring programming language version 1.3 book - Part 38 of 88Mahmoud Samir Fayed
 
Class[6][5th aug] [three js-loaders]
Class[6][5th aug] [three js-loaders]Class[6][5th aug] [three js-loaders]
Class[6][5th aug] [three js-loaders]Saajid Akram
 
The Ring programming language version 1.5.3 book - Part 48 of 184
The Ring programming language version 1.5.3 book - Part 48 of 184The Ring programming language version 1.5.3 book - Part 48 of 184
The Ring programming language version 1.5.3 book - Part 48 of 184Mahmoud Samir Fayed
 
Presentatie Willem En Kevin
Presentatie Willem En KevinPresentatie Willem En Kevin
Presentatie Willem En Kevingueste26e85
 
Computer Graphics - Lecture 00 - Introduction
Computer Graphics - Lecture 00 - IntroductionComputer Graphics - Lecture 00 - Introduction
Computer Graphics - Lecture 00 - Introduction💻 Anton Gerdelan
 
Implementation of character translation integer and floating point values
Implementation of character translation integer and floating point valuesImplementation of character translation integer and floating point values
Implementation of character translation integer and floating point valuesغزالة
 
Geospatial Data Analysis and Visualization in Python
Geospatial Data Analysis and Visualization in PythonGeospatial Data Analysis and Visualization in Python
Geospatial Data Analysis and Visualization in PythonHalfdan Rump
 
Computer Graphics Part1
Computer Graphics Part1Computer Graphics Part1
Computer Graphics Part1qpqpqp
 
Computer Graphics Practical
Computer Graphics PracticalComputer Graphics Practical
Computer Graphics PracticalNeha Sharma
 
Ics2311 l02 Graphics fundamentals
Ics2311 l02 Graphics fundamentalsIcs2311 l02 Graphics fundamentals
Ics2311 l02 Graphics fundamentalsbridgekloud
 
computer graphics
computer graphicscomputer graphics
computer graphicsMegabi Mamo
 
Mirko Lucchese - Deep Image Processing
Mirko Lucchese - Deep Image ProcessingMirko Lucchese - Deep Image Processing
Mirko Lucchese - Deep Image ProcessingMeetupDataScienceRoma
 

What's hot (13)

The Ring programming language version 1.3 book - Part 38 of 88
The Ring programming language version 1.3 book - Part 38 of 88The Ring programming language version 1.3 book - Part 38 of 88
The Ring programming language version 1.3 book - Part 38 of 88
 
Class[6][5th aug] [three js-loaders]
Class[6][5th aug] [three js-loaders]Class[6][5th aug] [three js-loaders]
Class[6][5th aug] [three js-loaders]
 
The Ring programming language version 1.5.3 book - Part 48 of 184
The Ring programming language version 1.5.3 book - Part 48 of 184The Ring programming language version 1.5.3 book - Part 48 of 184
The Ring programming language version 1.5.3 book - Part 48 of 184
 
Presentatie Willem En Kevin
Presentatie Willem En KevinPresentatie Willem En Kevin
Presentatie Willem En Kevin
 
D044051622
D044051622D044051622
D044051622
 
Computer Graphics - Lecture 00 - Introduction
Computer Graphics - Lecture 00 - IntroductionComputer Graphics - Lecture 00 - Introduction
Computer Graphics - Lecture 00 - Introduction
 
Implementation of character translation integer and floating point values
Implementation of character translation integer and floating point valuesImplementation of character translation integer and floating point values
Implementation of character translation integer and floating point values
 
Geospatial Data Analysis and Visualization in Python
Geospatial Data Analysis and Visualization in PythonGeospatial Data Analysis and Visualization in Python
Geospatial Data Analysis and Visualization in Python
 
Computer Graphics Part1
Computer Graphics Part1Computer Graphics Part1
Computer Graphics Part1
 
Computer Graphics Practical
Computer Graphics PracticalComputer Graphics Practical
Computer Graphics Practical
 
Ics2311 l02 Graphics fundamentals
Ics2311 l02 Graphics fundamentalsIcs2311 l02 Graphics fundamentals
Ics2311 l02 Graphics fundamentals
 
computer graphics
computer graphicscomputer graphics
computer graphics
 
Mirko Lucchese - Deep Image Processing
Mirko Lucchese - Deep Image ProcessingMirko Lucchese - Deep Image Processing
Mirko Lucchese - Deep Image Processing
 

Viewers also liked

Tarea 19 edison_valdivieso
Tarea 19 edison_valdiviesoTarea 19 edison_valdivieso
Tarea 19 edison_valdiviesotroyedison
 
video de amor
video de amorvideo de amor
video de amorlucesitha
 
Presentation2
Presentation2Presentation2
Presentation2ken53
 
Presentacion de proyecto
Presentacion de proyectoPresentacion de proyecto
Presentacion de proyectoRey Jd
 
Młodzieżowa Drużyna Pożarnicza OSP Stołpno w 2003 roku
Młodzieżowa Drużyna Pożarnicza OSP Stołpno w 2003 rokuMłodzieżowa Drużyna Pożarnicza OSP Stołpno w 2003 roku
Młodzieżowa Drużyna Pożarnicza OSP Stołpno w 2003 rokustrazpozarna
 
Memory Improvement technique (Mnemonic Device)
Memory Improvement technique (Mnemonic Device)Memory Improvement technique (Mnemonic Device)
Memory Improvement technique (Mnemonic Device)learnbudy
 
Curso oceano azul parte 1 cyd
Curso oceano azul parte 1 cydCurso oceano azul parte 1 cyd
Curso oceano azul parte 1 cydoutsourceando
 
¿Cómo apuntarse a un grupo?
¿Cómo apuntarse a un grupo?¿Cómo apuntarse a un grupo?
¿Cómo apuntarse a un grupo?Ludicum
 
Infobae - Elisa Carrió ganó las Elecciones Virtuales Presidenciales y Maurici...
Infobae - Elisa Carrió ganó las Elecciones Virtuales Presidenciales y Maurici...Infobae - Elisa Carrió ganó las Elecciones Virtuales Presidenciales y Maurici...
Infobae - Elisa Carrió ganó las Elecciones Virtuales Presidenciales y Maurici...Leonardo Penotti
 
Daylight and Energy: Designing with Insuating Glass Unites (IGU’s) with Integ...
Daylight and Energy: Designing with Insuating Glass Unites (IGU’s) with Integ...Daylight and Energy: Designing with Insuating Glass Unites (IGU’s) with Integ...
Daylight and Energy: Designing with Insuating Glass Unites (IGU’s) with Integ...Consulate General of Canada-Minneapolis
 
Gagnez de nouveaux clients grâce à la prospection digitale
Gagnez de nouveaux clients grâce à la prospection digitaleGagnez de nouveaux clients grâce à la prospection digitale
Gagnez de nouveaux clients grâce à la prospection digitaleMa Vidéo Marketing
 

Viewers also liked (20)

Longitud de una curva
Longitud de una curvaLongitud de una curva
Longitud de una curva
 
Tarea 19 edison_valdivieso
Tarea 19 edison_valdiviesoTarea 19 edison_valdivieso
Tarea 19 edison_valdivieso
 
video de amor
video de amorvideo de amor
video de amor
 
Sonpre
SonpreSonpre
Sonpre
 
Hector Lavoee!
Hector Lavoee!Hector Lavoee!
Hector Lavoee!
 
Presentation2
Presentation2Presentation2
Presentation2
 
Presentacion de proyecto
Presentacion de proyectoPresentacion de proyecto
Presentacion de proyecto
 
Where is it?
Where is it?Where is it?
Where is it?
 
Młodzieżowa Drużyna Pożarnicza OSP Stołpno w 2003 roku
Młodzieżowa Drużyna Pożarnicza OSP Stołpno w 2003 rokuMłodzieżowa Drużyna Pożarnicza OSP Stołpno w 2003 roku
Młodzieżowa Drużyna Pożarnicza OSP Stołpno w 2003 roku
 
O poder da palhaçada
O poder da palhaçadaO poder da palhaçada
O poder da palhaçada
 
Memory Improvement technique (Mnemonic Device)
Memory Improvement technique (Mnemonic Device)Memory Improvement technique (Mnemonic Device)
Memory Improvement technique (Mnemonic Device)
 
Curso oceano azul parte 1 cyd
Curso oceano azul parte 1 cydCurso oceano azul parte 1 cyd
Curso oceano azul parte 1 cyd
 
Ateroesclerosis
AteroesclerosisAteroesclerosis
Ateroesclerosis
 
Web Technology
Web Technology Web Technology
Web Technology
 
¿Cómo apuntarse a un grupo?
¿Cómo apuntarse a un grupo?¿Cómo apuntarse a un grupo?
¿Cómo apuntarse a un grupo?
 
Infobae - Elisa Carrió ganó las Elecciones Virtuales Presidenciales y Maurici...
Infobae - Elisa Carrió ganó las Elecciones Virtuales Presidenciales y Maurici...Infobae - Elisa Carrió ganó las Elecciones Virtuales Presidenciales y Maurici...
Infobae - Elisa Carrió ganó las Elecciones Virtuales Presidenciales y Maurici...
 
Presentación1
Presentación1Presentación1
Presentación1
 
Zabytki Słupska i okolic
Zabytki Słupska i okolicZabytki Słupska i okolic
Zabytki Słupska i okolic
 
Daylight and Energy: Designing with Insuating Glass Unites (IGU’s) with Integ...
Daylight and Energy: Designing with Insuating Glass Unites (IGU’s) with Integ...Daylight and Energy: Designing with Insuating Glass Unites (IGU’s) with Integ...
Daylight and Energy: Designing with Insuating Glass Unites (IGU’s) with Integ...
 
Gagnez de nouveaux clients grâce à la prospection digitale
Gagnez de nouveaux clients grâce à la prospection digitaleGagnez de nouveaux clients grâce à la prospection digitale
Gagnez de nouveaux clients grâce à la prospection digitale
 

Similar to ACM Mid-Southeast Slides

The Ring programming language version 1.9 book - Part 58 of 210
The Ring programming language version 1.9 book - Part 58 of 210The Ring programming language version 1.9 book - Part 58 of 210
The Ring programming language version 1.9 book - Part 58 of 210Mahmoud Samir Fayed
 
The Ring programming language version 1.5.3 book - Part 58 of 184
The Ring programming language version 1.5.3 book - Part 58 of 184The Ring programming language version 1.5.3 book - Part 58 of 184
The Ring programming language version 1.5.3 book - Part 58 of 184Mahmoud Samir Fayed
 
CS 354 Pixel Updating
CS 354 Pixel UpdatingCS 354 Pixel Updating
CS 354 Pixel UpdatingMark Kilgard
 
The Ring programming language version 1.2 book - Part 36 of 84
The Ring programming language version 1.2 book - Part 36 of 84The Ring programming language version 1.2 book - Part 36 of 84
The Ring programming language version 1.2 book - Part 36 of 84Mahmoud Samir Fayed
 
01 first
01 first01 first
01 firstscythus
 
Advanced Game Development with the Mobile 3D Graphics API
Advanced Game Development with the Mobile 3D Graphics APIAdvanced Game Development with the Mobile 3D Graphics API
Advanced Game Development with the Mobile 3D Graphics APITomi Aarnio
 
Trident International Graphics Workshop 2014 1/5
Trident International Graphics Workshop 2014 1/5Trident International Graphics Workshop 2014 1/5
Trident International Graphics Workshop 2014 1/5Takao Wada
 
The Ring programming language version 1.4 book - Part 14 of 30
The Ring programming language version 1.4 book - Part 14 of 30The Ring programming language version 1.4 book - Part 14 of 30
The Ring programming language version 1.4 book - Part 14 of 30Mahmoud Samir Fayed
 
Ball Collecting game report
Ball Collecting game report Ball Collecting game report
Ball Collecting game report Dileep Maurya
 
Build Your Own 3D Scanner: 3D Scanning with Swept-Planes
Build Your Own 3D Scanner: 3D Scanning with Swept-PlanesBuild Your Own 3D Scanner: 3D Scanning with Swept-Planes
Build Your Own 3D Scanner: 3D Scanning with Swept-PlanesDouglas Lanman
 
Basic_Introduction_to_AUTOCAD.ppt
Basic_Introduction_to_AUTOCAD.pptBasic_Introduction_to_AUTOCAD.ppt
Basic_Introduction_to_AUTOCAD.pptVinodKumar257660
 
Данило Ульянич “C89 OpenGL for ARM microcontrollers on Cortex-M. Basic functi...
Данило Ульянич “C89 OpenGL for ARM microcontrollers on Cortex-M. Basic functi...Данило Ульянич “C89 OpenGL for ARM microcontrollers on Cortex-M. Basic functi...
Данило Ульянич “C89 OpenGL for ARM microcontrollers on Cortex-M. Basic functi...Lviv Startup Club
 
3 CG_U1_P2_PPT_3 OpenGL.pptx
3 CG_U1_P2_PPT_3 OpenGL.pptx3 CG_U1_P2_PPT_3 OpenGL.pptx
3 CG_U1_P2_PPT_3 OpenGL.pptxssuser255bf1
 
Computer Graphics Power Point using Open GL and C Programming
Computer Graphics Power Point using Open GL and C ProgrammingComputer Graphics Power Point using Open GL and C Programming
Computer Graphics Power Point using Open GL and C Programmingkemal678348
 
Corey.Berry.Portfolio.2016
Corey.Berry.Portfolio.2016Corey.Berry.Portfolio.2016
Corey.Berry.Portfolio.2016Corey Berry
 
CS 354 Introduction
CS 354 IntroductionCS 354 Introduction
CS 354 IntroductionMark Kilgard
 
The Ring programming language version 1.5.4 book - Part 48 of 185
The Ring programming language version 1.5.4 book - Part 48 of 185The Ring programming language version 1.5.4 book - Part 48 of 185
The Ring programming language version 1.5.4 book - Part 48 of 185Mahmoud Samir Fayed
 
Computer Graphics Project Report on Sinking Ship using OpenGL
Computer Graphics Project Report on Sinking Ship using OpenGL Computer Graphics Project Report on Sinking Ship using OpenGL
Computer Graphics Project Report on Sinking Ship using OpenGL Sharath Raj
 

Similar to ACM Mid-Southeast Slides (20)

The Ring programming language version 1.9 book - Part 58 of 210
The Ring programming language version 1.9 book - Part 58 of 210The Ring programming language version 1.9 book - Part 58 of 210
The Ring programming language version 1.9 book - Part 58 of 210
 
The Ring programming language version 1.5.3 book - Part 58 of 184
The Ring programming language version 1.5.3 book - Part 58 of 184The Ring programming language version 1.5.3 book - Part 58 of 184
The Ring programming language version 1.5.3 book - Part 58 of 184
 
CS 354 Pixel Updating
CS 354 Pixel UpdatingCS 354 Pixel Updating
CS 354 Pixel Updating
 
The Ring programming language version 1.2 book - Part 36 of 84
The Ring programming language version 1.2 book - Part 36 of 84The Ring programming language version 1.2 book - Part 36 of 84
The Ring programming language version 1.2 book - Part 36 of 84
 
01 first
01 first01 first
01 first
 
Advanced Game Development with the Mobile 3D Graphics API
Advanced Game Development with the Mobile 3D Graphics APIAdvanced Game Development with the Mobile 3D Graphics API
Advanced Game Development with the Mobile 3D Graphics API
 
Trident International Graphics Workshop 2014 1/5
Trident International Graphics Workshop 2014 1/5Trident International Graphics Workshop 2014 1/5
Trident International Graphics Workshop 2014 1/5
 
The Ring programming language version 1.4 book - Part 14 of 30
The Ring programming language version 1.4 book - Part 14 of 30The Ring programming language version 1.4 book - Part 14 of 30
The Ring programming language version 1.4 book - Part 14 of 30
 
Ball Collecting game report
Ball Collecting game report Ball Collecting game report
Ball Collecting game report
 
Build Your Own 3D Scanner: 3D Scanning with Swept-Planes
Build Your Own 3D Scanner: 3D Scanning with Swept-PlanesBuild Your Own 3D Scanner: 3D Scanning with Swept-Planes
Build Your Own 3D Scanner: 3D Scanning with Swept-Planes
 
Basic_Introduction_to_AUTOCAD.ppt
Basic_Introduction_to_AUTOCAD.pptBasic_Introduction_to_AUTOCAD.ppt
Basic_Introduction_to_AUTOCAD.ppt
 
Данило Ульянич “C89 OpenGL for ARM microcontrollers on Cortex-M. Basic functi...
Данило Ульянич “C89 OpenGL for ARM microcontrollers on Cortex-M. Basic functi...Данило Ульянич “C89 OpenGL for ARM microcontrollers on Cortex-M. Basic functi...
Данило Ульянич “C89 OpenGL for ARM microcontrollers on Cortex-M. Basic functi...
 
3 CG_U1_P2_PPT_3 OpenGL.pptx
3 CG_U1_P2_PPT_3 OpenGL.pptx3 CG_U1_P2_PPT_3 OpenGL.pptx
3 CG_U1_P2_PPT_3 OpenGL.pptx
 
Computer Graphics Power Point using Open GL and C Programming
Computer Graphics Power Point using Open GL and C ProgrammingComputer Graphics Power Point using Open GL and C Programming
Computer Graphics Power Point using Open GL and C Programming
 
Corey.Berry.Portfolio.2016
Corey.Berry.Portfolio.2016Corey.Berry.Portfolio.2016
Corey.Berry.Portfolio.2016
 
CS 354 Introduction
CS 354 IntroductionCS 354 Introduction
CS 354 Introduction
 
The Ring programming language version 1.5.4 book - Part 48 of 185
The Ring programming language version 1.5.4 book - Part 48 of 185The Ring programming language version 1.5.4 book - Part 48 of 185
The Ring programming language version 1.5.4 book - Part 48 of 185
 
Computer Graphics Project Report on Sinking Ship using OpenGL
Computer Graphics Project Report on Sinking Ship using OpenGL Computer Graphics Project Report on Sinking Ship using OpenGL
Computer Graphics Project Report on Sinking Ship using OpenGL
 
3D in Android
3D in Android3D in Android
3D in Android
 
AutoCAD-ppt.pptx
AutoCAD-ppt.pptxAutoCAD-ppt.pptx
AutoCAD-ppt.pptx
 

Recently uploaded

The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 

Recently uploaded (20)

The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 

ACM Mid-Southeast Slides

  • 1. Adventures in OpenGL ES Or: What Not To Expect From OpenGL ESPresented by: David Kolb, Undergrad, Columbus State University
  • 2. Why iPhone/iPod Touch? Copyright Apple, 2009. Source: http://www.apple.com/ipodtouch/
  • 3. Requirements Requirements: An Intel Mac An iPod Touch Development License iPhone Developer University Program Free for degree-granting institutions Allows for a development team of up to 200 student developers.
  • 4. Programming for iPhone OS Objective-C The OpenGL ES Pipeline
  • 6. Obj-C Crashcourse Creating a new object: Rectangle *rect = [[Rectangle alloc] init]; id rect = [Rectangle alloc]; Sending a message: [rectinitWithWidth: 30 andHeight: 45 int area = [rect area]; Accessing a field rect.width = 10;
  • 7. Obj-C Crashcourse Defining a class: @interface Rectangle : NSObject {int width;int height;}@property (nonatomic) int width, height;-(id) init;-(id) initWithHeight: (int) handWidth: (int) w;-(int) area;@end
  • 8. Obj-C Crashcourse Implementing a class @implementation Rectangle@synthesize width, height;-(id) init{ self = [super init]; if (self) {self.width = 0;self.height = 0; } return self;}@end
  • 9. Obj-C Crashcourse SelectorsSEL draw = @selector(“draw”);SEL init = @selector(“initWithHeight:andWidth:”);if([rectrespondsToSelector:draw]) {...} Can freely mix in C-style arrays, pointers, calls to malloc() and free(). Obj-C class pointers managed through retain, release, autorelease messages[rect release];
  • 10. OpenGL ES Source: iPhone Game Development Technologies, Part 1 http://developer.apple.com/adconitunes
  • 11. OpenGL ES Continued Geometry glVertexPointer, glNormalPointer, glTexCoordPointer Points, Lines, Triangles, Triangle Fans, Triangle Strips glDrawArrays, glDrawElement Textures 8888, 4444, and more. PVRTC 2D only iPhone hardware optimized for floats, not double’s or fixed.
  • 12. The Game A clone of other “block” exploding games. Select an orb of a particular color, if it neighbors at least one orb of the same color, all orbs of the same color connected to that orb will be removed from the game. The remaining orbs fall into the space remaining. Simple enough concept to give experience in the OpenGL ES API and interacting with touches.
  • 13. The Experience Wrapping a C API in a set of Objective-C classes Lack of glu functions Object selection when receiving a touch event. Writing a framework from scratch
  • 14. Program Structure Vector3D Required for nearly any work in a 3D space. Supports add and copy operations. Sphere Contains the geometry for the Bubble class. Vertices are computed ahead of time, at application load.
  • 15. Program Structure Bubble Main “game piece” Maintains a reference to a Sphere Provides bounding boxes and drawing functions Receives an update message for future animation Scene3D Manages, updates, draws objects Manages lights and camera, which have their own objects.
  • 16. Program Structure BubblesGame Root of game logic and drawing. Receives regular update calls via EAGLView’sdrawView message Receives “taps” via EAGLView’stouchesEnd:Event: message Contains the “game board” and game logic.
  • 17. Selection No rendering in selection mode. Most commonly suggested solution: Generate and bind an entirely new set of buffers (color, depth, etc.) Disable lighting, fog, and any other features that may change the color of a pixel. Render the entire scene into the buffers, making each object a slightly different color. Read the pixel located under the touch and match the color to one of the objects.
  • 18. Another Solution Produce the projection and model/view matrices. Multiply the matrices together. Invert the resulting matrix. Multiply the screen coordinates by the inverted matrix, generating a line. Compute the intersection of the line with an object.
  • 19.
  • 20. Use an orthographic projection that aligns 0,0 with one corner of the screen and matches a distance of 1.0 with the length of a pixel.
  • 21. Simply use screen coordinates as 2D world coordinates with simple adjustments as needed.
  • 22.
  • 23. Foundation Collections NSArray/NSMutableArray Does not accept nil object references. A deletion at n adjusts all elements at valid indices greater than n down by one. The game board needs to accept empty slots. Solution is to use a dictionary with NSNumber objects as keys and the actual Bubble objects as values.
  • 24. Conclusions Even for very active and animated 2D games, Quartz should be seriously considered and fully discounted before selecting OpenGL ES. Consider using one of the available iPhone game frameworks. Cocos2D Sio2Engine Oolong Engine
  • 25. Next Steps Complete logic and animations Control the direction of falling/compacting with accelerometer Scoring Endless mode
  • 26. Demo

Editor's Notes

  1. Goals of this project was to explore and asses the iPod touch as a development platform for future inclusion in the Games Development track at CSU.We specifically selected OpenGL ES as one of our environments.Foreshadows: Quartz, Apple’s 2D drawing package was probably a better idea.
  2. Apple’s marketing materials for the fall of 2009 specifically spin the iPod touch as a gaming device in addition to it’s pocket computer and music playing capabilities.Over 75,000 games on the Apple App StoreRelevance to students, both in interest and marketable skills
  3. Objective-C is the preferred development language for the iPhone OS.However, you may also use C/C++, though the documentation on using the Core Foundation data structures are much more complex.
  4. Next 4 slidesTalkabout relation between Rectangle * and id types.Interleave arguments and labelsField access is actually a message, as we’ll see.
  5. all fields/members are private.access is granted through @propertyoptions include nonatomic, readonly, and custom names of the methods called upon assignment/read.defaults allow you to define your own get or set messages-/+ methods (class/instance)
  6. synthesize completes the @property directive.discuss initialization methods, self pointer, super pointerinitialization methods are not really special
  7. Give a few minutes to memory function.
  8. no rendering directly to screenTile Based Diferred Rendering (TBDR)rendering is “lazy”, polygons are culled early and pixels are calculated in tiles laid out like a grid on the screenEAGL is a companion API that connects OpenGL ES to core AnimationOpenGL ES talks to 3D hardware, PowerVR MBX/SGX, it does the math and produces a bunch of pixels.pixels go back to main memory, then get pulled through Core Animation to be displayed.
  9. Talking points:C API: extrapolate, no extra slidesGLU functions: perspective, Mesa3DObject Selection: addressed directlyFramework: express what you wanted out of the framework and what sorts of design missteps you found
  10. Problems:Requires an entirely new set of frame buffer objects to be allocated, rendered to, read from, and deallocated.FBO’s are documented sparsely on Khronos’s site, requireing you to reference SGI’s full EXT_framebuffer_object documentation.There is little in the way of example code or discussion to be found past “How do you do it” and “draw into a side framebuffer and read the pixel data.
  11. Way too much computation for the iPhone.
  12. Discussion:This does present a bit of cheating. It breaks the whole re-useable framework idea, making it specific to the world. However, taps are handled in the Game class tree, so perhaps by delegating the tap handling to the custom code, it’s still a framework. Just not as reusable.