Page 1 of 1

BZFlag Android Port

Posted: Mon May 23, 2011 2:00 pm
by Cauchy
Hi everyone!

I started to port BzFlag to android.
Well, don't think I 've already finished. First of all, there is no graphichs at all, yet.

Project home:
SVN checkout: svn co https://bzflag4android.svn.sourceforge. ... ag4android bzflag4android
I'm using Eclipse.

I think the first milestone is to make java class(es) that can communicate with the server, and you can play the game
with it( without graphics).
Second milestone is to create an android project, and include the first milestone's classes.
So when you download the files, you will see there is no actual android project, that's because I'm still behind the first milestone, and there is no need to try out in an android emulator or device...

Please try it out, with a local server (I dont recommend that the server and client are on the same computer, iI couldn't see in wireshark whos who..)

I have some question to the developers.
Im using wireshark and Im reading the source code to understand bzflag, but there are things ...:

1. After I received the variables from the server, It sends me a few TCP packets, MsgNull packets, huge size,
not the usual structure (length:MsgCode:Data). I saw that it contains PlayerInfo, TeamUpdate, Flagupdate...something with permissions..??
And sometimes the welcome messages included into these null packets.

2. Shoting
When i shoot i send a shotbegin msg to the server?
And if sy hits me i send a shot end?

Akos (aka zuii)
How the "shoting" works?

Re: BZFlag Mobile

Posted: Mon May 23, 2011 4:53 pm
by JeffM
1) sounds like you have your byte order messed up, or have an offset wrong. The server sends team, flag, and player updates after the bzdb is sent ( see addPlayer in the server). This should be apparent if you use a debugger and step into the code while the server runs.
2) When you get shot you send the killed message and the endshot message if the shot is stopped by your tank. See the code and calls to gotBlowedUp in the client.

You should also note that the connection protocol is changing with 2.4, the client must send out a connection header before it gets any data back.

Re: BZFlag Mobile

Posted: Mon May 23, 2011 11:07 pm
by Cauchy
Thank you!

I will read the source code again..and also I have to sit down and plan whats next..