SlideShare a Scribd company logo
Chameleon
                             3D game engine



Tuesday, January 18, 2011
Overview

    •OpenGL 2.0+ (desktop), ES 1.1, 2.0 (mobile)
    •DirectX support (windows)
    •C based
    •Platform independent
    •Lightweight, easy syntax
    •Complex API
    •Easily scalable
    •Tons of built-in features
Tuesday, January 18, 2011
OpenGL ES

    •OpenGL API subset
    •Designed for embedded devices
    •Perfect for 3D on the iPhone/iPod touch & iPad
    •Also perfect for Android
    •Hardware accelerated rendering on the GPU
    •CPU should do almost no work
    •...but it’s pretty complicated!
    •...quite hard to find the perfect optimizations
    •...inexperienced programmers will make games 50x slower
Tuesday, January 18, 2011
Chameleon
                              features


    •Renderer abstraction
    •Works on iOS, Android, Mac, Linux, Windows
    •Advanced 2D functions (arc, shape, bezier, catmull etc.)
    •Eye-candy effects (blend, glow, diffuse, tint etc.)
    •Fast image loading/compression (to 2 bits per pixel)
    •Lights (ambient, point, spot) and materials
    •Shadows, reflections
    •Shape primitives (cube, sphere, cylinder, torus etc.)
Tuesday, January 18, 2011
Features
                            features (continued)


    •3D model loading (geometry, textures)
    •Skybox, sphere map
    •Particle system emitters (fire, explosions etc.)
    •Imposters, billboard nodes (vegetation, trees etc.)
    •Camera (yaw, pitch, roll: position, rotation)
    •Camera controllers (arcball, fps, rpg, etc.)
    •Offscreen canvas
    •...plus, many others
    •...optimized for each platform
Tuesday, January 18, 2011
Architecture

    •Window                 engine context setup
         ‣Position on screen (or parent view) - x, y, width, height
         ‣Fullscreen (or not)
         ‣Display refresh rate, bits per pixel
         ‣Input and mouse (touch) position, state, gestures
    •Renderer                hardware accelerated
         ‣Built-in capabilities abstraction layer
         ‣Around 20 extremely low level drawing functions
         ‣Entire engine relies only on them
         ‣Easily scalable on any hardware

Tuesday, January 18, 2011
Architecture

    •Canvas                 drawing layer
         ‣Coordinate system functions (translate, rotate, scale, transform)
         ‣Styles (fill, stroke, tint, blend, alpha, add, mask etc.)
         ‣Pixels, points, lines, n-sided polygons (rectangle, ellipse etc.)
         ‣Convex/ concave shapes, bezier curves, cubic hermite splines
         ‣Images, sprites, animations
         ‣3D primitives (cube, sphere, cylinder, capsule, torus etc.)
         ‣Lights, shadows, materials, reflections setup
    + Core extensions the user friendly high-level interface
    + Utilities the must-have game API (resource locator, image loader, files, sound, xml etc.)

Tuesday, January 18, 2011
Snippets

    •CImage *img = loadImage("test.jpg", kSmooth)
    •image(img, 0, 0, img->width, img->height);
    •CColor color;
    •getImagePixel(img, &color, 100, 100);
    •setImagePixel(img, initColor(255, 0, 0, 128), 100, 100);
    •CModel *model = loadModel("fighter.3ds");
    •geometryRotation(model->geometry, PI, -HALF_PI, 0);
    •drawModel(model);
    •pointLight(0, initVector3(5, -2, 0),
                            initAmbient(192, 192, 128),
    ! !         !           initDiffuse(192, 192, 192),
    ! !         !           initSpecular(255, 128, 64));

    •materialSpecular(255, 255, 255);
    •materialShininess(128);
    •translate(5, 2, -6);
    •rotate(radians(60), 1, 1, 0);
    •scale(2, 3, 1);

