How can someone using another PC access my game?

Need help with SmartFoxServer? You didn't find an answer in our documentation? Please, post your questions here!

Moderators: Lapo, Bax

amytexas1985
Posts: 26
Joined: 18 Apr 2009, 15:27

How can someone using another PC access my game?

Postby amytexas1985 » 18 Apr 2009, 15:30

I have smartfoxserver running on my Home PC.

How can someone using another PC play my game ?
Gnoll
Posts: 128
Joined: 10 Mar 2009, 10:14

Postby Gnoll » 18 Apr 2009, 23:58

You will need to forward the port sfs is running on in your router.
amytexas1985
Posts: 26
Joined: 18 Apr 2009, 15:27

Postby amytexas1985 » 19 Apr 2009, 04:26

How do I get the port information?

where is the documentation?
Gnoll
Posts: 128
Joined: 10 Mar 2009, 10:14

Postby Gnoll » 19 Apr 2009, 10:10

The port information? It is whatever you set it to in the config.xml, default is 9339. Not sure if there are sfs docs for it as it is unrelated, it is like setting up a webserver on your pc etc. You do need to set the ServerIP tag (if you have the latest sfs version) to the ip you want to allow to connect, or * for anyone to connect.

Gnoll
amytexas1985
Posts: 26
Joined: 18 Apr 2009, 15:27

Postby amytexas1985 » 19 Apr 2009, 11:56

I appreciate the reply but it is not helpful.
I have no idea what you are talking about.

I need specific instructions.

I have a game running on my home PC using SFS and I have no idea how to allow other people on other PCs to play the game.

HELP!!!!!

Amy
User avatar
rjgtav
Posts: 2813
Joined: 19 Apr 2009, 11:31
Location: Lisbon, Portugal

Postby rjgtav » 19 Apr 2009, 12:02

I have the same problem and my router doesn't have the nat service option. You need to create a nat service:
read this http://www.smartfoxserver.com/forums/viewtopic.php?t=306
amytexas1985
Posts: 26
Joined: 18 Apr 2009, 15:27

Postby amytexas1985 » 19 Apr 2009, 14:52

I appreciate the link you sent but is seems extremely complicated.

what is the point of the 20 user license?

why are there no directions on how to allow the "20" users to access the game?

so I created a game, got the server running and they give no directions on how to actually let another person play the game?
Gnoll
Posts: 128
Joined: 10 Mar 2009, 10:14

Postby Gnoll » 19 Apr 2009, 20:16

http://portforward.com/

:) Assuming you are still using the default port (9339) you will need to port forward this on your router, there are some guides on this website and it explains port forwarding, you may also want to add port 80 (For the webserver)

Good luck,
Gnoll
amytexas1985
Posts: 26
Joined: 18 Apr 2009, 15:27

Postby amytexas1985 » 20 Apr 2009, 18:36

I have two SFS folders:

ClientSide
ServerSide

Does the ClientSide folder go in my webhosting folder?
The second person will access the game using:
www.mywebsite.com/ClientSide/MyGame.html

I am assuming the ServerSide stays on my home PC?
Gnoll
Posts: 128
Joined: 10 Mar 2009, 10:14

Postby Gnoll » 21 Apr 2009, 05:31

Yep, the serverside files should be in sfs/server and client in the web directory
amytexas1985
Posts: 26
Joined: 18 Apr 2009, 15:27

Postby amytexas1985 » 21 Apr 2009, 14:29

OK
I appreciate the help.
I am making progress.

SUCCESSFUL:
I uploaded the ClientSide folder and I was able to play the game through a webpage on my webserver with the IP set locally (127.0.0.1)

NOT SUCCESSFUL:
When I changed the ip addresss to MY ip address I was unable to login to play the game.



<SmartFoxClient>
<ip>127.0.0.1</ip>
<port>9339</port>
<zone>ChatZone</zone>
<debug>false</debug>
<blueBoxIpAddress>127.0.0.1</blueBoxIpAddress>
<blueBoxPort>9339</blueBoxPort>
<smartConnect>true</smartConnect>
<httpPort>8080</httpPort>
<httpPollSpeed>750</httpPollSpeed>
<rawProtocolSeparator>%</rawProtocolSeparator>
</SmartFoxClient>
Gnoll
Posts: 128
Joined: 10 Mar 2009, 10:14

Postby Gnoll » 22 Apr 2009, 06:08

If your webserver is hosted on the same server as your sfs, and you are running it in the browser use 127.0.0.1, if they are seperate use the ip of the sfsserver. eg. your home ip address is xx.xx.xx.xx, and your sfs is running on your home pc, use xx.xx.xx.xx in the client on your webserver.
amytexas1985
Posts: 26
Joined: 18 Apr 2009, 15:27

Postby amytexas1985 » 22 Apr 2009, 08:30

They are seperate.

I replaced the "127.0.0.1" with my home IP in the client side config.xml

I was not able to connect - I pressed the connect button and nothing happened


SUCCESSFUL:
I uploaded the ClientSide folder and I was able to play the game through a webpage on my webserver with the IP set locally (127.0.0.1)

NOT SUCCESSFUL:
When I changed the ip addresss to MY ip address I was unable to login to play the game.
amytexas1985
Posts: 26
Joined: 18 Apr 2009, 15:27

Postby amytexas1985 » 22 Apr 2009, 15:40

Do I have to change the IP address in the following also?

smartFoxObject.connect ("127.0.0.1", 9339)


This statement is in my game.fla
Gnoll
Posts: 128
Joined: 10 Mar 2009, 10:14

Postby Gnoll » 22 Apr 2009, 22:48

You will not be able to access your game on the same computer as which the server is running, (on the external ip address anyway) I believe this is known as loopback error.

Assuming you are on windows... Go to C:/Windows/System32/etc/hosts, add a line to the bottom saying

localhost xx.xx.xx.xx

xx.xx.xx being your external ip.

It could be xx.xx.xx.xx localhost , compare to entrys that are already there.


Good luck,
Gnoll

Return to “SmartFoxServer 1.x Discussions and Help”

Who is online

Users browsing this forum: No registered users and 47 guests