An Innovative wireless PDA Game Leung Pui Yin, Carol Lo Man Kit, Marcus.

Slides:



Advertisements
Similar presentations
Chap 4 Multithreaded Programming. Thread A thread is a basic unit of CPU utilization It comprises a thread ID, a program counter, a register set and a.
Advertisements

Threads. Objectives To introduce the notion of a thread — a fundamental unit of CPU utilization that forms the basis of multithreaded computer systems.
Silberschatz, Galvin and Gagne ©2009Operating System Concepts – 8 th Edition Chapter 4: Threads.
Chapter 4: Multithreaded Programming
Chapter 4: Threads. Overview Multithreading Models Threading Issues Pthreads Windows XP Threads.
Tools for Investigating Graphics System Performance
4.1 Silberschatz, Galvin and Gagne ©2005 Operating System Principles Chapter 4 Multithreaded Programming Objectives Objectives To introduce a notion of.
3.5 Interprocess Communication Many operating systems provide mechanisms for interprocess communication (IPC) –Processes must communicate with one another.
Server Architecture Models Operating Systems Hebrew University Spring 2004.
3.5 Interprocess Communication
ART: Augmented Reality Table for Interactive Trading Card Game Albert H.T. Lam, Kevin C. H. Chow, Edward H. H. Yau and Michael R. Lyu Department of Computer.
Yard Wars David Greer Alex Gross Ahsen Uppal. Goals Wireless, Portable Development Real Time Voice Conferencing Exciting, Expandable Game Engine.
©Brooks/Cole, 2003 Chapter 7 Operating Systems Dr. Barnawi.
Copyright©2008 N.AlJaffan®KSU1 Introduction to Computers Chapter 1 Created By: N.AlJaffan Modified By:S.Abudawood.
Silberschatz, Galvin and Gagne ©2009Operating System Concepts – 8 th Edition Chapter 4: Threads.
Chapter 4: Threads READ 4.1 & 4.2 NOT RESPONSIBLE FOR 4.3 &
SM3121 Software Technology Mark Green School of Creative Media.
Week 1 Game Design & Development for Mobile Devices.
Klas Skogmar, Lund Institute of Technology Real-time Video Effects Using Programmable Graphics Cards Master of Science Thesis Klas Skogmar
14.1 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts with Java – 8 th Edition Chapter 4: Threads.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 4: Threads.
1 Lecture 4: Threads Operating System Fall Contents Overview: Processes & Threads Benefits of Threads Thread State and Operations User Thread.
Silberschatz, Galvin and Gagne ©2011Operating System Concepts Essentials – 8 th Edition Chapter 4: Threads.
Silberschatz, Galvin and Gagne ©2009Operating System Concepts – 8 th Edition Chapter 4: Threads.
Bluetooth POP3 Relay Project Benjamin Kennedy April 30 th, 2002.
Introduction to Computers Copyright©2008 N.AlJaffan®KSU 1 Chapter 1.
LWIP TCP/IP Stack 김백규.
Creating Flash Movies for Pocket PC Presentation by: JOSE BARRIGA.
Threads, Thread management & Resource Management.
1 Chapter 1.  What Is A Computer ? Computer is an electronic device, operating under the control of instructions stored in its own memory, that can accept.
Source: Operating System Concepts by Silberschatz, Galvin and Gagne.
MIS 105 LECTURE 1 INTRODUCTION TO COMPUTER HARDWARE CHAPTER REFERENCE- CHP. 1.
Chapter 2 Processes and Threads Introduction 2.2 Processes A Process is the execution of a Program More specifically… – A process is a program.
X-WindowsP.K.K.Thambi The X Window System Module 5.
Lecture 5: Threads process as a unit of scheduling and a unit of resource allocation processes vs. threads what to program with threads why use threads.
Distributed System Services Fall 2008 Siva Josyula
Multithreaded Programing. Outline Overview of threads Threads Multithreaded Models  Many-to-One  One-to-One  Many-to-Many Thread Libraries  Pthread.
Super Pong Andrew S. Dunsmore CSC436 August 2004.
Department of Computer Science and Software Engineering
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 4: Threads.
Lecture 3 Threads Erick Pranata © Sekolah Tinggi Teknik Surabaya 1.
Application Software System Software.
Threads, Thread management & Resource Management.
1 Lecture 1: Computer System Structures We go over the aspects of computer architecture relevant to OS design  overview  input and output (I/O) organization.
Threads. Readings r Silberschatz et al : Chapter 4.
3/12/2013Computer Engg, IIT(BHU)1 OpenMP-1. OpenMP is a portable, multiprocessing API for shared memory computers OpenMP is not a “language” Instead,
Kernel Expanded version of Kodak’s AMX kernel Features –Uses Preemptive Priority Scheduling –Multithreading –Multitasking.
Operating System Concepts
The Open Bluetooth Networking Game Development Platform Final Year Project Demonstration Carol & Marcus.
Embedded Real-Time Systems Processing interrupts Lecturer Department University.
CSCI/CMPE 4334 Operating Systems Review: Exam 1 1.
Silberschatz, Galvin and Gagne ©2009Operating System Concepts – 8 th Edition Chapter 4: Threads.
Advanced Operating Systems CS6025 Spring 2016 Processes and Threads (Chapter 2)
Threads Overview Benefits, User and Kernel Threads.
Introduction to threads
OPERATING SYSTEM CONCEPT AND PRACTISE
Chapter 4: Threads.
LWIP TCP/IP Stack 김백규.
Chapter 5: Threads Overview Multithreading Models Threading Issues
Computer Engg, IIT(BHU)
Chapter 4: Threads.
Chapter 4: Threads.
Chapter 4: Threads.
Operating System Concepts
Threads and Data Sharing
WAITer: Waiting Assistant Information Technology
Modified by H. Schulzrinne 02/15/10 Chapter 4: Threads.
Multithreaded Programming
Chapter 4: Threads.
Presentation transcript:

