lecturer: lisa hua producer: jack shi pm: yinlan zhao tm: yemin sui software institute, nju software...

28
Games' Controling by Mobile Phone's Sensors on Android Platform Lecturer: Lisa Hua Producer: Jack Shi PM: Yinlan Zhao TM: Yemin Sui Software Institute, NJU Software Institute, Nanjing University

Upload: kristina-caldwell

Post on 20-Jan-2016

218 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Lecturer: Lisa Hua Producer: Jack Shi PM: Yinlan Zhao TM: Yemin Sui Software Institute, NJU Software Institute, Nanjing University

Games' Controling by Mobile Phone's Sensors on Android PlatformLecturer: Lisa HuaProducer: Jack Shi

PM: Yinlan ZhaoTM: Yemin SuiSoftware Institute, NJU

Software Institute, Nanjing University

Page 2: Lecturer: Lisa Hua Producer: Jack Shi PM: Yinlan Zhao TM: Yemin Sui Software Institute, NJU Software Institute, Nanjing University

Contents Everything From the Name

Innovations

Market Analysis

Page 3: Lecturer: Lisa Hua Producer: Jack Shi PM: Yinlan Zhao TM: Yemin Sui Software Institute, NJU Software Institute, Nanjing University

Everything From the Name

Page 4: Lecturer: Lisa Hua Producer: Jack Shi PM: Yinlan Zhao TM: Yemin Sui Software Institute, NJU Software Institute, Nanjing University

What is in the name “Mobic”?

Mobic = Mobile + Computer The logo “Mobic” is from Google

from

Page 5: Lecturer: Lisa Hua Producer: Jack Shi PM: Yinlan Zhao TM: Yemin Sui Software Institute, NJU Software Institute, Nanjing University

Innovations

Innovation-1: The project’s name and logo

Innovation-2: User Experience

Innovation-3: User Interface

Innovation-4: Powerful Program Interface

Innovation-6: Data Processing

Innovation-7: Not only games

Innovation-5: Using XML

Page 6: Lecturer: Lisa Hua Producer: Jack Shi PM: Yinlan Zhao TM: Yemin Sui Software Institute, NJU Software Institute, Nanjing University

Innovation-2: User Experience

Give a sense of reality to users.

It allows users to exercise instead of using mouse and keyboard only.

Games is no longer only a game, they are sports that your opponent is PC

Page 7: Lecturer: Lisa Hua Producer: Jack Shi PM: Yinlan Zhao TM: Yemin Sui Software Institute, NJU Software Institute, Nanjing University

Innovation-3: User Interface

open source

Use the thought of games’ control in the UI control.

Your only work on PC is double click the application.

Make users feel that the routine use the system is very smooth, and make the system keep consistent and convenient.

TM

Page 8: Lecturer: Lisa Hua Producer: Jack Shi PM: Yinlan Zhao TM: Yemin Sui Software Institute, NJU Software Institute, Nanjing University

Innovation-4: Powerful Program Interface

Mobile Terminal:

The difference between Sofa Mode and Sports Mode is using different sensors.

Page 9: Lecturer: Lisa Hua Producer: Jack Shi PM: Yinlan Zhao TM: Yemin Sui Software Institute, NJU Software Institute, Nanjing University

The Routine to Start a Mode

Create a new object, newMode

newMode.start();

newMode.suspend();

newMode.cancel();

newMode.prepare();

Page 10: Lecturer: Lisa Hua Producer: Jack Shi PM: Yinlan Zhao TM: Yemin Sui Software Institute, NJU Software Institute, Nanjing University

How to extend?

Extend a new abstract mode like SofaMode and SportsMode

Implement a new mode for game like Game_SpeedMode

Override prepare() to set sensors that to be used

Implements the abstract method process(Message msg);

Override cancel() to unregister sensors that be used

This method is used for process data from sensors

Page 11: Lecturer: Lisa Hua Producer: Jack Shi PM: Yinlan Zhao TM: Yemin Sui Software Institute, NJU Software Institute, Nanjing University

Motion Definition

Initialize a motion by using constructor according to your process in the method process(Message msg);

The only job you should do is

Then dispatch it by motion.dispatch();

Page 12: Lecturer: Lisa Hua Producer: Jack Shi PM: Yinlan Zhao TM: Yemin Sui Software Institute, NJU Software Institute, Nanjing University

Nearly the same with mobile terminalThe motion on PC we call it

Action

PC Terminal

When we get a Action newAction, we use

newAction.doAction() to control our game.

Page 13: Lecturer: Lisa Hua Producer: Jack Shi PM: Yinlan Zhao TM: Yemin Sui Software Institute, NJU Software Institute, Nanjing University

Innovation-5: Using XML

Properties Examplename VR2installpath F:\vr2\project\Ppj2dd.exe actionList name Forward

info 前进key W

Using xml to configure a game’s properties make the Expansibility stronger.

Page 14: Lecturer: Lisa Hua Producer: Jack Shi PM: Yinlan Zhao TM: Yemin Sui Software Institute, NJU Software Institute, Nanjing University

