Game Development for Smartwatches | Andrei Gradinari, Alexei Ceban

31
Game development for smartwatches Problems and Solutions Andrei Gradinari, Alexei Ceban Spooky House Studios

Transcript of Game Development for Smartwatches | Andrei Gradinari, Alexei Ceban

Page 1: Game Development for Smartwatches | Andrei Gradinari, Alexei Ceban

Game development for smartwatches

Problems and Solutions

Andrei Gradinari, Alexei CebanSpooky House Studios

Page 2: Game Development for Smartwatches | Andrei Gradinari, Alexei Ceban

Summer 2014• Google IO - google presents Android Wear (among other interesting things)

• Spooky House Studios ports 15 mobile games to the platform in 1 month

• Fancy code and project design in place by that time to do that

Page 3: Game Development for Smartwatches | Andrei Gradinari, Alexei Ceban

Winter 2015/2016• Spooky House Studios ports 15

mobile games to Tizen in 3 weeks

Page 4: Game Development for Smartwatches | Andrei Gradinari, Alexei Ceban

Some of Spooky House Wearable

Games

Page 5: Game Development for Smartwatches | Andrei Gradinari, Alexei Ceban
Page 6: Game Development for Smartwatches | Andrei Gradinari, Alexei Ceban

UI Challenges• Small screens• Small round screens• Small round screens with bottom

cut• Other shape of a small screen in

future ?

Page 7: Game Development for Smartwatches | Andrei Gradinari, Alexei Ceban

Porting challenges• Technical• UI• Controls• Maintenance of one more platform • Next step ( completely different

type of gaming, designed from the ground up for wearables)

Page 8: Game Development for Smartwatches | Andrei Gradinari, Alexei Ceban

Technical Challenges

• Performance - not an issue• PowerVR SGX530 series GPU on most Android Wear

watches• FRAMERATE = GPU FILLRATE / NUMBER OF PIXELS• Small resolution + iPhone 3gs power = HIGH

FRAMERATE• Network communications

• usually need to be done via middleman phone.• not transparent and not easy to use on Android

• Battery life - can be held under control. (Next slides)

Page 9: Game Development for Smartwatches | Andrei Gradinari, Alexei Ceban

Battery life• Sessions:

• 5 minute sessions at MOST (playtesting data) It’s not comfortable to play on watch longer

• couple of game sessions a day• doesn’t really hurt battery life

• FPS Limiter (smart implementation goes long way to power preservation)

Page 10: Game Development for Smartwatches | Andrei Gradinari, Alexei Ceban

Smart FPS Limiter must:• Keep FPS as low as possible when

picture is still• Increase FPS to 60 when there are

animated objects• Increase FPS to 60 when user

interacts• Response time shouldn’t be

affected. (Sleep thread for 1 second is not going to work)

Page 11: Game Development for Smartwatches | Andrei Gradinari, Alexei Ceban

Types of FPS limiters (slide 1)• Purely sleep() based:

• simple but very basic• Has Input lag , doesn’t allow for very low idle FPS

• Purely VSYNC based:• For ex: displayLink setFrameInterval: on iOS• Creates stable smooth FPS ( Fixed to 60,40,30,20,10, FPS

values)• Has input lag

Page 12: Game Development for Smartwatches | Andrei Gradinari, Alexei Ceban

Types of FPS limiters (slide 2)• Combined VSYNC with update() and render() not linked to

each other• Very responsive, no input lag ( at any FPS, even 1)• Smooth• Pseudo code example : The complex FPS limiter logic is

processed and returned as bool:bool needs_rerender = update(dt);if(needs_rerender){ render(); // also waits for vsync}

Page 13: Game Development for Smartwatches | Andrei Gradinari, Alexei Ceban

Examples of our smartwatch games

Page 14: Game Development for Smartwatches | Andrei Gradinari, Alexei Ceban

Before: After:

Page 15: Game Development for Smartwatches | Andrei Gradinari, Alexei Ceban

Gaming on smartwatches

• Classic control schemes don’t work• Swipe instead of drag• Tap anywhere instead of tap on specific

location• Alternative input (Digital Crown on Apple,

Rotating Bezel on Samsung Gear S2)

Page 16: Game Development for Smartwatches | Andrei Gradinari, Alexei Ceban

Wearable innovations that now are merged back into

our mobile games• FPS Limiter• UI Gestures• Simplistic UI Layout

Page 17: Game Development for Smartwatches | Andrei Gradinari, Alexei Ceban

Simplistic UI merged back to mobile

Page 18: Game Development for Smartwatches | Andrei Gradinari, Alexei Ceban

Same game. Different platforms

Page 19: Game Development for Smartwatches | Andrei Gradinari, Alexei Ceban

Handling reserved gestures

• Drag left-to-right is reserved on Android Wear

• Live with it ?• Or override it ( only make sure to

comply with Wear guidelines to be approved for watch category listing )

Page 20: Game Development for Smartwatches | Andrei Gradinari, Alexei Ceban

Nextgen wearable games• Extension of your smartphone / desktop / console game on your watch

• Notification driven (short sessions natural for wearables)

• “Lifeline’” is a good example of direction to move into:• Cross platform (Wearable & Mobile)• Natively limited session length due to the

nature of the game• Notification driven gameplay

Page 21: Game Development for Smartwatches | Andrei Gradinari, Alexei Ceban

Unique Ways of Input

• Pros: New natural way to interact with an app - always good.

• Cons: Not all touch screen input can be converted to limited native controls

Page 22: Game Development for Smartwatches | Andrei Gradinari, Alexei Ceban

Rotating Bezel + Physical Buttons ( Galaxy Gear S2)

Page 23: Game Development for Smartwatches | Andrei Gradinari, Alexei Ceban

Digital Crown - Apple Watch

Page 24: Game Development for Smartwatches | Andrei Gradinari, Alexei Ceban

Physical buttons ( Pebble )

Page 25: Game Development for Smartwatches | Andrei Gradinari, Alexei Ceban

Thank you!

• Next: Technical nuances, Alexei Ceban

Page 26: Game Development for Smartwatches | Andrei Gradinari, Alexei Ceban

Watch App types

• Apple-watch-like glance• Separate and independent app

Page 27: Game Development for Smartwatches | Andrei Gradinari, Alexei Ceban

Porting to a new platform

GraphicsSound File

System

Input Processi

ng

Project Templat

e

Basic App

lifecyclecallback

s

includes &

libraries

IrrlichtС++rules the world!

Page 28: Game Development for Smartwatches | Andrei Gradinari, Alexei Ceban

Running game: How to exit?

No swipes in the game Game with swipe controls H/W back button

Android Wear Tizen

MenuPower

Page 29: Game Development for Smartwatches | Andrei Gradinari, Alexei Ceban

Code allocation

Android WearTizen

Pebble

Graphics Library

Apple Watch

platform specific code

Sound

File System

Input Processing

C/C++

Java + JNI19%OpenGL ES

OpenGL ES

OpenGL ESObjective-C

Pebble GraphicsC

Spooky House game engine

C++81%

UI Adsin-app purchases

analytics

device capabilities

sounds & musicmathdownload upload

app lifecycle callbacks

Page 31: Game Development for Smartwatches | Andrei Gradinari, Alexei Ceban

Thank you!• Andrei Gradinari, Alexei Ceban,

Spooky House Studios• [email protected][email protected]