Advertisement

DirectPlay and Java2D

Started by February 28, 2005 09:47 AM
6 comments, last by gazsux 19 years, 11 months ago
Hey, I've started looking into network programming a bit. I've played around with Sockets in Java before and now i'm looking at DirectPlay. I was told that you can use DirectPlay with any type of graphics API but it is not immediately obvious to me how I can. I have a server and client written in c++ using DirectPlay but after looking on Google for info of using DirectPlay with Java2D I got little useful info. Anyone have any links to info or know how I can do it? Thanks! [Edited by - gazsux on February 28, 2005 11:04:06 AM]
Quote:
I was told that you can use DirectPlay with any type of graphics API but it is not immediately obvious to me how I can


Java is not a graphics api - it is a different programming language. A graphics api of Java is the Java3D library. Take a look into that for it uses DirectX with Java. I could not find anything specific of using DirectPlay with Java simply because Java has its own networking features. Here's another link comparing DirectX to OpenGL in Java3D as well, I don't know if it is of any use to you.

A quote I found on the issue of using DirectX with Java is this:
Quote:
It would be possible to write bindings for all the DirectX functions if
you really wanted the whole DirectX API at your disposal. I'm not aware
of any existing product that does this. You certainly won't get it from
Sun.

The real question for Fiorella is what DirectX functionality do you
need? i.e. if its Direct3D you want, you might check out Java3D;
DirectSound, check out Java Sound, etc.


There are alternatives that you should use if you are using Java. It has basically everything that DirectX has - but in a platform independent manner.Good luck!

- Drew
Advertisement
Quote:

Java is not a graphics api - it is a different programming language.


Yeh, apologies, I was referring to Java2D. I didn't get a chance to read my post before sending it as I was in a rush to go to a meeting. I've updated my original post to reflect this.

I'll take a look at the links you gave me. Essentially though, I loathe Direct3D and so wanted to use something else. The game i'm working on is a top down shooter, already implemented in Java2D. Sockets were ok but I was just wanting to try out DirectPlay and was told it was easily integrated with any API. I just can't find info on how to do it.

Cheers!

[Edited by - gazsux on February 28, 2005 11:49:36 AM]
Quote:
Original post by gazsux
Yeh, apologies, I was referring to Java2D. I didn't get a chance to read my post before sending it as I was in a rush to go to a meeting. I've updated my original post to reflect this.


Oh, no appologies needed! Sometimes people pass misinformation to others, so I just assumed they told you wrong [smile]. I think that there are better alternatives for networking you could persue with Java than direct play. I mena java is a platform independent library, you would then have to add in that Win32 dependecy at the extra cost. I do not know how easy it is to use DP, but I have always heard there are better alternatives.
http://java.sun.com/docs/books/tutorial/networking/index.html

Here's some good docs on Java networking I found. I tried out the example KnockKnock program. Haven't had time to edit it yet though. HTH.
http://www.rivetcode.com
Yeh those tutorials are good, i've already implemented a client/server system using java based sockets though. I've continued to look but still can't find any material on DirectPlay with any Java based API. I think i'll have to ask my lecturer about it.

Thanks!
Advertisement
Quote:
Original post by gazsux
I've continued to look but still can't find any material on DirectPlay with any Java based API.


DirectPlay documentation has always been sparse. When I looked into it a few years back, I just decided it would be easier to write my own networking system than sort through that mess.
Disclaimer: "I am in no way qualified to present advice on any topic concerning anything and can not be held responsible for any damages that my advice may incurr (due to neither my negligence nor yours)"
Yeh I know what you mean. Aside from MSDN stuff, which is frankly crap, there is little other material on it. If I get some time in the summer I may write a tutorial on the stuff i've picked up. I have read the GameDev article but a demo would have been nice to accompany it.

This topic is closed to new replies.

Advertisement