Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (499)
Games in Android Showcase (118)
games submitted by our members
Games in WIP (568)
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  
  Networking with ME  (Read 3297 times)
0 Members and 1 Guest are viewing this topic.
Offline Herkules

Senior Member




Friendly fire isn't friendly!


« Posted 2002-10-31 08:07:38 »

Hi Microguys!

I ask this as a total mobile device newbie (I don't even own a mobile phone).

Do/will mobile devices have a possibility to create socket-like connections to a server? Or between devices?
What are the pre-requisits?
Is there a thing like NIO?

Will it be possible to do online MP action games on mobile devices??

I'd appreciate a short introduction.

Thanks,

- J

HARDCODE    --     DRTS/FlyingGuns/JPilot/JXInput  --    skype me: joerg.plewe
Offline rreyelts

Junior Member




There is nothing Nu under the sun


« Reply #1 - Posted 2002-10-31 13:14:14 »

IIRC, the profiles gurantee that you can make http connections, but not all devices/networks support socket level connections. Unless you're looking for very low latency, high interactivity, http connections should be enough to do the job.

God bless,
-Toby Reyelts



About me: http://jroller.com/page/rreyelts
Jace - Easier JNI: http://jace.reyelts.com/jace
Retroweaver - Compile on JDK1.5, and deploy on 1.4: http://retroweaver.sf.net.
Offline Herkules

Senior Member




Friendly fire isn't friendly!


« Reply #2 - Posted 2002-10-31 14:48:57 »

Not all do - but are there some that do??

The background of the question is: I'm creating a network gaming framework that (maybe maybe maybe) will be expanded to mobile devices.

Not I try to make up my mind wether my efforts will be lost if I rely on NIO Channels.

HARDCODE    --     DRTS/FlyingGuns/JPilot/JXInput  --    skype me: joerg.plewe
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline rreyelts

Junior Member




There is nothing Nu under the sun


« Reply #3 - Posted 2002-10-31 15:13:22 »

AFAIK, you won't see java.nio anywhere in the near future for mobile devices.

God bless,
-Toby Reyelts


About me: http://jroller.com/page/rreyelts
Jace - Easier JNI: http://jace.reyelts.com/jace
Retroweaver - Compile on JDK1.5, and deploy on 1.4: http://retroweaver.sf.net.
Offline gregorypierce

Senior Member




I come upon thee like the blue screen of death....


« Reply #4 - Posted 2002-10-31 15:17:55 »

If you rely on NIO channels you won't have any issues on the server side, but you won't be able to have anything resembline NIO on the client side. If you engineer your system such that you can receive moves and such from a web browser then you'lll be guaranteed to work on a J2ME device - otherwise you're pretty much hosed as MIDP on requires HTTP level functionality. Some devices may support TCP, some may support UDP and some will support all of the protocols, but HTTP is the only guarantee you have.

http://www.gregorypierce.com

She builds, she builds oh man
When she links, she links I go crazy
Cause she looks like good code but she's really a hack
I think I'll run upstairs and grab a snack!
Offline nabetse

Senior Newbie




I love YaBB 1G - SP1!


« Reply #5 - Posted 2002-11-03 09:39:06 »

Hi

  J2ME have posibilities on network gaming. You can visit this URL where shows the source code of a example client-server application.

http://www.gamasutra.com/resource_guide/20010917/fox_03.htm  

  The biggest problem is that J2ME don't support TCP connections, but we are a good workers and something good can be made.

  We need to take advantadge of the multiplayer posibility of java mobile games. There is a great fun there.
Offline mporta

Junior Newbie





« Reply #6 - Posted 2002-11-12 07:59:50 »

is it possible to create server side sockets?
i want to be able to listen for connections from other  j2me devices.
Offline rreyelts

Junior Member




There is nothing Nu under the sun


« Reply #7 - Posted 2002-11-12 17:51:04 »

IIRC, it is not possible to create a ServerSocket. You'll need to go the "peer-assisted" route (i.e. client-server).

God bless,
-Toby Reyelts


About me: http://jroller.com/page/rreyelts
Jace - Easier JNI: http://jace.reyelts.com/jace
Retroweaver - Compile on JDK1.5, and deploy on 1.4: http://retroweaver.sf.net.
Offline mporta

Junior Newbie





« Reply #8 - Posted 2002-11-14 12:13:01 »

in the api docs i've found:
StreamConnection acceptAndOpen()
         Returns a StreamConnection that represents a server side socket connection.
is it of any use?
thanks..
Offline gregorypierce

Senior Member




I come upon thee like the blue screen of death....


« Reply #9 - Posted 2002-11-14 22:42:56 »

It is only of use if your device supports sockets. For whatever reason, Sun decided not to make socket or datagram functionality a requirement for MIDP.

http://www.gregorypierce.com

She builds, she builds oh man
When she links, she links I go crazy
Cause she looks like good code but she's really a hack
I think I'll run upstairs and grab a snack!
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline mporta

Junior Newbie





« Reply #10 - Posted 2002-11-15 07:07:15 »

thanks for your reply.
now i'm wondering why sun has put that method into the api, if it's not available on all devices. at least they could add a note saying that!
thanks sun...

Offline artkim

Senior Newbie





« Reply #11 - Posted 2002-11-27 12:52:03 »

The javadocs do mention that HTTP is the only mandatory implementation.

But it is a pain to have fragmented support..

and having to poll for data all the time from the client is a bitch, but works nicely.

But in general getting a "non-emulator" build to work consistently is a pain, there are so many bugs in the HTTP clients of the devices...

but when it works it is really cool Smiley
Offline davidaprice

Junior Member





« Reply #12 - Posted 2002-12-02 04:53:05 »

For MIDP 1.0, HTTP client networking is the only mandatory protocol. But MIDP is based on CLDC, and CLDC has a framework that could support datagrams, sockets etc. The CLDC spec also has some examples illustrating what that would look like, and some manufacturers' MIDP implementations include TCP sockets and even server sockets. But e.g. Nokia's phones don't yet support anything but HTTP client networking.

A big constraint is that many phones do their HTTP networking using the WAP protocol stack rather than the TCP/IP protocol stack; the WAP stack doesn't include TCP or UDP, so the phones simply can't implement those protocols.

MIDP 2.0 includes official but still optional support for SocketConnection, ServerSocketConnection and UDPDatagramConnection. MIDP phones won't be out until perhaps the middle of next year, and even then most phones out there will still be MIDP 1.0 phones.
Offline shareme

Junior Member




Java games rock!


« Reply #13 - Posted 2003-04-22 12:55:05 »

Quote
Hi Microguys!

I ask this as a total mobile device newbie (I don't even own a mobile phone).

Do/will mobile devices have a possibility to create socket-like connections to a server? Or between devices?
What are the pre-requisits?
Is there a thing like NIO?

Will it be possible to do online MP action games on mobile devices??

I'd appreciate a short introduction.

Thanks,

- J



NIIO is only avaible on JSE 1.4.x

it sis not available on J2ME

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.

Pippogeek (40 views)
2014-09-24 16:13:29

Pippogeek (31 views)
2014-09-24 16:12:22

Pippogeek (21 views)
2014-09-24 16:12:06

Grunnt (47 views)
2014-09-23 14:38:19

radar3301 (29 views)
2014-09-21 23:33:17

BurntPizza (65 views)
2014-09-21 02:42:18

BurntPizza (37 views)
2014-09-21 01:30:30

moogie (43 views)
2014-09-21 00:26:15

UprightPath (53 views)
2014-09-20 20:14:06

BurntPizza (55 views)
2014-09-19 03:14:18
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!