Menu

Quickstart

This is a quick start meant to provide a board (server) and two players (clients) on the same computer with some windows-system.

Installing connectX

Download connectX.zip (sourceforge.net) and unpack it into writable directory such as c:\Users\Username on windows. That creates a folder named c:\Users\Username\connectX.

Starting the server the first time

Change to directory c:\Users\Username\connectX. There are two start-batches in the connectX-directory: startServers.bat and startServersNr.bat. Both start ten different servers on the local computer and provide ten local boards. Both batches differ in the way they start the boards. If it does work stick to startServersNr.bat - it starts smarter. Doubleclick startServersNr.bat best.

Any starter brings up ten boxes such as
![startServersNr.bat just started] (https://sourceforge.net/p/connectxgames/wiki/Quickstart/attachment/startServerNrConnectX.bat%204753.png)
or
startServerNrConnectX.bat just started.

The starter frequently relaunches other black boxes about every three minutes. Don't bother, these boxes should just blink up, slow down your computer for a second and then disappear. If you wonder what those boxes do all day long check the directory c:\Users\Username\connectX\logs. There will be ten log-files that tell.

Sometimes windows' firewall wants to know if the system should allow java to grab some ports. As you want the server to offer boards at ports this should be allowed (Zugriff zulassen). A dialogue could look like this.

Firewall von Windows 7 fragt beim Start des Servers.

Important: Let your system allow java to get the ports (4753 to 4762)! In case you can not open the ports for connectX you still can use the scenario described here. Without ports opened you can not run a server and offer your board to other users on the internet but you can still work local with two players (clients) connected to one board (server) all on you own computer.

To stop the server(s) you just close all those tiny black boxes.

Starting the server again

Every server-start yields ten files with the pid-extension in directory c:\Users\Username\connectX\logs. The ten files 4753.pid ... 4762.pid need to be deleted when the server(s) stop. That's not done automatically. So to restart the server(s) again you need to delete any pid-file first.

Starting first client (dumb bot)

A bot is a player that automatically chooses a position to put its coin. The bot included is dumb. It randomly picks some position that actually is not occupied and does not check its opponent.

To start a bot and connect it to the first server you just started on your local computer you doubleclick the file startConnectX.bat. One of these black boxes appear and take your typing from the keyboard, type:

y <return>
n <return>
<return>
b <return>
<return>
<return>
<return>
</return></return></return></return></return></return></return>

The <return></return> (<enter></enter>) is that large big key that terminates a line on the right hand side of the keyboard. That key is pressed mostly here to use default-values. This typing gives something like

startConnectX.bat started dumb bot locally.

Fine! Your first player (a dumb bot) has connected to the board at port 4753. Most important for the first start: To get a second competitor there are three minutes to go. If there is no second player connected to that board within the next three minutes the server kicks the bot and restarts.

Starting second client (real player)

This player will ask you to type the positions on the keyboard.

To start a player and connect it to the first server you just started on your local computer you doubleclick the file startConnectX.bat. One of these black boxes appear and take your typing from the keyboard, type:

y <return>
p <return>
<return>
<return>
<return>
<return>
<return>
<return>
</return></return></return></return></return></return></return></return>

The <return></return> (<enter></enter>) is that large big key that terminates a line on the right hand side of the keyboard. That key is pressed mostly here to use default-values. This typing gives something like

startConnectX.bat connected player locally

and

startConnectX.bat started player locally

This is the client's interface that asks you to enter a position on the keyboard. Please note that every position has exactly two characters: first is a letter denoting the column and second is a number denoting the row. H5 or b8 are valid positions.

The number (id) of a player represents the players coins. Above the bot (connected first and therefor id 0) holds position H8. The player just connected has id 1 and can pick any position by typing.

Sometimes it happens and you see plenty of text like this


de.root1.simon.exceptions.LookupFailedException: remoteobject with name [SimonRemoteInstance[connectX.remote.PlayerClientBotRandomizer|ip=localhost/127.0.0.1:4753;sessionID=1;remoteObjectHash=919504681]] not found in lookup table.
at de.root1.simon.LookupTable.getRemoteObjectContainer(LookupTable.java:310)
at de.root1.simon.ProcessMessageRunnable.processEquals(ProcessMessageRunnable.java:643)
at de.root1.simon.ProcessMessageRunnable.run(ProcessMessageRunnable.java:113)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

These errors indicated above do no harm as long as you are asked to provide some position to put your coin.


Related

Wiki: Welcome

MongoDB Logo MongoDB