Ohmnivore / SkullRush

:skull: A 2D online multiplayer shooter written in Haxe
GNU General Public License v3.0
47 stars 9 forks source link

Can't connect to server / black screen #1

Open Gama11 opened 10 years ago

Gama11 commented 10 years ago

All I get when connecting to the 87.168.185.95 server listed in the public servers menu is a black screen (that's with the 0.3.7 release).

Also, if you enter an invalid IP in "connect to IP", you don't get an error message like you would expect, but a black screen as well.

Ohmnivore commented 10 years ago

Yeah the black-screen is the FlxState active after a connection attempt has been made. It should switch to the game state as soon as the map has been received. I plan to add detailed messages about connection attempts in that black-screen state soon (so troubleshooting will be easier). My guess is that there was no connection established to the server you tried to join.

About the server though, it doesn't look like my ip address (as far as I can remember my public IP address has always started with 198). It may be a friend who was hosting, or something. Most of my friends aren't aware that they need to forward port 6666 (UDP), so that definitely kills off the connection.

Last but not least, the master server has the following issue at the moment: the server list is only updated when a request is received. So, if a server happens to timeout, it will only disappear from the list after two requests has been sent. In short, you need to refresh the server list in order to get rid of the "dead" servers. Maybe my friend was hosting hours before you tried to join, but since you were the first request the masterserver received since the server's timeout, the server still showed up on the list. It's easy to fix, I'll do that as soon as I can.

P.S.: I think the direct connect option is raw, but I'm not sure how to detect an invalid IP. I mean, there's IPv4, haven't tested IPv6 yet but it should be an acceptable input, but then you can also leave the field blank if you want to connect to localhost. That makes for a lot of options, and even then maybe someone set up his hosts file to some crazy aliases, that would sure be hard to detect. I think that "direct connect" should only be chosen by a user who's sure of what he's doing, and then it's as straight-forward as entering the correct IP. If the address isn't the right one, the user will know because it just won't connect and with the soon to come connection attempt outputs I'm sure the user will realize why.

Thanks for trying the game though! At the moment however there's no 24/7 servers. If people happen to see a server, it's most often just me testing out some features. In fact, I was testing one day (as usual) and saw something move across the server's screen. I wasn't connected yet, so I wondered what was happening, then I realized it was a friend who had seen my server on the public list and connected. Apart from that, the only time people are playing is when someone organizes a match through facebook or when we do LAN parties. Of course I hope to get more people into the game, but I'll start promoting once I feel like it's ready (I'll maybe post a devlog on TigForums for the moment though).

Gama11 commented 10 years ago

Thanks for the detailed reply!

Yeah, you're right, might not be the best idea to check for valid IPs. My point there was pretty much the same as earlier: some kind of error message when a connection failed + a back button would be good to have.

Keep up the great work, this looks really promising - and the fact that it's open source makes it an amazing reference for other people trying to create multiplayer games (with HaxeFlixel). :thumbsup: