Hi !
Featured games (91)
games approved by the League of Dukes
Games in Showcase (762)
Games in Android Showcase (229)
games submitted by our members
Games in WIP (847)
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 5015 times)
0 Members and 1 Guest are viewing this topic.
Offline wmchan78

Junior Newbie

« Posted 2005-06-27 19: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: 8
Projects: 3

Java tames rock!

« Reply #1 - Posted 2005-06-27 20: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 20: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!
Legends of Yore - The Casual Retro Roguelike
Offline shmoove

Junior Devvie


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

anyone else can provide me some clue,..?
Not exactly a clue, but some links:

Offline aNt

Senior Devvie


« Reply #4 - Posted 2005-07-22 11: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);
   output = conn.openOutputStream();
   ps = new PrintStream(output);

hope that helps?

Offline ghostsboy

Innocent Bystander

« Reply #5 - Posted 2005-07-31 00: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  

EgonOlsen (364 views)
2018-06-10 19:43:48

EgonOlsen (364 views)
2018-06-10 19:43:44

EgonOlsen (304 views)
2018-06-10 19:43:20

DesertCoockie (540 views)
2018-05-13 18:23:11

nelsongames (868 views)
2018-04-24 18:15:36

nelsongames (851 views)
2018-04-24 18:14:32

ivj94 (1303 views)
2018-03-24 14:47:39

ivj94 (424 views)
2018-03-24 14:46:31

ivj94 (1087 views)
2018-03-24 14:43:53

Solater (442 views)
2018-03-17 05:04:08
Java Gaming Resources
by philfrei
2017-12-05 19:38:37

Java Gaming Resources
by philfrei
2017-12-05 19:37:39

Java Gaming Resources
by philfrei
2017-12-05 19:36:10

Java Gaming Resources
by philfrei
2017-12-05 19:33:10

List of Learning Resources
by elect
2017-03-13 14:05:44

List of Learning Resources
by elect
2017-03-13 14:04:45

SF/X Libraries
by philfrei
2017-03-02 08:45:19

SF/X Libraries
by philfrei
2017-03-02 08:44:05 is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑
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!