Writing Tetris for your Mobile Phone Professor Simon M. Lucas School of Computer Science and Electronic Engineering
Mobile (Cell) Phones First prototype: Motorola 1973 Commercial cell phones : – NTT Japan 1979 – Scandinavia 1981 – Motorola, US, 1983 – DynaTAC 8000X ($4,000) Subscribers: – 300,000 in 1984 Over 3,000,000,000 now! So much more than just a telephone!
EA Mobile UK Chart (Dec 9 th 2009)
Tetris Developed by Alexei Pajitnov in 1985 – With the help of Dmitry Pavlovsky and Vadim Gerasimov – Popular in the west in 1986 The classic ‘casual game’ of all time Hundreds of derivatives…
Tetris and Java WORA: Write Once, Run Anywhere*? *Except the iPhone!
Run Demo
Sun’s Wireless Toolkit
Developing Mobile Apps Write Java for cut-down mobile platform – Simple (older) version of the Java Language (1.3) – Using suitable libraries (e.g. no standard I/O) Test code on emulator Package into a.jar file Copy to mobile phone – OTA deployment also possible – (Over The Air)
Software Design
Divide and Conquer
Modelling Tetris
Tetris in UML (Unified Modelling Language)
And into Java Code… Controller – Main loop + event handling View – Only concerned with display of game objects Model – Game model – Shape model
Main Loop (Controller)
Event Handling
Sample MSc Student Project
Summary Mobile phones: incredible technology – RF, hardware, telecomms, software Programming should be (and is!) lots of fun Java’s a great language Modern IDEs take the pain out of software development Study computing and electronics: be part of a bright future! Download free Tetris (in Java) for your phone: – Google: Simon Lucas Tetris – Modify and improve the gameplay!