Monday, February 4, 2008

FAQ Running Java Server 1.4 and 1.4m

Here's an example email that I have been getting, so I just wanted to share a higher level recap of how you can run the client/server code.

On Sun, 3 Feb 2008 16:15:54 -0430, xxx xxxxxx wrote
> Hello,
>
> I have downloaded your client/server game at fireleg.com
> I know how to import the Flex project and run it. But I have no idea how to even start with the Java project. I am a newbie at Java. I have downloade NetBeans and I plan to start doing some serious work on it, specially because I need to create games like the want you have made freely available (superb thanks by the way).
>
> So how do I setup the Java project? Also if you can spare the time, what are all of those folders inside the server package? like
>
  • /build
  • /dist
  • /nbproject
  • /src
  • /test
  • /ultraedit32
and the build.xml and manifest.mf?
>
> Please can you explain all of these to me? How to setup the project in Java? and what are those listed items folders for?
>
> Thanks and appreciated.

Jorge,

Thanks for the compliments - that always fuels my release schedule!

I just finished writing a blog on installing the Java portion (the JAGS1.4m server), as several people have been asking.
See http://flexjavagames.blogspot.com/2008/02/jags-14m-source-available.html

Also, I've got the 1.4m server running on fireleg.com:82 (that's port 82 instead of port 81).

So, you can either
1) point to my running server for your tests.
2) double click the jar file mentioned in the blog (for a local test environment)
3) compile and install the server on your own local or public machine
4) point your actionscript to fireleg, and email me some java backend code.

I offer option #1 as the most convenient way for people to make their games live to the world, no charge.
Option #2 is the best for a quick test, especially for games that do almost everything on client-to-client.
Option #3 is great if you are going to do anything server-side.

Option #4 is already a reality, which is to compile a java class that implements IGame and I'll put it up on the fireleg server for you. This option will soon be available without my help, when I open up the right FTP server for everyone.

As far as your question about those wacky looking files, those are generated and maintained by Netbeans and will get written over each time you compile.

/src is what to look inside of to understand JAGS.
/build is where you'll see the complied classes - pretty much can ignore unless you need to copy them.
/dist is where you'll find the runnable jar file (you can double click it and start a local JAGS server)
Note: if you have taken the time to get the server compiling, you'll find starting/stopping from
Netbeans much better, as you will see the log output, can set breakpoints, etc.

Also, that code you have is JAGS 1.4, which is correct if you are going over the pong 1.4 demo.
I'll be getting some 1.4m actionscript client examples out soon as well - that java server is written a little cleaner, but still has many common features with JAGS 1.4.

-Travis

No comments: