Game Development Reference
In-Depth Information
UserName
varchar(50)
Yes
Player
Score
int
Yes
NULL
GameId
tinyint
Yes
NULL
SubmitDate
datetime
Yes
NULL
Table 4.1 Leaderboard User Table
Back to the java code, you can define a browserIntent in the main activity RaccoonRob to
open the leaderboard whenever the user submits his/her highest score.
case 5:
//leader board
try {
int m = 0;
if (gv != null ) {
m = gv.score;
gv.stopGame();
gv = null ;
}
//opens a browserIntent to handle user submissions on the board
Intent browserIntent = new Intent(Intent. ACTION_VIEW ,
Uri. parse ( "http://www.micbots.com/boardmanager/
leaderboard.aspx?a=" +userId+ "&b=" + m + "&c=1" ));
startActivity(browserIntent);
new Thread(){
public void run(){
Looper.prepare();
wv = new WelcomeView(RaccoonRob. this );
myHandler.sendEmptyMessage(3);
}
}.start();
}
catch (Exception e ){}
break ;
Search WWH ::




Custom Search