Networking demo:

posted in Yar
Published March 14, 2005
Advertisement
NETWORK_DEMO[120k]

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.

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

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

JavaTacticsMusic:
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
JTM: stopLoop //STOPS THE CURRENT LOOPED BACKGROUND

==============================================================

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

TRY CONNECTING TO:
66.30.201.158 4444

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...

============================================
EDIT

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

127.0.0.1 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.
0 likes 2 comments

Comments

stormrunner
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.

Cheers.

[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.
March 14, 2005 06:18 PM
H_o_p_s
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.
March 14, 2005 06:28 PM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement

Latest Entries

!!!!!!!

671 views

MIDI Keyboard v1.7

1531 views

Yar.

1200 views

Orchestra Recording

1315 views

MIDI Keyboard v1.5

1448 views

Registration

1314 views

Ahhh!!!

1080 views

Um... yeah...

1068 views
Advertisement