Transcript
Page 1: "How to Develop with Qt for Multiple Screen Resolutions and Increase Your User Retention (of Cross-Platform Apps and Games)" - Qt Developer Days 2014 Presentation by V-Play

Qt Dev Days Berlin 20147.10.2014

by Christian Feldbacher, MScCo-Founder V-Play GmbH

Qt Responsive Design&

How to Boost User Retention

Page 2: "How to Develop with Qt for Multiple Screen Resolutions and Increase Your User Retention (of Cross-Platform Apps and Games)" - Qt Developer Days 2014 Presentation by V-Play

• XP– Game Development 10+ years

– iOS, Android, Symbian App Development

– C++ 10+ years

– Qt 5+ years

• Co-Founded V-Play GmbH 2012– Started in 2009, full-time 2011

– Based in Vienna, Austria

– Ehances Qt 5 for games

About Me

Page 3: "How to Develop with Qt for Multiple Screen Resolutions and Increase Your User Retention (of Cross-Platform Apps and Games)" - Qt Developer Days 2014 Presentation by V-Play

Why QML Plugins?

2011

Game prototype

For iOS & Android

QGraphicsView

2011

Custom cocos2d-x

Renderer beginning

2012

V-Play Launch

Ready to publish high performance

iOS & Android games

2014

V-Play Qt 5 Plugins

For apps & games

2010

QML / Qt Quick

Wholy shit

That’s cool!!!

Page 4: "How to Develop with Qt for Multiple Screen Resolutions and Increase Your User Retention (of Cross-Platform Apps and Games)" - Qt Developer Days 2014 Presentation by V-Play

V-Play Plugins

Available at http://plugins.v-play.net

Page 5: "How to Develop with Qt for Multiple Screen Resolutions and Increase Your User Retention (of Cross-Platform Apps and Games)" - Qt Developer Days 2014 Presentation by V-Play

Part 1: Responsive Design with Qt

Part 2: How to Increase User Retention

Agenda

Page 6: "How to Develop with Qt for Multiple Screen Resolutions and Increase Your User Retention (of Cross-Platform Apps and Games)" - Qt Developer Days 2014 Presentation by V-Play

Part 1: Responsive Design with Qt

Page 7: "How to Develop with Qt for Multiple Screen Resolutions and Increase Your User Retention (of Cross-Platform Apps and Games)" - Qt Developer Days 2014 Presentation by V-Play

Fixed Ratio, Percentage

Page 8: "How to Develop with Qt for Multiple Screen Resolutions and Increase Your User Retention (of Cross-Platform Apps and Games)" - Qt Developer Days 2014 Presentation by V-Play

• Use multiplication for sizes

• Use Image.PreserveAspectFit

• Use font.pixelSize * height for Text

• Useful for apps that shall/can have the

same UI ratio on all devices

• Very simple to implement

Fixed Ratio, Percentage

Page 9: "How to Develop with Qt for Multiple Screen Resolutions and Increase Your User Retention (of Cross-Platform Apps and Games)" - Qt Developer Days 2014 Presentation by V-Play

Layouts make positioning syntax nicer:

Layouts

Page 10: "How to Develop with Qt for Multiple Screen Resolutions and Increase Your User Retention (of Cross-Platform Apps and Games)" - Qt Developer Days 2014 Presentation by V-Play

Layouts make positioning syntax nicer:

Layouts

vs

Page 11: "How to Develop with Qt for Multiple Screen Resolutions and Increase Your User Retention (of Cross-Platform Apps and Games)" - Qt Developer Days 2014 Presentation by V-Play

• The properties x, y, width, height are

ignored in Layout children items

• Use size constraints minimum*,

preferred*, maximum* and fill*

• Similar to weights concept in Android

LinearLayout, but more flexible

* either Width or Height

Layouts

Page 12: "How to Develop with Qt for Multiple Screen Resolutions and Increase Your User Retention (of Cross-Platform Apps and Games)" - Qt Developer Days 2014 Presentation by V-Play

• Items shall be same physical size

(millimeters) across all devices

• Pixels not usable

• Use dp instead – how to do that in QML?

Density-Independence

Page 13: "How to Develop with Qt for Multiple Screen Resolutions and Increase Your User Retention (of Cross-Platform Apps and Games)" - Qt Developer Days 2014 Presentation by V-Play

Calculate screenDpi

https://bugreports.qt-project.org/browse/QTBUG-35701

Example screenDpi values are: – 326 for iPhone Retina

– 212 for Nexus 7

– 143 for 13“ fullHd notebook

Density-Independence

Page 14: "How to Develop with Qt for Multiple Screen Resolutions and Increase Your User Retention (of Cross-Platform Apps and Games)" - Qt Developer Days 2014 Presentation by V-Play

At a 160 dpi screen, 1 dp = 1 pixel

At a 320 dpi screen, 1 dp = 2 pixels

Still the same physical space!

Implementation Guide & Usage:

Density-Independence

