Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (481)
Games in Android Showcase (110)
games submitted by our members
Games in WIP (547)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  is asking for port forward too much?  (Read 4235 times)
0 Members and 1 Guest are viewing this topic.
Offline h3ckboy

JGO Coder


Medals: 5



« Posted 2010-01-24 15:41:02 »

well, I am wondering as the title says,

is asking someone to port forward too much??

I know you can use stun, but that takes a lot more effort Sad

thx in advance,
h3ckboy
Offline teletubo
« League of Dukes »

JGO Ninja


Medals: 48
Projects: 4
Exp: 8 years



« Reply #1 - Posted 2010-01-24 17:21:22 »

you mean the final user ?
if that's the case, yes, it is TOO MUCH .

unless your game is a huge success like WoW, the user will not bother trying your game if he has to change something in his system .
Not to mention that 90% of the final user does not even know what port forwarding is . (And expecting them to learn it just to play your game is completely out of question)

Offline h3ckboy

JGO Coder


Medals: 5



« Reply #2 - Posted 2010-01-24 17:33:02 »

ok, i will give stun4j another shot then Wink
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Karmington

Senior Member


Medals: 1
Projects: 1


Co-op Freak


« Reply #3 - Posted 2010-01-24 20:01:13 »

Out of interest, what causes the problem for you/what is the application?

Offline h3ckboy

JGO Coder


Medals: 5



« Reply #4 - Posted 2010-01-24 20:09:02 »

well, I have a multiplayer game with rooms and such, like battlefield, or atleast that is the end-game. and I like to ahve a decent idea of what I am going to do b4 hand so I dont spend a few months and then realize it is impossible.

so basically, and I dont think that the one server I have will be able to support a bunch of games going.... so when a person hosts a game I was wondering if it would be ok to ask them to port forward. because I COULD you stun4j to do it automatically, but I wouldnt be using any tutorials or anything so it would be kinda hard. cause there isnt anyone really to answer my questions cause not many people have done it.
Online Riven
« League of Dukes »

JGO Overlord


Medals: 781
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #5 - Posted 2010-01-24 20:38:16 »

well, I have a multiplayer game with rooms and such, like battlefield, or atleast that is the end-game. and I like to ahve a decent idea of what I am going to do b4 hand so I dont spend a few months and then realize it is impossible.

so basically, and I dont think that the one server I have will be able to support a bunch of games going.... so when a person hosts a game I was wondering if it would be ok to ask them to port forward. because I COULD you stun4j to do it automatically, but I wouldnt be using any tutorials or anything so it would be kinda hard. cause there isnt anyone really to answer my questions cause not many people have done it.

If you want P2P networking anyway, you can use a server to only do network I/O, no logic.

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social rankings
Offline Alan_W

JGO Knight


Medals: 8
Projects: 3


Java tames rock!


« Reply #6 - Posted 2010-01-24 22:49:07 »

Basically you need a server somewhere that isn't behind a router.

If you use UDP throughout, then you can run peer-peer without port-forwarding, provided you have a server somewhat on the net that works as an introducer.  This is UDP Punchthrough. (Type it into google).  Unfortunately you still need an internet accessible server that can communicate using UDP to introduce the various client programs to each other and keep a running record of which clients are still alive.  So that rules out cheap hosting.  The main benefit is you reduce the bandwidth to your server, as only keep-alive pings and client IP:port data goes there.  To run player servers, each client would need to supply a player entered game_id and identify which client was the server.  It's all a bit fiddly, but if you have a spare computer and broadband internet, then using DynDNS will get you there. (I tried this - it does work)

Time flies like a bird. Fruit flies like a banana.
Offline Swattkidd7

Junior Member





« Reply #7 - Posted 2010-01-25 00:34:30 »

well, I have a multiplayer game with rooms and such, like battlefield, or atleast that is the end-game. and I like to ahve a decent idea of what I am going to do b4 hand so I dont spend a few months and then realize it is impossible.

so basically, and I dont think that the one server I have will be able to support a bunch of games going.... so when a person hosts a game I was wondering if it would be ok to ask them to port forward. because I COULD you stun4j to do it automatically, but I wouldnt be using any tutorials or anything so it would be kinda hard. cause there isnt anyone really to answer my questions cause not many people have done it.

hmmm, well if its for hosting games maybe you should just host a few servers yourself, and then on your site have a place for people wanting to run their own servers and just create a nice tutorial on how to port forward and what they need to do to set up their own server. I am sure if people play on your servers and really enjoy the game, dedicated users may want to set up their own thing.

Or if you notice some active players in your server/community, just ask them if they would be interested in hosting a server.

IMO, as long as the typical user just trying to jump in and play a game doesnt have to do anything like that it should be okay.
Offline h3ckboy

JGO Coder


Medals: 5



« Reply #8 - Posted 2010-01-25 05:55:00 »

Basically you need a server somewhere that isn't behind a router.

If you use UDP throughout, then you can run peer-peer without port-forwarding, provided you have a server somewhat on the net that works as an introducer.  This is UDP Punchthrough. (Type it into google).  Unfortunately you still need an internet accessible server that can communicate using UDP to introduce the various client programs to each other and keep a running record of which clients are still alive.  So that rules out cheap hosting.  The main benefit is you reduce the bandwidth to your server, as only keep-alive pings and client IP:port data goes there.  To run player servers, each client would need to supply a player entered game_id and identify which client was the server.  It's all a bit fiddly, but if you have a spare computer and broadband internet, then using DynDNS will get you there. (I tried this - it does work)

I already got all of that Wink.