Innovation-6: Data Processing —— Difficulties

Sensor data is not very accurate;1

Acceleration Sensor’s data is not the real acceleration, they include the gravity.2

The data are very small like 0.000213111;3

The problem of multi-thread.4

Page 15: Lecturer: Lisa Hua Producer: Jack Shi PM: Yinlan Zhao TM: Yemin Sui Software Institute, NJU Software Institute, Nanjing University

Frameworks designed for performance

Frameworks designed for performance

Solutions——How to get accelerations?

Firstly, get the acceleration that has gravity component, and orientation data.

acc_x=acc[0]-9.8*sinθ

acc_y=acc[0]+9.8*sinα

acc_z=sqrt(9.82-acc_x2-acc_y2)

xy

z

G

Page 16: Lecturer: Lisa Hua Producer: Jack Shi PM: Yinlan Zhao TM: Yemin Sui Software Institute, NJU Software Institute, Nanjing University

Solutions——Data are too small to computer

V = V0+ATS = V0T+0.5*AT2

To make the computing get a suitable result, we magnify the time T 1000 times.

The result S is often NAN because the T=50ms=0.05s.

Page 17: Lecturer: Lisa Hua Producer: Jack Shi PM: Yinlan Zhao TM: Yemin Sui Software Institute, NJU Software Institute, Nanjing University

Solutions——Multi-Thread Problem

Message msg = mode.getDataHandler().obtainMessage(1, msg_obj);mode.getDataHandler().sendMessage(msg);

To solve the chaos of multi-thread, and get data in order, we use message mechanism

SensorEventListenerMessageQueueMode.process(Message msg)

Page 18: Lecturer: Lisa Hua Producer: Jack Shi PM: Yinlan Zhao TM: Yemin Sui Software Institute, NJU Software Institute, Nanjing University

So many games!

Speed SBKX VR2Tennis

Innovation-7: For Games, But Not Only Games

Page 19: Lecturer: Lisa Hua Producer: Jack Shi PM: Yinlan Zhao TM: Yemin Sui Software Institute, NJU Software Institute, Nanjing University

Innovation-7: For Games, But Not Only Games

In the future, even in the remote control domain for TVs or others

Page 20: Lecturer: Lisa Hua Producer: Jack Shi PM: Yinlan Zhao TM: Yemin Sui Software Institute, NJU Software Institute, Nanjing University

Market Analysis

Page 21: Lecturer: Lisa Hua Producer: Jack Shi PM: Yinlan Zhao TM: Yemin Sui Software Institute, NJU Software Institute, Nanjing University

Our AdvantagesLow Cost

Large Number of Users

Conveniences

Easy to Maintain

Page 22: Lecturer: Lisa Hua Producer: Jack Shi PM: Yinlan Zhao TM: Yemin Sui Software Institute, NJU Software Institute, Nanjing University

Our AdvantagesLow Cost

We needn’t to develop games for our system, the system’s task is to improve users’ experience on existed games on PC.

On the other hand, you needn’t buy more equipment. You only need an Android mobile phone.

Page 23: Lecturer: Lisa Hua Producer: Jack Shi PM: Yinlan Zhao TM: Yemin Sui Software Institute, NJU Software Institute, Nanjing University

Our Advantages

ConvenienceYou needn’t carry other equipment. You can use the

system wherever and whenever only if you have a mobile phone and a computer.

Page 24: Lecturer: Lisa Hua Producer: Jack Shi PM: Yinlan Zhao TM: Yemin Sui Software Institute, NJU Software Institute, Nanjing University

Our Advantages

Powerful interface and using xml make the system is so easy to extend that you needn’t change its source code.

On the other hand you needn’t maintain the games the system control.

Easy to maintain

Page 25: Lecturer: Lisa Hua Producer: Jack Shi PM: Yinlan Zhao TM: Yemin Sui Software Institute, NJU Software Institute, Nanjing University

Our Advantages

Large Number of

Users• In China, there are more than 0.1 billion computer

users;• This shows that we have many users and potential

users;• In China, the users of Android has exceed Iphone;

and in the world even though the users of Android is less than Iphone, but it is increasing very fast.

Page 26: Lecturer: Lisa Hua Producer: Jack Shi PM: Yinlan Zhao TM: Yemin Sui Software Institute, NJU Software Institute, Nanjing University

Summary

Mobic is a system that has lower risk than other same kind products

Low cost;Number of users;Easy to maintain;Convenience;Etc.

Page 27: Lecturer: Lisa Hua Producer: Jack Shi PM: Yinlan Zhao TM: Yemin Sui Software Institute, NJU Software Institute, Nanjing University

MobicTM

Page 28: Lecturer: Lisa Hua Producer: Jack Shi PM: Yinlan Zhao TM: Yemin Sui Software Institute, NJU Software Institute, Nanjing University

JUNE 7-10, 2010 | NEW ORLEANS, LA

Q&A

DECEMBER 21-10, 2010 | Nanjing, Jiangsu

MobicTM

2010 PRC