Page 15: "How to Develop with Qt for Multiple Screen Resolutions and Increase Your User Retention (of Cross-Platform Apps and Games)" - Qt Developer Days 2014 Presentation by V-Play

More Issues on Windows with pointSize:

Text Sizes

Page 16: "How to Develop with Qt for Multiple Screen Resolutions and Increase Your User Retention (of Cross-Platform Apps and Games)" - Qt Developer Days 2014 Presentation by V-Play

Remaining Text Issues:

• User font size settings not supported

• You could read it by yourself though

Text Sizes

Page 17: "How to Develop with Qt for Multiple Screen Resolutions and Increase Your User Retention (of Cross-Platform Apps and Games)" - Qt Developer Days 2014 Presentation by V-Play

• Problem with 1 image:

– Low res image: blurs at upscaling

– High res image: space & memory waste,

performance issues at loading time

• Solution: Choose image based on screen

size or dpi

• Bad Approach:

Dynamic Image Switching

Page 18: "How to Develop with Qt for Multiple Screen Resolutions and Increase Your User Retention (of Cross-Platform Apps and Games)" - Qt Developer Days 2014 Presentation by V-Play

• File access generalized across platforms

• Works behind the scenes

• V-Play Approach:

Less code & easier to read (no ifdefs)

Same physical size thanks to dp()

Dynamic Image Switching

+hd2/imageSwitching.png

+hd/imageSwitching.png

imageSwitching.png

Page 19: "How to Develop with Qt for Multiple Screen Resolutions and Increase Your User Retention (of Cross-Platform Apps and Games)" - Qt Developer Days 2014 Presentation by V-Play

• Also use per platform, e.g. +ios, +android

• Together with QML Singletons set fontsizes, dimensions, layouts

• Disadvantages File Selectors:

– Must be set before QmlEngine.load()

– Cannot be changed at runtime

To do that, use Loader

– Not as mature as Android (e.g. sw600dp)

File Selectors

Page 20: "How to Develop with Qt for Multiple Screen Resolutions and Increase Your User Retention (of Cross-Platform Apps and Games)" - Qt Developer Days 2014 Presentation by V-Play

• To achieve this:

Density-Independence Summary

Page 21: "How to Develop with Qt for Multiple Screen Resolutions and Increase Your User Retention (of Cross-Platform Apps and Games)" - Qt Developer Days 2014 Presentation by V-Play

Content Scaling

• 1 logical Scene 480x320, Safe Zone

• Gets scaled to full screen

• Default scaleMode letterbox

• Scene is visible on all Devices

• Similar approach to fixed ratio (percentage)

• Esp. for games important to be comparable

• Advantages:

• Simpler positioning, like on iOS

• Easiest to use, fastest to develop

• Good enough for most use cases, also apps

Page 22: "How to Develop with Qt for Multiple Screen Resolutions and Increase Your User Retention (of Cross-Platform Apps and Games)" - Qt Developer Days 2014 Presentation by V-Play

For full screen usage like UI elements, use

gameWindowAnchorItem

Content Scaling

http://v-play.net/doc/v-play-examples-windowscenescaling-example/

Page 23: "How to Develop with Qt for Multiple Screen Resolutions and Increase Your User Retention (of Cross-Platform Apps and Games)" - Qt Developer Days 2014 Presentation by V-Play

• Make background bigger

• Outside zone cut on devices

• What is cut depends on aspect ratio

Content Scaling

Page 24: "How to Develop with Qt for Multiple Screen Resolutions and Increase Your User Retention (of Cross-Platform Apps and Games)" - Qt Developer Days 2014 Presentation by V-Play

• Use Content Scaling when possible:– Pixel values are content-scaled

– Easiest & fastest to develop

– File Selectors auto-supported by V-Play

• If(ContentScaling !== possible):– For equal physical Item sizes use dp()

– For Text use font.pixelSize: sp()

• Supply sd (default), +hd, +hd2 graphics

• Never use pixels!

QML Responsive Design Summary

Page 25: "How to Develop with Qt for Multiple Screen Resolutions and Increase Your User Retention (of Cross-Platform Apps and Games)" - Qt Developer Days 2014 Presentation by V-Play

Part 2: How to Increase User Retention

Of mobile apps & games

Page 26: "How to Develop with Qt for Multiple Screen Resolutions and Increase Your User Retention (of Cross-Platform Apps and Games)" - Qt Developer Days 2014 Presentation by V-Play

• Achievement & Leaderboard integration

in 70 Lines of Code!

• Facebook & Game Center integration

• Also useful for apps!

V-Play Game Network

Page 27: "How to Develop with Qt for Multiple Screen Resolutions and Increase Your User Retention (of Cross-Platform Apps and Games)" - Qt Developer Days 2014 Presentation by V-Play

V-Play Game Network

Page 28: "How to Develop with Qt for Multiple Screen Resolutions and Increase Your User Retention (of Cross-Platform Apps and Games)" - Qt Developer Days 2014 Presentation by V-Play

V-Play Game Network

Page 29: "How to Develop with Qt for Multiple Screen Resolutions and Increase Your User Retention (of Cross-Platform Apps and Games)" - Qt Developer Days 2014 Presentation by V-Play

• GameCenter on steroids made for/with Qt

• True cross-platform: – Leaderboards

– Achievements

– Challenges

– Cloud storage & syncing

• Deep Facebook connection

• Full offline support

• Skinnable

• Add Gamification also for„normal apps“

V-Play Game Network

http://v-play.net/doc/vplay-vplaygamenetwork/

Page 30: "How to Develop with Qt for Multiple Screen Resolutions and Increase Your User Retention (of Cross-Platform Apps and Games)" - Qt Developer Days 2014 Presentation by V-Play

User-Generated Content

Balance any property at runtime with the ItemEditorcomponent

Page 31: "How to Develop with Qt for Multiple Screen Resolutions and Increase Your User Retention (of Cross-Platform Apps and Games)" - Qt Developer Days 2014 Presentation by V-Play

User-Generated Content

Style the UI to match your app / game

Page 32: "How to Develop with Qt for Multiple Screen Resolutions and Increase Your User Retention (of Cross-Platform Apps and Games)" - Qt Developer Days 2014 Presentation by V-Play

User-Generated Content

Monetize the user-generated content with an “App Store for Levels”

Page 33: "How to Develop with Qt for Multiple Screen Resolutions and Increase Your User Retention (of Cross-Platform Apps and Games)" - Qt Developer Days 2014 Presentation by V-Play

User-Generated Content

This is all it takes to change the width & height property at

runtime

Page 34: "How to Develop with Qt for Multiple Screen Resolutions and Increase Your User Retention (of Cross-Platform Apps and Games)" - Qt Developer Days 2014 Presentation by V-Play

V-Play Level Editor & Level Sharing

Squaby Particle Editor

• Save time in internal development

• Let users create levels

• Social Sharing & Rating of Levels Community

• Monetize content packs with IAP

• Customizable Look

Add app store for user generated content to your

own apps/games easily.

Examples (in App Stores):

Stack And Friends

Page 35: "How to Develop with Qt for Multiple Screen Resolutions and Increase Your User Retention (of Cross-Platform Apps and Games)" - Qt Developer Days 2014 Presentation by V-Play

Push Notifications

http://plugins.v-play.net/plugins/notifications

Page 36: "How to Develop with Qt for Multiple Screen Resolutions and Increase Your User Retention (of Cross-Platform Apps and Games)" - Qt Developer Days 2014 Presentation by V-Play

V-Play Plugins

Available at http://plugins.v-play.net

0-100€ per plugin per app, Samples on GitHub

Page 37: "How to Develop with Qt for Multiple Screen Resolutions and Increase Your User Retention (of Cross-Platform Apps and Games)" - Qt Developer Days 2014 Presentation by V-Play

• Gamification elements:

– Leaderboards

– Achievements

– Challenges

• Social Integrations like Facebook

• User-Generated Content

• Push Notifications

User Retention Summary

Page 38: "How to Develop with Qt for Multiple Screen Resolutions and Increase Your User Retention (of Cross-Platform Apps and Games)" - Qt Developer Days 2014 Presentation by V-Play

Contact

Christian Feldbacher

Co-Founder

[email protected]

Alex Leutgöb

Co-Founder

[email protected]

V-Play GmbH

Kolonitzgasse 9/11-14

A – 1030 Wien

http://v-play.net

@vplayengine

http://www.facebook.com/vplayengine

Meet us outside @ the V-Play Booth!

Page 39: "How to Develop with Qt for Multiple Screen Resolutions and Increase Your User Retention (of Cross-Platform Apps and Games)" - Qt Developer Days 2014 Presentation by V-Play

• Summary of Supporting Multiple Screens & Densities at V-Play Blog:http://v-play.net/2014/11/supporting-multiple-screen-sizes-and-screen-densities-with-qt-and-v-play

• Android Guide – „Supporting Multiple Screens“: http://developer.android.com/guide/practices/screens_support.html

• V-Play Guide - „How to create mobile games for different screen sizes and resolutions”: http://v-play.net/doc/vplay-different-screen-sizes/

• Windows Dev Center Guide – „DPI and Device-Independent Pixels“: http://msdn.microsoft.com/en-us/library/windows/desktop/ff684173%28v=vs.85%29.aspx

• V-Play Tutorial - „How to increase player retention & downloads in 10 minutes”: http://v-play.net/doc/lesson-5/

• V-Play Tutorial – „How to add Facebook & Game Center sharing to your game”:http://v-play.net/doc/lesson-6/

• V-Play Tutorial – „How to boost level creation and balancing of your game with V-Play Level Editor”:http://v-play.net/doc/lesson-7/

• V-Play Tutorial – „How to benefit from user-generated content in your game with V-Play Level Store”:http://v-play.net/doc/lesson-8/

References


Recommended