although I will look into the whole punch-through thing. Wont that take up tons of network, so that it will go slow for everyone?

EDIT: oh, it apparently doesnt take bandwidth Smiley. I am still reading it, this looks interesting Smiley thx.
Offline h3ckboy

JGO Coder


Medals: 5



« Reply #9 - Posted 2010-01-25 06:23:58 »

ok, so this is my understanding.


if the client sends a packet to the server, the nat automatically forwards any packets returning fromt hat server to the client?

and then the server give the first client the ip of the second client. Then the first client sends something to the second client, but it appears as the global ip, NOT the local IP. And that then is let through and sent to the specific client. And the second is also sending to the first one, sot hey are both put on the allowed list,just like when they sent stuff to the server. COMPLETELY taking the server out of the equation.

WOW, this is a really genious idea!!!
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Nate

JGO Kernel


Medals: 145
Projects: 4
Exp: 14 years


Esoteric Software


« Reply #10 - Posted 2010-01-25 06:47:24 »

h3ckboy: some more info:
http://www.jenkinssoftware.com/raknet/manual/natpunchthrough.html
It has a table showing success with different routers. NAT punch through is cool, but not perfect.

Offline markmistry

Junior Member





« Reply #11 - Posted 2010-02-02 21:36:27 »

are you looking for java pnp to set the router to port forward?
check this out...
http://www.sbbi.net/site/upnp/index.html

and when you get a test working give me a shout and i will be your best friend  Grin
looks like it will get rid off port forward problems but as the others suggest youll still need some sort of rendezvous server to keep a list of all the connected servers.
ive lost the will to program so youll have to do it  Grin
Offline noblemaster

JGO Ninja


Medals: 20
Projects: 10


Age of Conquest makes your day!


« Reply #12 - Posted 2010-02-02 23:13:58 »

Here is an example on how to use stun4j:
http://www.blog.jasonederle.com/?p=36

I was successfully able to compile & run it. It returns some port numbers for me. I don't think it gets any easier than that? The example is pretty much self explanatory. Just add the stun4j.jar and you are good to go...

Offline h3ckboy

JGO Coder


Medals: 5



« Reply #13 - Posted 2010-02-03 06:25:42 »

I have already gotten most of the way with punch-through... unless that isnt the best way?
Offline delt0r

JGO Knight


Medals: 27
Exp: 18 years


Computers can do that?


« Reply #14 - Posted 2010-02-07 18:26:28 »

Hole punching in general does not work on my *correctly* configured firewall. I guess the assumption is that most folk think NAT is a firewall and don't bother with anything else. TCP hole punching (both ends behind a NAT) is really tricky to get to work even in that case. 

I have no special talents. I am only passionately curious.--Albert Einstein
Offline h3ckboy

JGO Coder


Medals: 5



« Reply #15 - Posted 2010-02-07 18:54:18 »

hmm, well I aint using tcp for starters.

and, I tried using stun4J, and it was kinda wierd
Offline noblemaster

JGO Ninja


Medals: 20
Projects: 10


Age of Conquest makes your day!


« Reply #16 - Posted 2010-02-07 22:26:34 »

wierd?

Offline h3ckboy

JGO Coder


Medals: 5



« Reply #17 - Posted 2010-02-08 06:18:38 »

wel, I got it on a working server and all.

and it says it is working. but, it doesnt....

maybe that is because the thing I tested with was behind the same NAT??
Offline noblemaster

JGO Ninja


Medals: 20
Projects: 10


Age of Conquest makes your day!


« Reply #18 - Posted 2010-02-08 11:52:35 »

I don't think that works? I would try to connect from outside, otherwise, your port translation is off. Obviously in the same LAN, the port number does not change.

Offline delt0r

JGO Knight


Medals: 27
Exp: 18 years


Computers can do that?


« Reply #19 - Posted 2010-02-08 11:57:33 »

It won't work because you are not connecting to an external interface. You are behind the NAT, so there is no tunneling that can happen. Since you try to connect to your external IP number, different things may be happening. The router knows that you are sending the data to itself and just NATs it anyway, i doubt this happens. It my recognized that its your external interface and drop the packet, but i doubt it. It probably sends it up to the ISP and the ISP drops the packet, i would guess this. 

I have no special talents. I am only passionately curious.--Albert Einstein
Offline h3ckboy

JGO Coder


Medals: 5



« Reply #20 - Posted 2010-02-08 17:11:52 »

kk, so I should just get some1 to try it form outside??
Offline noblemaster

JGO Ninja


Medals: 20
Projects: 10


Age of Conquest makes your day!


« Reply #21 - Posted 2010-02-08 19:05:09 »

Yes, try to connect from outside. If you have access to a remote linux box (outside), you could try to connect to your own machine via telnet or so?

Offline h3ckboy

JGO Coder


Medals: 5



« Reply #22 - Posted 2010-02-08 19:26:52 »

ahh, I can probably get corv to connect some time or somthing.
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

atombrot (26 views)
2014-08-19 09:29:53

Tekkerue (24 views)
2014-08-16 06:45:27

Tekkerue (23 views)
2014-08-16 06:22:17

Tekkerue (13 views)
2014-08-16 06:20:21

Tekkerue (20 views)
2014-08-16 06:12:11

Rayexar (59 views)
2014-08-11 02:49:23

BurntPizza (38 views)
2014-08-09 21:09:32

BurntPizza (30 views)
2014-08-08 02:01:56

Norakomi (37 views)
2014-08-06 19:49:38

BurntPizza (67 views)
2014-08-03 02:57:17
List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!