Upload
others
View
5
Download
0
Embed Size (px)
Citation preview
Distributed Gaming using J2ME
By Rekha Vaddepalli
Agenda
IntroductionRequirementsTechnologies UsedDesign and ImplementationExperiments and ResultsConclusion
Introduction
Mobile devices usage is increasingrapidlyIn tandem, mobile games developmentis increasingDevelopment platforms
J2ME, C++ etc
RequirementsPurpose
To develop a distributed, multi-player gamewith a central server to simulate certaineconomic scenarios.Sample scenarios tested
Making a certain product tougher to produce and alsomaking it costlier than the other productsChoosing to produce a certain product benefits theplayerSimulation of real world issues
It can also be viewed as a regular strategygame by the people more interested instrategy games
Requirements (contd..)Scope
To implement Acquire game for J2ME-enabledPDAs using J2ME, Servlets, JDBC and MySQL
Acquire game borrows ideas from oldcomputer game “Mule”Game world consists of number of plot areascomprising of nine sub plots
Each plot has 3 propertiesMine ValueFarm ValueEnergy Value
Requirements (contd..)
Game consists of 4 stagesSelection of plot areasConfiguration of plot areasProductionAuction
RulesIf the player satisfies critical resources limits of all typeof products, can go for another round of selectionThe player must finish the auction that he started in theprevious round to start the auction in the next round
J2ME (Java 2 Micro Edition)
Two key componentsConfiguration
JVM for each kind of deviceDefines the Java Runtime Environment and coreclasses that operate on each deviceEx: CLDC & CDC
ProfileConsists of Java classes that enable implementationof features for a particular device or group of devicesEx: MIDP, Foundation Profile etc.
J2ME Concepts (contd..)
User Interface ClassesUsed Form class for all the screensUsed CustomItem class for game worldrepresentation
Persistent StorageUsed for storing intermediate values inConfiguration stage
Generic Connection FrameworkUsed for communicating with the server
MIDP Applications (MIDlets)Introduction of Verification step afterCompilation
Divided into two stepsPre-verification is done off the deviceSimple second verification step on the device
DeploymentUsing MIDlet suites
JAR fileManifest File (included in JAR)Application Descriptor (outside JAR)
Other technologies used
Java ServletsJava Database Connectivity (JDBC)MySQL Database
Operating Environment
Application OperatingEnvironment
Game Client J2ME Wireless Toolkit,Windows CE/ME
Game Server Java 1.4.1 or higherinstalled on Windows
Database Oracle 9i / MySQL
Design and ImplementationSystem Architecture
Server
J2ME devices
Server
Database
HTTP
JDBC
Server Design
Register & LoginCreate New Game WorldUpdate
On SelectionOn ConfigurationOn Role DeclarationOn TradeOn Transfer Of UnitsOn Log off
Get Score
Selection
Configuration& Production
Declare Roles
Rule 1
Rule 1: Produce >= critical limit (for each type of the product)Rule 2: Finished auction started in the previous round
Auction
Trade
Rule 2
Game Design
Logging in
Selection Phase
Configuration/Production
Auction Stage
Local Auctions
Game 1, 2 & 3 canbe seen as 3different localauctionsA is involved in bothGame 1 & 2So, A can transferunits between thetwo local auctions
Game OneGame Two
Game Three
A BA
C
D E
F
ExperimentsRealization of local auctions
Game One
0
2000
4000
6000
8000
10000
12000
14000
1 2 3 4 5 6 7 8 9 10
Before & After Transfer Of Units
Pro
du
cti
on
Va
lue
s &
Sc
ore
A
B
M F E R S M F E R S
Game Two
0
2000
4000
6000
8000
10000
12000
1 2 3 4 5 6 7 8 9 10
Before & After Transfer of units
Pro
du
cti
on
Va
lue
s a
nd
Sc
ore
A
C
M F E R S M F E R S
Configuration file on theServer
Helps to create different scenariosThis file contains
Several initial parametersInitial mine units, food units etc.Time slots for Selection, Configuration etc.
Expenditure FormulaeProduction FormulaeScore formula
Test Case OneDescription
Making one product tougher to producecompared to other products and that particularproduct is sold at a higher priceFor this test case, I chose mines to be thetougher to produce product.Machinery Expenditure formula is modified sothat less mines are produced.
Production = (Type_Of_Product * Appropriate_Property_Value)
MachineryExpenditure = 10 * (Sum of Property Values)
Test Case One: With 2 playersResults
Test Case One: 2 Players
0
500
1000
1500
2000
2500
3000
3500
0 1 2 3 4
Average Mine Value
Sc
ore
Round 1
Round 2
Round 3
A
B
A
B
A
B
Test Case One: With 4 playersResults
Test Case One: 4 Players
AC
D
B
AD
C
B
-100
0
100
200
300
400
500
600
0 200 400 600 800 1000 1200
Rokda Units
Min
e U
nit
s
Round1
Round3
Size ofbubble :Score
Test Case TwoDescription
Just deciding to produce a particularproduct will increase the scoreFor this test case, I chose that if the playerchooses to mine, he would have a betterscore
Score = (Mine_Count * 10) + (Farm_Count *2) + (Energy_Count * 2)
Test Case Two:With 2 playersResults
Mining Count Chart
012345678910
1 2
Rounds
Min
e C
ou
nt
A
B
Scores
0
20
40
60
80
100
120
140
1 2
Rounds
Score A
B
Test Case Two:With 4 PlayersResults
Test Case Two: 4 players
0
50
100
150
200
250
300
0 2 4 6 8 10
Mining Count
Sc
ore
Round1
Round2
Round3
Round4AB&C
D
B
B
B
Test Case Three
DescriptionThe worker and land expenses are higher forproducing mines than for farming or energyproduction.
WorkerExpensesForMining=(10*(Sum Of Property Values))LandExpensesForMining=(10*(Sum Of Property Values))
WorkerExpensesForFarming=(2*(Sum Of Property Values))LandExpensesForFarming=(2*(Sum Of Property Values))
WorkerExpensesForEnergy=(3*(Sum Of Property Values))LandExpensesForEnergy=(3*(Sum Of Property Values))
Test Case Three: With 2 PlayersResults
Score Comparisons in the two rounds
0
5000
10000
15000
20000
25000
30000
35000
1 2
Round 1 & 2S
co
re A
B
Comparison Chart
0200400600800100012001400160018002000
1 2 3 4 5 6 7 8
Rounds 1 & 2
Pro
du
cti
on
/ U
nit
s
A
B
M F E R M F E R
Test Case Three: 4 PlayersResults
Comparison Chart
0
500
1000
1500
2000
2500
3000
1 2 3 4 5 6 7 8
Round 1 & 2
Pro
du
cti
on
/Un
its
A
B
C
D
M F E R M F E R
Comparison of Score values
0
5000
10000
15000
20000
25000
1 2
RoundsS
co
re
A
B
C
D
ConclusionPossible applications of this project
Economic simulationsStrategy game
Similar ApplicationsThe Economics classes are generally passive andapplications like these will help in the betterunderstanding of the Economics concepts
http://www.people.virginia.edu/~cah2k/programs.htmlhttp://www.irean.vt.edu/research_workshop_april2003/03_Goad.pdf (Wireless Interactive Training Solutions)
They claim that they had good success using PDAsin the classrooms for their experiments
Future EnhancementsBetter security features.More types of products can beintroduced to make it more realistic.Implementation of more types ofauctions that are possible in the realworld.
Questions?