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