Java-Gaming.org
Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars!
Featured games (78)
games approved by the League of Dukes
Games in Showcase (405)
games submitted by our members
Games in WIP (289)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  j2me bluetooth games need help  (Read 1753 times)
0 Members and 1 Guest are viewing this topic.
Offline wmchan78

Junior Newbie





« Posted 2005-06-27 21:32:45 »

hi all,

i m new to j2me. and my college project requirea project to develop a bluetooth multiplayer game using j2me.
it is difficult forme to get started, as there is not much references in internet.
all i found is all not for a beginner.

i study lots of j2me game codes, that gives me brief idea on how to develop a single player game.however, i need a multiplayer references. I know that some "mirror program" is needed. thats all i can get. i've been research for last 24 hours , but can;t get much. appreciate if anyone can help..Huh plz......

Offline Alan_W

JGO Knight


Medals: 7
Projects: 3


Java tames rock!


« Reply #1 - Posted 2005-06-27 22:14:13 »

If it were me, I'd start by writing a multiperson chat program.  You can then create a game that runs over the top of the chat communication protocol.  Turn based games are easiest because you don't have to worry about the two game states getting out of step, as would be the case with real time games.  If you choose a simple two player game, e.g. draughts (checkers), you could broadcast each move as the player makes it, so that it appears on both boards.

I would give more specific help with the bluetooth, only I also lack suitable experience  Undecided

Time flies like a bird. Fruit flies like a banana.
Offline wmchan78

Junior Newbie





« Reply #2 - Posted 2005-06-27 22:29:18 »

thanks allan for the suggetion...but the lecturer is asking for an action game.... Cry Cry
im currently starting to draw the pixel art and writing the codes for the menu list.
but there is no clue on how to start developing a network (bluetooth gane)....

anyone else can provide me some clue,..?
Games published by our own members! Check 'em out!
Try the Free Demo of Droid Assault
Offline shmoove

Junior Member




Doh!


« Reply #3 - Posted 2005-06-28 09:36:53 »

anyone else can provide me some clue,..?
Not exactly a clue, but some links:
http://www.benhui.net/modules.php?name=Bluetooth
http://www.nokia.com/search3/search.jsp?wsid=005

shmoove
Offline aNt

Senior Member




AFK


« Reply #4 - Posted 2005-07-22 13:54:15 »

you need to discover the other bluetooth devices (the slow bit)- when u have there addresses you
can connect to them- make one of the phones the host- then the others will join the host. its not that
tricky really. and yes theres not much info on this.. best thing u can do is download the SonyEricsson
SDK for java (even if u have a nokia) there is a set of demos that shows u how to make a bluetooth
2 player game...

if u want to connect your phone to a PC u will need a bluetooth stack on the PC. This can be hassle
because they cost money (if u want one that works). but when u have a java bt stack its pritty much
the same as u would connect to the phone.

so you need to (on the host phone):
  1. extend a DiscoveryListener.
  2. make a LocalDevice localDevice = LocalDevice.getLocalDevice();
  3. make your DiscoveryAgent agent = localDevice.getDiscoveryAgent();
  4. next step is to start to discover devices: agent.startInquiry(DiscoveryAgent.GIAC, this);
  5. if u have extended the DiscoveryListener all its methords will start to get called.
  6. store the devices into a Vector (or whatever u like).
  7. look up the services that are avalible on the device use the UUID of:
      UUID[] uuidSet = {new UUID(0x0003)};
  8. start a search: agent.searchServices(null, uuidSet, btDevice, this);
  9. when your client finds another phone with the service u want to comm over your ready Smiley

so the server (host):
  1. start a bluetooth server (bit like a serversocket but using bt).

pritty simple the server. but that should get u up and running... worked cool for me... oh and when u want
to connect and chat to the host just connect like this:

   String url = serviceRecord.getConnectionURL(ServiceRecord.NOAUTHENTICATE_NOENCRYPT, false);
   conn = (StreamConnection) Connector.open(url);
   output = conn.openOutputStream();
   ps = new PrintStream(output);

hope that helps?

Offline ghostsboy

JGO Visitor




« Reply #5 - Posted 2005-07-31 02:40:09 »

    er..i currently working on multiplayer game with bluetooth also..but it;s turn based...hehe...some how i can connect to each devices by bluetooth...but now stuck in extra game information n put it into packet..hehe...sorry cant help
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars!
 
Get high quality music tracks for your game!

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

The invasion has landed! On Mars! And you're there to beat 'em!
cubemaster21 (60 views)
2013-05-17 21:29:12

alaslipknot (69 views)
2013-05-16 21:24:48

gouessej (99 views)
2013-05-16 00:53:38

gouessej (96 views)
2013-05-16 00:17:58

theagentd (107 views)
2013-05-15 15:01:13

theagentd (98 views)
2013-05-15 15:00:54

StreetDoggy (144 views)
2013-05-14 15:56:26

kutucuk (166 views)
2013-05-12 17:10:36

kutucuk (165 views)
2013-05-12 15:36:09

UnluckyDevil (175 views)
2013-05-12 05:09:57
Complex number cookbook
by Roquen
2013-04-24 12:47:31

2D Dynamic Lighting
by Oskuro
2013-04-17 16:46:12

2D Dynamic Lighting
by Oskuro
2013-04-17 16:45:57

2D Dynamic Lighting
by Oskuro
2013-04-17 16:23:20

Noise (bandpassed white)
by Roquen
2013-04-05 17:36:01

Noise (bandpassed white)
by Roquen
2013-04-03 16:17:38

Java Data structures
by Roquen
2013-03-29 13:21:12

Topic Request
by kutucuk
2013-03-22 21:42:01
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!
Page created in 0.12 seconds with 21 queries.