SlideShare une entreprise Scribd logo
1  sur  39
Télécharger pour lire hors ligne
Create a 3D Game
Engine for Pebble
Shipeng Xu
29 Oct 2016
http://BillHsu.github.io
my facebook,
yesterday morning
What we need to do..
• Generic way of rendering 3D images for Pebble
• Flexible
• High frame rates
6096 vertices
Pebble Time Specs
Display
• 64-color epaper, always on
• Resolution: 144x168
• Pixel density: 182 ppi
From https://www.ifixit.com/Teardown/Pebble+Time+Teardown/42382
Processors/Wireless
• ST Micro STM32F439ZG 180 MHz ARM
• Speed limited to 100 MHz imposed
• Texas Instruments CC2564B Bluetooth
Module
• Lattice LP1K FPGA(!)
• No GPU/Graphic Card
From https://www.ifixit.com/Teardown/Pebble+Time+Teardown/42382
Pebble Development
Pebble APIs
• Watch side APIs
• C API
• JavaScript API(via JerryScript)
• Phone side APIs
• PebbleKit JS
• PebbleKit iOS
• PebbleKit Android
Pebble Cloud IDE
https://cloudpebble.net
Let’s design the 3D
game engine for Pebble!
Review our goals
• Generic way of rendering 3D images for Pebble
• Flexible
• High frame rates
Two ways
• Phone side rendering
• Render image on phone
• Send the image over to watch to display
• Watch side rendering
• Send the 3D vertices to watch
• Rendering done on the watch side
Phone Side Rendering
Send image to
watch via
Bluetooth
Phone renders
the 3D image
Watch will display
the image
from phone
123
Pebble Display
144 px
168 px
A R G B
Bits 2 2 2 2
Pebble Display
• Each pixel will take 1 byte(8 bits)
• 2 bit alpha(not been used)
• 2 bit red, 2 bit green, 2 bit blue
• Display resolution 144x168
• One frame will take..
• 144x168 = 24192 Bytes = 23.625 KB
Pebble Bluetooth
Texas Instruments CC2564B
Bluetooth and Dual-Mode Controller
Bluetooth 2.1 (default, max data rate: 3 Mbps.),
Bluetooth 4.0 (iOS7+ uses LE for Notifications)
Pebble Bluetooth
• 3 Mbps ~= 360 KB per second
• One image frame will take..
• 144x168 = 24192 Bytes = 23.625 KB
• We can get more than 10 frames per second!
If message size is more than ~1.8 KB..
Send a 144x168 image
Due to PebbleOS’s limitation, a single frame
needs to call sendAppMessage 14 times…
3D Rendering
PebbleKit JS
• WebSockets
• XMLHttpRequest
• Geolocation
• LocalStorage
• No WebGL :( …
Triangles!
Rasterisation
Graphics Pipeline
A 3D renderer in JavaScript
https://github.com/billhsu/renderer.js
https://www.youtube.com/watch?
v=pUKUM6oUYNM
(Thanks engineers.sg)
Performance
3D rendering Sending buffer
Time 0.24 sec 8.46 sec
Tested on iPhone 6S with iOS 10.1
and Pebble Time with Firmware version 4.2.0
Reduce image resolution
• Originally 144x168
• Reduce to 36x42
• 36 * 42 = 1512
• Less than 1.8KB (Yay!)
• Image could be sent in one message
Performance with reduced
image resolution
3D rendering Sending buffer
Time 0.13 sec 0.41 sec
Tested on iPhone 6S with iOS 10.1
and Pebble Time with Firmware version 4.2.0
Watch Side Rendering
• Frame rate should be better
• Geometry limitation
• JerryScript may not work
Summary
• [√] Generic way of rendering 3D images for Pebble
• [√] Flexible
• [?] High frame rates
Thanks!
• http://BillHsu.github.io/
• https://github.com/billhsu/pebble3d

Contenu connexe

Tendances

Tendances (20)

How we optimized our Game - Jake & Tess' Finding Monsters Adventure
How we optimized our Game - Jake & Tess' Finding Monsters AdventureHow we optimized our Game - Jake & Tess' Finding Monsters Adventure
How we optimized our Game - Jake & Tess' Finding Monsters Adventure
 
Solving Visibility and Streaming in The Witcher 3: Wild Hunt with Umbra 3
Solving Visibility and Streaming in The Witcher 3: Wild Hunt with Umbra 3Solving Visibility and Streaming in The Witcher 3: Wild Hunt with Umbra 3
Solving Visibility and Streaming in The Witcher 3: Wild Hunt with Umbra 3
 
Unity Internals: Memory and Performance
Unity Internals: Memory and PerformanceUnity Internals: Memory and Performance
Unity Internals: Memory and Performance
 
Sergey Gonchar - Fast rendering with Starling
Sergey Gonchar - Fast rendering with StarlingSergey Gonchar - Fast rendering with Starling
Sergey Gonchar - Fast rendering with Starling
 
Developing a Multiplayer RTS with the Unreal Engine 3
Developing a Multiplayer RTS with the Unreal Engine 3Developing a Multiplayer RTS with the Unreal Engine 3
Developing a Multiplayer RTS with the Unreal Engine 3
 
Comprimato GTC presentation on the video data challenge and JPEG2000
Comprimato GTC presentation on the video data challenge and JPEG2000Comprimato GTC presentation on the video data challenge and JPEG2000
Comprimato GTC presentation on the video data challenge and JPEG2000
 
Gamebryo LightSpeed(English)
Gamebryo LightSpeed(English)Gamebryo LightSpeed(English)
Gamebryo LightSpeed(English)
 
Basic Optimization and Unity Tips & Tricks by Yogie Aditya
Basic Optimization and Unity Tips & Tricks by Yogie AdityaBasic Optimization and Unity Tips & Tricks by Yogie Aditya
Basic Optimization and Unity Tips & Tricks by Yogie Aditya
 
Design your 3d game engine
Design your 3d game engineDesign your 3d game engine
Design your 3d game engine
 
WebGL and three.js - Web 3D Graphics
WebGL and three.js - Web 3D Graphics WebGL and three.js - Web 3D Graphics
WebGL and three.js - Web 3D Graphics
 
ENEI16 - WebGL with Three.js
ENEI16 - WebGL with Three.jsENEI16 - WebGL with Three.js
ENEI16 - WebGL with Three.js
 
【Unite 2017 Tokyo】インスタンシングを用いた美麗なグラフィックの実現方法
【Unite 2017 Tokyo】インスタンシングを用いた美麗なグラフィックの実現方法【Unite 2017 Tokyo】インスタンシングを用いた美麗なグラフィックの実現方法
【Unite 2017 Tokyo】インスタンシングを用いた美麗なグラフィックの実現方法
 
GDC16: Improving geometry culling for Deus Ex: Mankind Divided by Nicolas Trudel
GDC16: Improving geometry culling for Deus Ex: Mankind Divided by Nicolas TrudelGDC16: Improving geometry culling for Deus Ex: Mankind Divided by Nicolas Trudel
GDC16: Improving geometry culling for Deus Ex: Mankind Divided by Nicolas Trudel
 
Game Engine Architecture
Game Engine ArchitectureGame Engine Architecture
Game Engine Architecture
 
HTML5 game dev with three.js - HexGL
HTML5 game dev with three.js - HexGLHTML5 game dev with three.js - HexGL
HTML5 game dev with three.js - HexGL
 
Game Engine for Serious Games
Game Engine for Serious GamesGame Engine for Serious Games
Game Engine for Serious Games
 
Rendering Techniques for Augmented Reality and a Look Ahead at AR Foundation
Rendering Techniques for Augmented Reality and a Look Ahead at AR FoundationRendering Techniques for Augmented Reality and a Look Ahead at AR Foundation
Rendering Techniques for Augmented Reality and a Look Ahead at AR Foundation
 
飛び道具ではないMetal #iOSDC
飛び道具ではないMetal #iOSDC飛び道具ではないMetal #iOSDC
飛び道具ではないMetal #iOSDC
 
【Unite 2017 Tokyo】Unity最適化講座 ~スペシャリストが教えるメモリとCPU使用率の負担最小化テクニック~
【Unite 2017 Tokyo】Unity最適化講座 ~スペシャリストが教えるメモリとCPU使用率の負担最小化テクニック~【Unite 2017 Tokyo】Unity最適化講座 ~スペシャリストが教えるメモリとCPU使用率の負担最小化テクニック~
【Unite 2017 Tokyo】Unity最適化講座 ~スペシャリストが教えるメモリとCPU使用率の負担最小化テクニック~
 
【Unite 2017 Tokyo】Anima2Dについて語るで!2Dアニメーションの未来
【Unite 2017 Tokyo】Anima2Dについて語るで!2Dアニメーションの未来【Unite 2017 Tokyo】Anima2Dについて語るで!2Dアニメーションの未来
【Unite 2017 Tokyo】Anima2Dについて語るで!2Dアニメーションの未来
 

En vedette

Copy of article about MSC
Copy of article about MSCCopy of article about MSC
Copy of article about MSC
Brennan Dierks
 
Birkosit Application in Generators
Birkosit Application in GeneratorsBirkosit Application in Generators
Birkosit Application in Generators
Project Sales Corp
 
VBM - Notícias
VBM - NotíciasVBM - Notícias
VBM - Notícias
EscolaVBM
 
Math Games
Math GamesMath Games
Math Games
jwalts
 
Ud2. l'escola accions pictos
Ud2. l'escola accions pictosUd2. l'escola accions pictos
Ud2. l'escola accions pictos
Salva Cuenca
 

En vedette (17)

Copy of article about MSC
Copy of article about MSCCopy of article about MSC
Copy of article about MSC
 
Mision
MisionMision
Mision
 
Birkosit Application in Generators
Birkosit Application in GeneratorsBirkosit Application in Generators
Birkosit Application in Generators
 
VBM - Notícias
VBM - NotíciasVBM - Notícias
VBM - Notícias
 
Math Games
Math GamesMath Games
Math Games
 
Shotgun
ShotgunShotgun
Shotgun
 
Objetivo
ObjetivoObjetivo
Objetivo
 
Christas
ChristasChristas
Christas
 
January 25
January 25January 25
January 25
 
smavicon Vorher-Nachher Beispiele, 2 von 10, Thema Recht
smavicon Vorher-Nachher Beispiele, 2 von 10, Thema Rechtsmavicon Vorher-Nachher Beispiele, 2 von 10, Thema Recht
smavicon Vorher-Nachher Beispiele, 2 von 10, Thema Recht
 
Audit Energetico e Ambientale
Audit Energetico e AmbientaleAudit Energetico e Ambientale
Audit Energetico e Ambientale
 
Gestione "di sistema" dell'Energia
Gestione "di sistema" dell'EnergiaGestione "di sistema" dell'Energia
Gestione "di sistema" dell'Energia
 
What Really Changed with Drupal 8
What Really Changed with Drupal 8What Really Changed with Drupal 8
What Really Changed with Drupal 8
 
Живопись Англии первой половины XIX века
Живопись Англии первой половины XIX векаЖивопись Англии первой половины XIX века
Живопись Англии первой половины XIX века
 
Sindh province at a glance A presentation By Mr Allah Dad Khan
Sindh province at a glance  A presentation By Mr Allah Dad KhanSindh province at a glance  A presentation By Mr Allah Dad Khan
Sindh province at a glance A presentation By Mr Allah Dad Khan
 
Os Cavalos
Os CavalosOs Cavalos
Os Cavalos
 
Ud2. l'escola accions pictos
Ud2. l'escola accions pictosUd2. l'escola accions pictos
Ud2. l'escola accions pictos
 

Similaire à Create a 3D Game Engine for Pebble

Internet 101
Internet 101Internet 101
Internet 101
lzeltzer
 
HTML5: New UI Library for Games - Chad Austin
HTML5: New UI Library for Games - Chad AustinHTML5: New UI Library for Games - Chad Austin
HTML5: New UI Library for Games - Chad Austin
Chad Austin
 
P1 powerpoint presentation
P1 powerpoint presentationP1 powerpoint presentation
P1 powerpoint presentation
AishahBegum
 
February 2017 HUG: Data Sketches: A required toolkit for Big Data Analytics
February 2017 HUG: Data Sketches: A required toolkit for Big Data AnalyticsFebruary 2017 HUG: Data Sketches: A required toolkit for Big Data Analytics
February 2017 HUG: Data Sketches: A required toolkit for Big Data Analytics
Yahoo Developer Network
 
Week 4 LBSC 690 Information Technology
Week 4 LBSC 690 Information TechnologyWeek 4 LBSC 690 Information Technology
Week 4 LBSC 690 Information Technology
Videoguy
 
Making a game with Molehill: Zombie Tycoon
Making a game with Molehill: Zombie TycoonMaking a game with Molehill: Zombie Tycoon
Making a game with Molehill: Zombie Tycoon
Jean-Philippe Doiron
 

Similaire à Create a 3D Game Engine for Pebble (20)

Brief History of Graphics Devices
Brief History of Graphics DevicesBrief History of Graphics Devices
Brief History of Graphics Devices
 
Internet 101
Internet 101Internet 101
Internet 101
 
WaveEngine Dotnet 2018
WaveEngine Dotnet 2018WaveEngine Dotnet 2018
WaveEngine Dotnet 2018
 
Windows 10 IoT Core
Windows 10 IoT CoreWindows 10 IoT Core
Windows 10 IoT Core
 
De Re PlayStation Vita
De Re PlayStation VitaDe Re PlayStation Vita
De Re PlayStation Vita
 
HTML5: New UI Library for Games - Chad Austin
HTML5: New UI Library for Games - Chad AustinHTML5: New UI Library for Games - Chad Austin
HTML5: New UI Library for Games - Chad Austin
 
Confrontation Pipeline and SCons
Confrontation Pipeline and SConsConfrontation Pipeline and SCons
Confrontation Pipeline and SCons
 
Gpu with cuda architecture
Gpu with cuda architectureGpu with cuda architecture
Gpu with cuda architecture
 
Using The New Flash Stage3D Web Technology To Build Your Own Next 3D Browser ...
Using The New Flash Stage3D Web Technology To Build Your Own Next 3D Browser ...Using The New Flash Stage3D Web Technology To Build Your Own Next 3D Browser ...
Using The New Flash Stage3D Web Technology To Build Your Own Next 3D Browser ...
 
P1 powerpoint presentation
P1 powerpoint presentationP1 powerpoint presentation
P1 powerpoint presentation
 
BINARY DATA ADVENTURES IN BROWSER JAVASCRIPT
BINARY DATA ADVENTURES  IN BROWSER JAVASCRIPTBINARY DATA ADVENTURES  IN BROWSER JAVASCRIPT
BINARY DATA ADVENTURES IN BROWSER JAVASCRIPT
 
Criteo Labs Infrastructure Tech Talk Meetup Nov. 7
Criteo Labs Infrastructure Tech Talk Meetup Nov. 7Criteo Labs Infrastructure Tech Talk Meetup Nov. 7
Criteo Labs Infrastructure Tech Talk Meetup Nov. 7
 
Developing games and graphic visualizations in Pascal
Developing games and graphic visualizations in PascalDeveloping games and graphic visualizations in Pascal
Developing games and graphic visualizations in Pascal
 
Basic Multiplayer Online Game with Node.js & dgt-net
Basic Multiplayer Online Game with Node.js & dgt-netBasic Multiplayer Online Game with Node.js & dgt-net
Basic Multiplayer Online Game with Node.js & dgt-net
 
Html5 Game Development with Canvas
Html5 Game Development with CanvasHtml5 Game Development with Canvas
Html5 Game Development with Canvas
 
February 2017 HUG: Data Sketches: A required toolkit for Big Data Analytics
February 2017 HUG: Data Sketches: A required toolkit for Big Data AnalyticsFebruary 2017 HUG: Data Sketches: A required toolkit for Big Data Analytics
February 2017 HUG: Data Sketches: A required toolkit for Big Data Analytics
 
Web rtc 入門
Web rtc 入門Web rtc 入門
Web rtc 入門
 
Week 4 LBSC 690 Information Technology
Week 4 LBSC 690 Information TechnologyWeek 4 LBSC 690 Information Technology
Week 4 LBSC 690 Information Technology
 
AWS Webcast - What's New with Amazon Elastic Transcoder
AWS Webcast - What's New with Amazon Elastic TranscoderAWS Webcast - What's New with Amazon Elastic Transcoder
AWS Webcast - What's New with Amazon Elastic Transcoder
 
Making a game with Molehill: Zombie Tycoon
Making a game with Molehill: Zombie TycoonMaking a game with Molehill: Zombie Tycoon
Making a game with Molehill: Zombie Tycoon
 

Dernier

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 

Dernier (20)

Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 

Create a 3D Game Engine for Pebble