Listening to the connection and Update the game by threads

Forum for discussion about developing multiplayer games for mobile platform including Httpconnection and bluetooth connections.

Listening to the connection and Update the game by threads

Postby jestan » Tue Nov 06, 2007 6:10 am

Hi,
I have been developing a small multiplayer game framework since last two months. In client side , i have to read from a StreamConnection and extract the info to update the game. In J2SE, we can extends EventListeners, Events and we can use Java's inbuilt capability to generate customised event and catch them by our implemented classes. Is it possible with J2ME's Command and CommandListener interface. When i try to do this i fail to extends the Command class. If i create a new Command object, how can i trigger it to be handled by it's Listener in J2ME. Or is there any smart idea to process messages from the server and call other methods in MIDlet from the threads.
Thanks.

Jestan.
jestan
 
Posts: 22
Joined: Thu Jun 14, 2007 11:26 am

Re: Listening to the connection and Update the game by threads

Postby DevelopmentTeam » Tue Nov 06, 2007 8:03 am

From what I understand from your post: You are writing a multiplayer game frame network and trying to update framework automatically when updates are provided in the server.

If this is the case: You need to write your won listener class, meaning, need to write a class with runnable implementation or a thread and read the httpconnection every 10 secs(assumption) and check the version provided on the server. However incase if you need to update the classes you will need to initiate a reinstallation of the application.
User avatar
DevelopmentTeam
Site Admin
 
Posts: 661
Joined: Tue Aug 15, 2006 8:39 am
Location: India


Return to Multiplayer Mobile Games

Who is online

Users browsing this forum: No registered users and 1 guest