Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (487)
Games in Android Showcase (110)
games submitted by our members
Games in WIP (553)
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 2183 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 Member




Doh!


« Reply #3 - Posted 2005-06-28 07: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 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) Connector.open(url);
   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  
 
 
You cannot reply to this message, because it is very, very old.

 

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

The first screenshot will be displayed as a thumbnail.

CopyableCougar4 (23 views)
2014-08-22 19:31:30

atombrot (34 views)
2014-08-19 09:29:53

Tekkerue (30 views)
2014-08-16 06:45:27

Tekkerue (28 views)
2014-08-16 06:22:17

Tekkerue (18 views)
2014-08-16 06:20:21

Tekkerue (27 views)
2014-08-16 06:12:11

Rayexar (65 views)
2014-08-11 02:49:23

BurntPizza (41 views)
2014-08-09 21:09:32

BurntPizza (32 views)
2014-08-08 02:01:56

Norakomi (42 views)
2014-08-06 19:49:38
List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
java-gaming.org 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‑gaming.org
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!