Tuesday, January 18, 2011
Example
                                                             Lenna

    float frameCount;                                              - (void)draw {
                                                                   !   clear();
    CArcball *arcb;                                                !   origin();
    CColor *col;                                                   !
    CImage *img;                                                   !   translateZ(-4);!
                                                                   !   rotateScene(arcb);
    #define step 2                                                 !
                                                                   !   noFill();
    - (void)setup {                                                !   whiteStroke();
    !   defaults();                                                !   cube(0, 0, 0, img->width, img->height, img->width);
    !   optimize3D();                                              !   ellipse(0, 0, e.width, e.width);
    !   noPointSmooth();                                           !
    !   createPrimitives();                                        !   beginPixels();
    !                                                              !   for (float i = 0; i < img->width; i += step) {
    !   perspective(45, (float)e.width / e.height, 1, 100);        !   !     for (float j = 0; j < img->height; j += step) {
    !                                                              !   !     !    getImagePixel(img, col, i, j);
    !   arcb = initArcball(e.width / 2, e.height / 2, e.height);   !   !     !    float br = brightness(col->r, col->g, col->b);
    !   col = initColor(0, 0, 0, 0);                               !   !     !    pixelColor(i - img->width / 2,
    !   img = loadImage("lenna320.jpg", kSmooth);                  !   !     !    !    !     j - img->height / 2,
    }                                                              !   !     !    !    !     br * fastsin(frameCount) / 2,
                                                                   !   !     !    !    !     col->r, col->g, col->b, 255);
                                                                   !   !     }
                                                                   !   }
                                                                   !   endPixels();

                                                                   !   frameCount += .1;
                                                                   !
                                                                   !   gl.present(self.view);
                                                                   }




Tuesday, January 18, 2011
Example
                                                             Lenna

    float frameCount;                                              - (void)draw {
                                                                   !   clear();
    CArcball *arcb;                                                !   origin();
    CColor *col;                                                   !
    CImage *img;                                                   !   translateZ(-4);!
                                                                   !   rotateScene(arcb);
    #define step 2                                                 !
                                                                   !   noFill();
    - (void)setup {                                                !   whiteStroke();
    !   defaults();                                                !   cube(0, 0, 0, img->width, img->height, img->width);
    !   optimize3D();                                              !   ellipse(0, 0, e.width, e.width);
    !   noPointSmooth();                                           !
    !   createPrimitives();                                        !   beginPixels();
    !                                                              !   for (float i = 0; i < img->width; i += step) {
    !   perspective(45, (float)e.width / e.height, 1, 100);        !   !     for (float j = 0; j < img->height; j += step) {
    !                                                              !   !     !    getImagePixel(img, col, i, j);
    !   arcb = initArcball(e.width / 2, e.height / 2, e.height);   !   !     !    float br = brightness(col->r, col->g, col->b);
    !   col = initColor(0, 0, 0, 0);                               !   !     !    pixelColor(i - img->width / 2,
    !   img = loadImage("lenna320.jpg", kSmooth);                  !   !     !    !    !     j - img->height / 2,
    }                                                              !   !     !    !    !     br * fastsin(frameCount) / 2,
                                                                   !   !     !    !    !     col->r, col->g, col->b, 255);
                                                                   !   !     }
                                                                   !   }
                                                                   !   endPixels();

                                                                   !   frameCount += .1;
                                                                   !
                                                                   !   gl.present(self.view);
                                                                   }




Tuesday, January 18, 2011
Live coding/deployment
          ghter aircraft - model loading, environment, lighting, shadows




Tuesday, January 18, 2011
?


Tuesday, January 18, 2011

More Related Content

What's hot

Quartz 2D with Swift 3
Quartz 2D with Swift 3Quartz 2D with Swift 3
Quartz 2D with Swift 3
Bob McCune
 
Introduction to Game Programming Tutorial
Introduction to Game Programming TutorialIntroduction to Game Programming Tutorial
Introduction to Game Programming Tutorial
Richard Jones
 
openFrameworks 007 - 3D
openFrameworks 007 - 3DopenFrameworks 007 - 3D
openFrameworks 007 - 3D
roxlu
 
openFrameworks 007 - utils
openFrameworks 007 - utilsopenFrameworks 007 - utils
openFrameworks 007 - utils
roxlu
 
Android UI Development: Tips, Tricks, and Techniques
Android UI Development: Tips, Tricks, and TechniquesAndroid UI Development: Tips, Tricks, and Techniques
Android UI Development: Tips, Tricks, and Techniques
Edgar Gonzalez
 
Proga 090525
Proga 090525Proga 090525
Proga 090525
Atsushi Tadokoro
 
미려한 UI/UX를 위한 여정
미려한 UI/UX를 위한 여정미려한 UI/UX를 위한 여정
미려한 UI/UX를 위한 여정
SeungChul Kang
 
