3 STATIC VIEW
One goal of this architecture is to give the possibility
to extend functionality of existing components and
extend its capabilities after the creation of new ones,
this is why modules are designed with specific
functionalities and black boxes to make this happen.
Each module will have a class called Manager to
process the information and transmit it to the
processing module which will also feature a central
manager, so this way the processor will play a rol
enabling communication between modules .
For the creation of new components within the
architecture of each module will be
called Driver classes that extend from the entities
manager, and will keep the intention of
implementing specific functions associated with
each module.
The drivers should have implemented the extended
methods to work properly, because the drivers are
loaded by the processor and used to make calls to
abstract methods of the manager.
3.1 Bluetooth Driver
After extending CommunicationManager, it
implements the functionality of the bluetooth
technology through a class called
BluetoothDriver.
This implementation addresses all
the methods offered by the abstract class
CommunicationManager.
BluetoothDriver functions are based on client-server
architecture.
Bluetooth protocols implemented for
data transfer are RFCOMM and L2CAP (Brieva
2004). To have better control over the game session,
was created interface GetClientListener, the class
that implements this interface will be who controls
events arrivals of new players to games, and will
achieve a higher order process when new players to
the meeting.
4 DINAMIC VIEW
4.1 Coordination in the Searching for
Devices and Services
The implementation of the Bluetooth standard works
on the concept of mutual exclusion when seeking
services or devices, providing blocking methods,
this in order to provide better control over the work
of searching and have the operation bounded,
resulting in a margin of control, a result at the end of
the blocking method and a clear model to program in
a clear way and standard.
To achieve this in BluetoothDriver methods:
searchDevices() and searchServices(), their
implementation uses a synchronized segment
together with an object called a lock (of
type Object), which at the time of entering into the
search is set to blocked state, and thus do not block
the main program. When the search finishes
releasing the object (notify) allowing to follow the
normal course and return to the main program to
search results.
This represents a process similar to
Facade (Gamma et al. 1995) of the operation on Java
native Bluetooth, wrapping to provide more
reliability at the time of use.
5 USED TECHNOLOGIES
5.1 J2ME
The proposed architecture design using the Java 2
Micro Edition (Li et al. 2005), language for the
development of the mentioned modules.
This
technology comes with certain limitations because
the devices have limitations in its capabilities of
processing and persistence. J2ME virtual machine
also called KVM (Kilobyte Virtual Machine),
works
with a limited 32-bit . There are also two important
points to consider at the moment of developing in
J2ME: the profiles and configutations (Sun 2005).
6 CONCLUSIONS
This article has presented an architectural model for
games focused on ubiquitous mobile devices.
Been
mentioned the main problems associated with the
development of videogames for the wide range of
mobile devices on the market.
It also raised the most suitable communication
technology for this scenario, where Bluetooth has
been chosen to establish connectivity between the
devices during play sessions, for reasons of cost and
portability in devices.
After developed both implementations of
communication protocols: L2CAP and RFCOMM, it
is possible to make comparisons related with
performance, where clearly the speed of
DEVELOPING AN ARCHITECTURE OF GAMES FOR A BLUETOOTH-BASED UBIQUITOUS ENVIRONMENT
193