The NextStep to iPhone - jinx...Introduction History Porting Touch Interface Appstore Analytics...

Post on 27-Sep-2020

0 views 0 download

Transcript of The NextStep to iPhone - jinx...Introduction History Porting Touch Interface Appstore Analytics...

The NextStepto iPhonePatrick Stein aka Jolly

www.jinx.de www.screenrecycler.com

The NextStepto iPhone

• Introduction

• History

• Porting

• Touch Interface

• Appstore Analytics

Introduction History Porting Touch Interface Appstore Analytics

Sokoban History• Original Sokoban 1982

• ported to almost every Architecture

• Played X11 Sokoban

• Wayfinder idea

• FastSokoban.app on NextStep 1993

Introduction History Porting Touch Interface Appstore Analytics

Sokoban History

Demo

Introduction History Porting Touch Interface Appstore Analytics

Porting• March 7th, Registered

• May 7th, Accepted

• May 7th, Setup Keys

• G5 issues

• May 29th, Corrected Keys

• May 30th, Ready to Start - which program then ?

Introduction History Porting Touch Interface Appstore Analytics

start now• May 30th - Start with a small Program like

FastSokoban

• FastSokoban is small and has only one major class

• LOC: 1177 (768) - SokoView: 900 (614)

Introduction History Porting Touch Interface Appstore Analytics

actual Porting• copying over the methods

• removed appkit/appkit.h

• NX... (Size/Rect/Image...) -> NS...

• Mouse Events to Touch Events

• No DPS - switch from PS... to CG Paths

• June 1st - working Port after 2 days

Introduction History Porting Touch Interface Appstore Analytics

1st Version

Demo

Introduction History Porting Touch Interface Appstore Analytics

• Touches - double tapping

- (void)touchesBegan:(NSSet *)theTouches withEvent:(UIEvent *)theEvent{ if( 1 != [[theTouches anyObject] tapCount] ) { [[self class] cancelPreviousPerformRequestsWithTarget:self]; }}