Sceneform SDK на практиці - UA Mobile 2019
Sceneform SDK на практиці - UA Mobile 2019Sceneform SDK на практиці - UA Mobile 2019
Sceneform SDK на практиці - UA Mobile 2019
Eugene Kurko
 
ECMA5 and ES6 Promises
ECMA5 and ES6 PromisesECMA5 and ES6 Promises
ECMA5 and ES6 Promises
Oswald Campesato
 
FLATMAP ZAT SHIT : les monades expliquées aux geeks (Devoxx France 2013)
FLATMAP ZAT SHIT : les monades expliquées aux geeks (Devoxx France 2013)FLATMAP ZAT SHIT : les monades expliquées aux geeks (Devoxx France 2013)
FLATMAP ZAT SHIT : les monades expliquées aux geeks (Devoxx France 2013)
François Sarradin
 
[Let'Swift 2019] 실용적인 함수형 프로그래밍 워크샵
[Let'Swift 2019] 실용적인 함수형 프로그래밍 워크샵[Let'Swift 2019] 실용적인 함수형 프로그래밍 워크샵
[Let'Swift 2019] 실용적인 함수형 프로그래밍 워크샵
Wanbok Choi
 
My favorite slides
My favorite slidesMy favorite slides
My favorite slides
Mitchell Wand
 
openFrameworks 007 - graphics
openFrameworks 007 - graphicsopenFrameworks 007 - graphics
openFrameworks 007 - graphics
roxlu
 
How to make a video game
How to make a video gameHow to make a video game
How to make a video game
dandylion13
 
Lecture9
Lecture9Lecture9
Lecture9
Krishna Karri
 
Html5 canvas
Html5 canvasHtml5 canvas
Html5 canvas
Gary Yeh
 
Th 0230 turbo_chargeyourui-howtomakeyourandroidu_ifastandefficient
Th 0230 turbo_chargeyourui-howtomakeyourandroidu_ifastandefficientTh 0230 turbo_chargeyourui-howtomakeyourandroidu_ifastandefficient
Th 0230 turbo_chargeyourui-howtomakeyourandroidu_ifastandefficient
Bin Shao
 

What's hot (17)

Quartz 2D with Swift 3
Quartz 2D with Swift 3Quartz 2D with Swift 3
Quartz 2D with Swift 3
 
Introduction to Game Programming Tutorial
Introduction to Game Programming TutorialIntroduction to Game Programming Tutorial
Introduction to Game Programming Tutorial
 
openFrameworks 007 - 3D
openFrameworks 007 - 3DopenFrameworks 007 - 3D
openFrameworks 007 - 3D
 
openFrameworks 007 - utils
openFrameworks 007 - utilsopenFrameworks 007 - utils
openFrameworks 007 - utils
 
Android UI Development: Tips, Tricks, and Techniques
Android UI Development: Tips, Tricks, and TechniquesAndroid UI Development: Tips, Tricks, and Techniques
Android UI Development: Tips, Tricks, and Techniques
 
Proga 090525
Proga 090525Proga 090525
Proga 090525
 
미려한 UI/UX를 위한 여정
미려한 UI/UX를 위한 여정미려한 UI/UX를 위한 여정
미려한 UI/UX를 위한 여정
 
Sceneform SDK на практиці - UA Mobile 2019
Sceneform SDK на практиці - UA Mobile 2019Sceneform SDK на практиці - UA Mobile 2019
Sceneform SDK на практиці - UA Mobile 2019
 
ECMA5 and ES6 Promises
ECMA5 and ES6 PromisesECMA5 and ES6 Promises
ECMA5 and ES6 Promises
 
FLATMAP ZAT SHIT : les monades expliquées aux geeks (Devoxx France 2013)
FLATMAP ZAT SHIT : les monades expliquées aux geeks (Devoxx France 2013)FLATMAP ZAT SHIT : les monades expliquées aux geeks (Devoxx France 2013)
FLATMAP ZAT SHIT : les monades expliquées aux geeks (Devoxx France 2013)
 
[Let'Swift 2019] 실용적인 함수형 프로그래밍 워크샵
[Let'Swift 2019] 실용적인 함수형 프로그래밍 워크샵[Let'Swift 2019] 실용적인 함수형 프로그래밍 워크샵
[Let'Swift 2019] 실용적인 함수형 프로그래밍 워크샵
 
My favorite slides
My favorite slidesMy favorite slides
My favorite slides
 
openFrameworks 007 - graphics
openFrameworks 007 - graphicsopenFrameworks 007 - graphics
openFrameworks 007 - graphics
 
How to make a video game
How to make a video gameHow to make a video game
How to make a video game
 
Lecture9
Lecture9Lecture9
Lecture9
 
Html5 canvas
Html5 canvasHtml5 canvas
Html5 canvas
 
Th 0230 turbo_chargeyourui-howtomakeyourandroidu_ifastandefficient
Th 0230 turbo_chargeyourui-howtomakeyourandroidu_ifastandefficientTh 0230 turbo_chargeyourui-howtomakeyourandroidu_ifastandefficient
Th 0230 turbo_chargeyourui-howtomakeyourandroidu_ifastandefficient
 

Similar to Chameleon game engine

MS TechDays 2011 - HTML 5 All the Awesome Bits
MS TechDays 2011 - HTML 5 All the Awesome BitsMS TechDays 2011 - HTML 5 All the Awesome Bits
MS TechDays 2011 - HTML 5 All the Awesome Bits
Spiffy
 
Cocos2d 소개 - Korea Linux Forum 2014
Cocos2d 소개 - Korea Linux Forum 2014Cocos2d 소개 - Korea Linux Forum 2014
Cocos2d 소개 - Korea Linux Forum 2014
Changwon National University
 
Building Native Apps- A Digital Canvas for Coders and Designers with Walter Luh
Building Native Apps- A Digital Canvas for Coders and Designers with Walter LuhBuilding Native Apps- A Digital Canvas for Coders and Designers with Walter Luh
Building Native Apps- A Digital Canvas for Coders and Designers with Walter Luh
FITC
 
Real life XNA
Real life XNAReal life XNA
Real life XNA
Johan Lindfors
 
september11.ppt
september11.pptseptember11.ppt
september11.ppt
CharlesMatu2
 
1. Modify code to change cube into pyramid.2. Make the pyramid int.pdf
1. Modify code to change cube into pyramid.2. Make the pyramid int.pdf1. Modify code to change cube into pyramid.2. Make the pyramid int.pdf
1. Modify code to change cube into pyramid.2. Make the pyramid int.pdf
alokopticalswatchco0
 
Histogram dan Segmentasi
Histogram dan SegmentasiHistogram dan Segmentasi
Histogram dan Segmentasi
Lusiana Diyan
 
Histogram dan Segmentasi 2
Histogram dan Segmentasi 2Histogram dan Segmentasi 2
Histogram dan Segmentasi 2
Lusiana Diyan
 
Building a Visualization Language
Building a Visualization LanguageBuilding a Visualization Language
Building a Visualization Language
jeresig
 
Processing and Processing.js
Processing and Processing.jsProcessing and Processing.js
Processing and Processing.js
jeresig
 
Writing a Space Shooter with HTML5 Canvas
Writing a Space Shooter with HTML5 CanvasWriting a Space Shooter with HTML5 Canvas
Writing a Space Shooter with HTML5 Canvas
Steve Purkis
 
Open cv tutorial
Open cv tutorialOpen cv tutorial
Open cv tutorial
Eric Larson
 
Денис Лебедев, Swift
Денис Лебедев, SwiftДенис Лебедев, Swift
Денис Лебедев, Swift
Yandex
 
Displaying information within a window.68
Displaying information within a window.68Displaying information within a window.68
Displaying information within a window.68
myrajendra
 
Google tools for webmasters
Google tools for webmastersGoogle tools for webmasters
Google tools for webmasters
Rujata Patil
 
Introduction to Coding
Introduction to CodingIntroduction to Coding
Introduction to Coding
Fabio506452
 
Cocos2dを使ったゲーム作成の事例
Cocos2dを使ったゲーム作成の事例Cocos2dを使ったゲーム作成の事例
Cocos2dを使ったゲーム作成の事例
Yuichi Higuchi
 
Core animation
Core animationCore animation
Core animation
Weizhong Yang
 
tutorial5
tutorial5tutorial5
tutorial5
tutorialsruby
 
tutorial5
tutorial5tutorial5
tutorial5
tutorialsruby
 

Similar to Chameleon game engine (20)

MS TechDays 2011 - HTML 5 All the Awesome Bits
MS TechDays 2011 - HTML 5 All the Awesome BitsMS TechDays 2011 - HTML 5 All the Awesome Bits
MS TechDays 2011 - HTML 5 All the Awesome Bits
 
Cocos2d 소개 - Korea Linux Forum 2014
Cocos2d 소개 - Korea Linux Forum 2014Cocos2d 소개 - Korea Linux Forum 2014
Cocos2d 소개 - Korea Linux Forum 2014
 
Building Native Apps- A Digital Canvas for Coders and Designers with Walter Luh
Building Native Apps- A Digital Canvas for Coders and Designers with Walter LuhBuilding Native Apps- A Digital Canvas for Coders and Designers with Walter Luh
Building Native Apps- A Digital Canvas for Coders and Designers with Walter Luh
 
Real life XNA
Real life XNAReal life XNA
Real life XNA
 
september11.ppt
september11.pptseptember11.ppt
september11.ppt
 
1. Modify code to change cube into pyramid.2. Make the pyramid int.pdf
1. Modify code to change cube into pyramid.2. Make the pyramid int.pdf1. Modify code to change cube into pyramid.2. Make the pyramid int.pdf
1. Modify code to change cube into pyramid.2. Make the pyramid int.pdf
 
Histogram dan Segmentasi
Histogram dan SegmentasiHistogram dan Segmentasi
Histogram dan Segmentasi
 
Histogram dan Segmentasi 2
Histogram dan Segmentasi 2Histogram dan Segmentasi 2
Histogram dan Segmentasi 2
 
Building a Visualization Language
Building a Visualization LanguageBuilding a Visualization Language
Building a Visualization Language
 
Processing and Processing.js
Processing and Processing.jsProcessing and Processing.js
Processing and Processing.js
 
Writing a Space Shooter with HTML5 Canvas
Writing a Space Shooter with HTML5 CanvasWriting a Space Shooter with HTML5 Canvas
Writing a Space Shooter with HTML5 Canvas
 
Open cv tutorial
Open cv tutorialOpen cv tutorial
Open cv tutorial
 
Денис Лебедев, Swift
Денис Лебедев, SwiftДенис Лебедев, Swift
Денис Лебедев, Swift
 
Displaying information within a window.68
Displaying information within a window.68Displaying information within a window.68
Displaying information within a window.68
 
Google tools for webmasters
Google tools for webmastersGoogle tools for webmasters
Google tools for webmasters
 
Introduction to Coding
Introduction to CodingIntroduction to Coding
Introduction to Coding
 
Cocos2dを使ったゲーム作成の事例
Cocos2dを使ったゲーム作成の事例Cocos2dを使ったゲーム作成の事例
Cocos2dを使ったゲーム作成の事例
 
Core animation
Core animationCore animation
Core animation
 
tutorial5
tutorial5tutorial5
tutorial5
 
tutorial5
tutorial5tutorial5
tutorial5
 

More from Victor Porof

Firefox WebGL developer tools
Firefox WebGL developer toolsFirefox WebGL developer tools
Firefox WebGL developer tools
Victor Porof
 
Firefox developer tools
Firefox developer toolsFirefox developer tools
Firefox developer tools
Victor Porof
 
Js in the open
Js in the openJs in the open
Js in the open
Victor Porof
 
Processing.js vs. three.js
Processing.js vs. three.jsProcessing.js vs. three.js
Processing.js vs. three.js
Victor Porof
 
Javascript, Do you speak it!
Javascript, Do you speak it!Javascript, Do you speak it!
Javascript, Do you speak it!
Victor Porof
 
Cityquest - Developing games for the mobile devices
Cityquest - Developing games for the mobile devicesCityquest - Developing games for the mobile devices
Cityquest - Developing games for the mobile devicesVictor Porof
 
Web3D - Semantic standards, WebGL, HCI
Web3D - Semantic standards, WebGL, HCIWeb3D - Semantic standards, WebGL, HCI
Web3D - Semantic standards, WebGL, HCI
Victor Porof
 
Developing web apps using Java and the Play framework
Developing web apps using Java and the Play frameworkDeveloping web apps using Java and the Play framework
Developing web apps using Java and the Play framework
Victor Porof
 
Beginners' guide to Ruby on Rails
Beginners' guide to Ruby on RailsBeginners' guide to Ruby on Rails
Beginners' guide to Ruby on Rails
Victor Porof
 
Introduction to the XNA framework
Introduction to the XNA frameworkIntroduction to the XNA framework
Introduction to the XNA framework
Victor Porof
 
Introduction to 3D and shaders
Introduction to 3D and shadersIntroduction to 3D and shaders
Introduction to 3D and shaders
Victor Porof
 

More from Victor Porof (11)

Firefox WebGL developer tools
Firefox WebGL developer toolsFirefox WebGL developer tools
Firefox WebGL developer tools
 
Firefox developer tools
Firefox developer toolsFirefox developer tools
Firefox developer tools
 
Js in the open
Js in the openJs in the open
Js in the open
 
Processing.js vs. three.js
Processing.js vs. three.jsProcessing.js vs. three.js
Processing.js vs. three.js
 
Javascript, Do you speak it!
Javascript, Do you speak it!Javascript, Do you speak it!
Javascript, Do you speak it!
 
Cityquest - Developing games for the mobile devices
Cityquest - Developing games for the mobile devicesCityquest - Developing games for the mobile devices
Cityquest - Developing games for the mobile devices
 
Web3D - Semantic standards, WebGL, HCI
Web3D - Semantic standards, WebGL, HCIWeb3D - Semantic standards, WebGL, HCI
Web3D - Semantic standards, WebGL, HCI
 
Developing web apps using Java and the Play framework
Developing web apps using Java and the Play frameworkDeveloping web apps using Java and the Play framework
Developing web apps using Java and the Play framework
 
Beginners' guide to Ruby on Rails
Beginners' guide to Ruby on RailsBeginners' guide to Ruby on Rails
Beginners' guide to Ruby on Rails
 
Introduction to the XNA framework
Introduction to the XNA frameworkIntroduction to the XNA framework
Introduction to the XNA framework
 
Introduction to 3D and shaders
Introduction to 3D and shadersIntroduction to 3D and shaders
Introduction to 3D and shaders
 

Recently uploaded

Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
innovationoecd
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
Zilliz
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Speck&Tech
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
kumardaparthi1024
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
Zilliz
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
panagenda
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
Neo4j
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Safe Software
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
名前 です男
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
Matthew Sinclair
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
Uni Systems S.M.S.A.
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Malak Abu Hammad
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
SOFTTECHHUB
 
How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
Daiki Mogmet Ito
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
Adtran
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
Kari Kakkonen
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
Neo4j
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
SOFTTECHHUB
 

Recently uploaded (20)

Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
 
How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
 

Chameleon game engine

  • 1. Chameleon 3D game engine Tuesday, January 18, 2011
  • 2. Overview •OpenGL 2.0+ (desktop), ES 1.1, 2.0 (mobile) •DirectX support (windows) •C based •Platform independent •Lightweight, easy syntax •Complex API •Easily scalable •Tons of built-in features Tuesday, January 18, 2011
  • 3. OpenGL ES •OpenGL API subset •Designed for embedded devices •Perfect for 3D on the iPhone/iPod touch & iPad •Also perfect for Android •Hardware accelerated rendering on the GPU •CPU should do almost no work •...but it’s pretty complicated! •...quite hard to find the perfect optimizations •...inexperienced programmers will make games 50x slower Tuesday, January 18, 2011
  • 4. Chameleon features •Renderer abstraction •Works on iOS, Android, Mac, Linux, Windows •Advanced 2D functions (arc, shape, bezier, catmull etc.) •Eye-candy effects (blend, glow, diffuse, tint etc.) •Fast image loading/compression (to 2 bits per pixel) •Lights (ambient, point, spot) and materials •Shadows, reflections •Shape primitives (cube, sphere, cylinder, torus etc.) Tuesday, January 18, 2011
  • 5. Features features (continued) •3D model loading (geometry, textures) •Skybox, sphere map •Particle system emitters (fire, explosions etc.) •Imposters, billboard nodes (vegetation, trees etc.) •Camera (yaw, pitch, roll: position, rotation) •Camera controllers (arcball, fps, rpg, etc.) •Offscreen canvas •...plus, many others •...optimized for each platform Tuesday, January 18, 2011
  • 6. Architecture •Window engine context setup ‣Position on screen (or parent view) - x, y, width, height ‣Fullscreen (or not) ‣Display refresh rate, bits per pixel ‣Input and mouse (touch) position, state, gestures •Renderer hardware accelerated ‣Built-in capabilities abstraction layer ‣Around 20 extremely low level drawing functions ‣Entire engine relies only on them ‣Easily scalable on any hardware Tuesday, January 18, 2011
  • 7. Architecture •Canvas drawing layer ‣Coordinate system functions (translate, rotate, scale, transform) ‣Styles (fill, stroke, tint, blend, alpha, add, mask etc.) ‣Pixels, points, lines, n-sided polygons (rectangle, ellipse etc.) ‣Convex/ concave shapes, bezier curves, cubic hermite splines ‣Images, sprites, animations ‣3D primitives (cube, sphere, cylinder, capsule, torus etc.) ‣Lights, shadows, materials, reflections setup + Core extensions the user friendly high-level interface + Utilities the must-have game API (resource locator, image loader, files, sound, xml etc.) Tuesday, January 18, 2011
  • 8. Snippets •CImage *img = loadImage("test.jpg", kSmooth) •image(img, 0, 0, img->width, img->height); •CColor color; •getImagePixel(img, &color, 100, 100); •setImagePixel(img, initColor(255, 0, 0, 128), 100, 100); •CModel *model = loadModel("fighter.3ds"); •geometryRotation(model->geometry, PI, -HALF_PI, 0); •drawModel(model); •pointLight(0, initVector3(5, -2, 0), initAmbient(192, 192, 128), ! ! ! initDiffuse(192, 192, 192), ! ! ! initSpecular(255, 128, 64)); •materialSpecular(255, 255, 255); •materialShininess(128); •translate(5, 2, -6); •rotate(radians(60), 1, 1, 0); •scale(2, 3, 1); Tuesday, January 18, 2011
  • 9. Example Lenna float frameCount; - (void)draw { ! clear(); CArcball *arcb; ! origin(); CColor *col; ! CImage *img; ! translateZ(-4);! ! rotateScene(arcb); #define step 2 ! ! noFill(); - (void)setup { ! whiteStroke(); ! defaults(); ! cube(0, 0, 0, img->width, img->height, img->width); ! optimize3D(); ! ellipse(0, 0, e.width, e.width); ! noPointSmooth(); ! ! createPrimitives(); ! beginPixels(); ! ! for (float i = 0; i < img->width; i += step) { ! perspective(45, (float)e.width / e.height, 1, 100); ! ! for (float j = 0; j < img->height; j += step) { ! ! ! ! getImagePixel(img, col, i, j); ! arcb = initArcball(e.width / 2, e.height / 2, e.height); ! ! ! float br = brightness(col->r, col->g, col->b); ! col = initColor(0, 0, 0, 0); ! ! ! pixelColor(i - img->width / 2, ! img = loadImage("lenna320.jpg", kSmooth); ! ! ! ! ! j - img->height / 2, } ! ! ! ! ! br * fastsin(frameCount) / 2, ! ! ! ! ! col->r, col->g, col->b, 255); ! ! } ! } ! endPixels(); ! frameCount += .1; ! ! gl.present(self.view); } Tuesday, January 18, 2011
  • 10. Example Lenna float frameCount; - (void)draw { ! clear(); CArcball *arcb; ! origin(); CColor *col; ! CImage *img; ! translateZ(-4);! ! rotateScene(arcb); #define step 2 ! ! noFill(); - (void)setup { ! whiteStroke(); ! defaults(); ! cube(0, 0, 0, img->width, img->height, img->width); ! optimize3D(); ! ellipse(0, 0, e.width, e.width); ! noPointSmooth(); ! ! createPrimitives(); ! beginPixels(); ! ! for (float i = 0; i < img->width; i += step) { ! perspective(45, (float)e.width / e.height, 1, 100); ! ! for (float j = 0; j < img->height; j += step) { ! ! ! ! getImagePixel(img, col, i, j); ! arcb = initArcball(e.width / 2, e.height / 2, e.height); ! ! ! float br = brightness(col->r, col->g, col->b); ! col = initColor(0, 0, 0, 0); ! ! ! pixelColor(i - img->width / 2, ! img = loadImage("lenna320.jpg", kSmooth); ! ! ! ! ! j - img->height / 2, } ! ! ! ! ! br * fastsin(frameCount) / 2, ! ! ! ! ! col->r, col->g, col->b, 255); ! ! } ! } ! endPixels(); ! frameCount += .1; ! ! gl.present(self.view); } Tuesday, January 18, 2011
  • 11. Live coding/deployment ghter aircraft - model loading, environment, lighting, shadows Tuesday, January 18, 2011