An Innovative wireless PDA Game Leung Pui Yin, Carol Lo Man Kit, Marcus

Outline  Introduction  Technologies in our project  Pocket PC programming techniques  Snapshot of our project  Future work  Conclusion  Q&A

Introduction  Current Pocket PC game  Two players only  Wired connection  In our project, we will implement a complete wireless multiplayer Pocket PC game on Bluetooth

Technologies in our project  Bluetooth  Game API

Technologies in our project  Bluetooth  Two Bluetooth equipped devices can establish a connection together within 10 meters range of each other.  It utilizes a radio-based link, so does not require a line-of-sight connection in order to communicate.

Technologies in our project  Game API  Handling graphics much more efficiently  Useful to write blazing-fast games

Difference between GDI and GAPI User Code Display Hardware Display Driver Video Memory Windows GDI Device Context Display Hardware Display Driver Video Memory Windows CE GAPI Device ContextUser Code

Advantages of GAPI  By bypassing Window CE GDI entirely, Game API allow programmers to directly access to Pocket PC video memory.  It is useful in writing high-performance, real-time games.  It is useful for video playback and other graphics applications.

Limitations of GAPI  No support for “BitBlt” or “TransparentImage”  Need to write a custom BitBlt routine by the programmer

Pocket PC programming techniques  Pocket PC limitations  Computational Power  Memory  Screen Size  Due to these limitations, there are some problems that are not encountered in desktop PC programming.

Pocket PC Memory Management  Shutting down applications without notifying user when memory is low  Happens when an application needs more memory, e.g. instantiate more objects

Pocket PC Memory Management ThresholdValueDescription Hibernation200 KBWM_HIBERNATE message sent to longest inactive application Low- memory 128 KBWM_CLOSE message sent to longest inactive application Critical- memory 24 KBNo new applications can be opened.

Pocket PC Memory Management  Implement a handler for the WM_HIBERNATE message  Attempt to release as many resources as possible  Avoid being closed unnoticeably

Game API  Conventionally, the origin of a window is at the upper-left corner.  Also, the pixel bits in a bitmap are organized in horizontal rows.  However, the video memory retrieved from GAPI may NOT be organized as stated above, depending on the model.

Game API  CASIO Pocket PC series  Normal  HP iPAQ series  Origin at lower-left corner  Organized in vertical column

Game API  Solution 1 - use GXDisplayProperties  *(VidMem + x * GXDisplayProperties.cbxPitch + y * GXDisplayProperties.cbyPitch)  Accessing a pixel needs TWO multiplications, which are quite slow in Pocket PC, especially when bitblting.

Game API  Solution 2 - use specific code for different model  Much faster, comparing  *(vidmem + x * cbxPitch + y * cbyPitch)  *(vidmem++) in a for loop  Troublesome to develop  Many publicly available packages use this method

Thread  Sprites movement and graphics update are performed one by one in game loop.  Problems  The job of sprites movement may be lengthy.  The job of sprites movement would be done in a controlled way.  Frame rate may drop.

Thread  According to 1/10-second rule mentioned by Charles Petzold, the job of sprites movement should be handled separately by another thread.  In our project, the job of each sprite movement and graphics update are handled by separate threads.

Thread Pool  Thread creation and thread termination are very time consuming.  Both thread creation and termination occur frequently in a multi-player game using multi-threading.  We need to speed up these processes.

Thread Pool - Basic Idea  Create enough threads at initial phase to avoid dynamic allocation of threads in the middle of the game.  Not to terminate unused threads – reuse them when appropriate.

Object Pool  Similar to thread pool, the aim of object pool is to reduce the overhead of object creation and termination.  The major difference is that object pool has to manage different kinds of objects.

Snapshot of our project

Future work  Wireless Multi-player game  Synchronization problem on Bluetooth and Pocket PC

Conclusion  Developing games on Pocket PC has its commercial values.  It is a challenging task, involving many latest technologies.  It needs some attentions not commonly noticed in desktop PC programming.

Q & A