Multiplayer "Flood Limit Exceeded"

0 favourites
  • 7 posts
From the Asset Store
An example of how to make old style RPG random encounters and a limited battle system.
  • Hey, hows it going!

    So I was curious about how this works, it's affected me in two areas. Once in-game with another player, this isn't a problem at all but when it comes to retrieving data about other games, I will eventually come to a "Flood Limit Exceeded" error, which (I think) disconnects from the signalling server and prevents me from reconnecting to it unless I refresh the game. Now, I'm totally understanding if I was sending constant requests every tick to the signalling server, but I'm not doing that, I space out the requests (Maybe I don't space them enough?) I also don't expect to be using all the resources on the signalling server, I do understand that it's shared and primarily used to route people to eachother, but is there a way I can solve these situations I am facing?

    • I make a request to the signalling server every 5 seconds to get the Game instances, so that I can tally up how many players are online. after a certain amount of time, maybe in a few minutes, I get a "flood limit exceeded"
    • I make a requests to detect the next empty room every 3 seconds when connecting to a game. Say there's Room1, Room2, Room3, and you attempt to connect, you will become host of Room4, and then if Room1/2/3 become empty, then you will end up stuck in Room4 until a bunch of players take up the previous rooms. So every 3 seconds, it will detect what room is the next empty one, so if you were in room 4, you will go to room 1 if it is empty.

    Thank you!

  • I would bet the flood limit is how scirra protects its server from tons of requests (or when someone rights faulty code) so they don't crash the server. I handle all my rooms by having the game send an ajax request to my server to get a room thats available. a few mysql tables handle this easily.

    If the player is the first to connect the server doesnt send him the room name yet.. the server just sees that hes ready to join a room when another player connects so he is queued as next in line... all he sees a waiting for player message... once another player has opened the game the server sees it has two players waiting and sends them both room name.

    If you have access to a server and understand ajax this would be the cleanest way to do it

  • troublesum

    I could totally handle it that way, but I don't have access to a server

  • Why do you need every 5 seconds. Calls like what your using should be made either on required or spaced out to a minute or more. Signalling servers and such aren't really built to be queried every few seconds.

  • Well, every 5 seconds to update the counter, and every 3 seconds to recheck for empty rooms. The 5 seconds could be increased for sure, but the empty room checking is a bit more complicated. If a player was in Room10 and had to wait 1 minute til it checks if Room1 is now avaliable, then that player would prob get frustrated at waiting.

    I guess I'm just wondering what the limitations are, because it works fine, but only to a degree.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • There is a flood limit on the server to prevent malicious or accidental denial of service for other users caused by consuming disproportionate amounts of bandwidth or CPU on the server by flooding it with requests. To trigger the flood limit you have to make in the order of hundreds of requests within seconds, so it seems most likely that in fact there is a mistake in your events. The flood limit is deliberately designed to catch and prevent that. It is impossible to comment further without seeing your events.

  • Ashley

    Ah that's useful information, thank you! I think my events regarding the signalling server were tidy, but admittedly the events for peer/host were a bit demanding. I'll check out my events.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)