Advertisement Jump to content
  • Advertisement


Sign in to follow this  
  • entries
  • comments
  • views

Networking demo:

Sign in to follow this  



Okay, couldn't get some things implemented into this build that I wanted, but all the networking things are there.

If you run JavaTactics.bat it will launch JavaTactics on port 4444, make sure that your firewalls/routers can actually give you information through those ports.

Once JavaTactics is up you can connect to another JavaTactics by pressing 'N'. This brings up a dialog, simply enter the ip followed by the port "123.456.789.0 4444" and it will attempt to connect. If you have connected successfully it will network the two together.

Any map editing command that you do (hit 'H' for help) will be sent to other players that you are connected to. If you want to connect three JavaTactics to each other you have to do this:

Launch JT on all three machines, connect the first one to the second, the first to the third, and the second to the third. There is no player ip sharing yet... getting there.

If you want to chat to someone hit 'S' this will bring up the send command dialog. Select which connection you want to send it through and enter your command.

JTC: [chat message] ["[w]"]
JTC: This is a test message.[w]
The [w] is for line wrapping

JTU: [type] [args]
JTU: cth [x] [y] [dz]
JTU: cts [x] [y] [ds]
JTU: cts 0 0 1 //CHANGES TILE[0][0] SHADE BY ONE

JTM: [command] [arg]
JTM: loop [filename]
JTM: loop test.mid //LOOPS TEST.MID
JTM: play [filename]
JTM: play test.mid //PLAYS TEST.MID ONCE
JTM: stopLoop


Okay.... any problems post them here...


It probably won't work because I'm behind two routers and a cable modem but we'll see.... If someone here can get a connection working over the public internet it would be really cool if they posted their ip here for us to try it on...

Anyway let me know...


If you launch two JavaTacticss on one machine the first will be port 4444 and the second one will be 4445, so if you wanted to try it out on local host connect to 4445 FROM THE FIRST ONE (open the log 'L' and check to see which one is the first by which one created a server on 4444)

and this will connect the two together.
Sign in to follow this  


Recommended Comments

Excellent stuff, H_o_p_s. I tried connecting to the port you suggested, but it didn't work. I did, however, fire up three JT's on my localhost, and here's the result :

Obviously, it would be nice if the font (and the window(s)) was bigger, but besides that it worked flawlessly. It would be a little easier if you could not only choose the message destination, but the type as well; but that's a minor detail I suppose. Keep up the good work.


[If it matters, the right-most is JT 1, left JT 2, and the top is the third one.]

<edit :: Actually, after looking at the command line output (shutting them down) one threw a NullPointerException, and another contained the message "No I/O" several times.

Share this comment

Link to comment
Thanks for trying it out!!
I didn't think that it would connect to mine, but I guess that it was worth a shot.

The next thing that I'm working on is getting the actual game to get a list of connected users and pass it on to the connectee, this would make it so when ever a new person connects they can make a connection to everyone without having to do all the clicking :)

I'll add a combobox in there for selecting the type. Thats a good idea thanks :)

Good to know that it was working on another computer besides mine.

The reason that the third one wasn't working is because I have it only to have 4444 and 4445 open... this means two hosts per computer.

Share this comment

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!