- (void)touchesEnded(NSSet *)theTouches withEvent:(UIEvent *)theEvent{

if( 1 == [[theTouches anyObject] tapCount] ){

isinnotouchmode = NO;[self perfomSelector: @selector(singleClick:)

withObject: nil afterDelay: 0.2]; // 350ms Apple default

}

// code for double click

Touch Interface

Introduction History Porting Touch Interface Appstore Analytics

Improvements Part 1• Path and Crosshair

• Simple CALayer animation

• Slow Tapping / TipTap

• Saving on exit

Introduction History Porting Touch Interface Appstore Analytics

Improvements Part 1

Demo

Introduction History Porting Touch Interface Appstore Analytics

Improvements Part 1I• Touch and slide interface

• Classic Cursor movement

• Levelset Manager / downloading

• LayerAnimator

Introduction History Porting Touch Interface Appstore Analytics

Improvements Part 1I

Demo

Introduction History Porting Touch Interface Appstore Analytics

Improvements Part III• Adding a Schema for downloading

<array> <dict> <key>CFBundleURLName</key> <string>de.jinx.SmartSoko</string> <key>CFBundleURLSchemes</key> <array> <string>soko</string> <string>sokoban</string> </array> </dict> </array>

@interface SmartSokoAppDelegate : NSObject <UIApplicationDelegate>

- (BOOL)application:(UIApplication *)anApplication handleOpenURL:(NSURL *)aUrl;

Introduction History Porting Touch Interface Appstore Analytics

Improvements Part III• Layer Animation (CAKeyframeAnimation)

@interface LayerAnimator : NSObject

- (void)addAnimationOfLayer:(CALayer*)aLayer toPoint:(CGPoint)aPoint;

- (void)advance;- (void)animate;

• The Presentation Layer is your friend:

currentPosition = (CGPoint)[(CALayer *)animationLayer position];

currentAnimatedPosition = (CGPoint)[(CALayer *)[animationLayer presentationLayer] position];

Introduction History Porting Touch Interface Appstore Analytics

Improvements Part III• Smooth Layer Animation (CAKeyframeAnimation)

if( currentPosition.x != currentAnimatedPosition.x || currentPosition.y != currentAnimatedPosition.y ){

[animationLayer setPosition: currentAnimatedPosition];[animationLayer removeAnimationForKey:@__FILE__];

[animationArray insertObject: [NSValue valueWithCGPoint:currentAnimatedPosition] atIndex: 0];[animationArray insertObject: [NSValue valueWithCGPoint:currentPosition] atIndex: 1];

}else{

[animationArray insertObject: [NSValue valueWithCGPoint:currentPosition] atIndex: 0];

}...theAnimation.values = animationArray;theAnimation.duration = duration;theAnimation.delegate = self;[animationLayer addAnimation:theAnimation forKey:@__FILE__];

Introduction History Porting Touch Interface Appstore Analytics

0 1 2 3 4

5 6 7 8 9

10 11 12 13 14

15 16 17 18 19

20 21 22 23 24

Improvements Part III• Performance problem

1

1 1

1

2

2 2

2 2

2 2

3

3 3

3 3

3 3

Introduction History Porting Touch Interface Appstore Analytics

Improvements Part III • Pathfinder rewritten

• Smart movements added

• Error correcting interface

• Cursor layer added

• Started: LOC: 1177 (768) - SokoView: 900 (614)

• Final: LOC: 4200 (2500) - Sokoview: 1880 (1248)

Introduction History Porting Touch Interface Appstore Analytics

Final Version

Demo

Introduction History Porting Touch Interface Appstore Analytics

Appstore Analytics• Info button trick

• Appstore cheats

• Naming (fixed after about 10 days)

• Price/Rank (fixed early August)

• Version (fixed late September)

Introduction History Porting Touch Interface Appstore Analytics

Price Cheats (till August 7th)

0

5

10

15

20

25

30

35 Crazy LighterKoi PondBreakClassicAmbianceTexas Hold’emBreakRecorderWhipSudoku ClassicCrash Bandicoot

Introduction History Porting Touch Interface Appstore Analytics

Staff Pick

Smart Sokoban Sales (weekly)

20080728 20080811 20080825 20080908 20080922 20081006 20081020

RoWESATCANLITCHGBDEUS

0%

25%

50%

75%

100%

2.Update1.Update

Introduction History Porting Touch Interface Appstore Analytics

20080728 20080802 20080807 20080813 20080819 20080824 20080829 20080903 20080908 20080913 20080918 20080923 20080928 20081003 20081008 20081013 20081018

ROWESATCANLITCHGBDEUS

Staff Pick

Smart Sokoban Sales (daily)

0%

25%

50%

75%

100%

fscklog

2.Update1.Update

Introduction History Porting Touch Interface Appstore Analytics

Smart Sokoban (Germany)

Sales

0

25

50

75

100Rank

Introduction History Porting Touch Interface Appstore Analytics

20080731 20080805 20080810 20080815 20080820 20080825 20080830 20080904 20080909 20080914 20080919 20080924 20080929 20081004 20081010 20081015 20081020

ROWCHCAGBSEJPITFRDEUS

0%

25%

50%

75%

100%

1.UpdateStaff Pick

Clinometer Sales (daily)

2.Update

Introduction History Porting Touch Interface Appstore Analytics

Top 10 US titles in October

0

25

50

75

100 Cro-Mag Rally Moto ChaseriChalky 300 BowlTopple Flick BowlingSolebon Solitaire iFishEverest: Hidden Expedition CameraBagThe Stone of Destiny Enigmo

Introduction History Porting Touch Interface Appstore Analytics

Flick Bowling rank/price in October (US)

0

12.5

25.0

37.5

50.0 RankPrice

Introduction History Porting Touch Interface Appstore Analytics

Moto Chaser rank/price in October (US)

0

22.5

45.0

67.5

90.0 RankPrice

Introduction History Porting Touch Interface Appstore Analytics

Blue Skies rank/price in October (US)

0

25

50

75

100 RankPrice

Introduction History Porting Touch Interface Appstore Analytics

Ruler Phone rank/price in October (US)

0

25

50

75

100 RankPrice

Introduction History Porting Touch Interface Appstore Analytics

Enigmo rank/price (Aug-Oct)

0

25

50

75

100RankPrice

Germany US

end.

Patrick Stein aka Jollywww.jinx.de www.screenrecycler.com