Here are my events which cause this error after about 4 minutes :
If I replace 1 sec by 0.25 sec, the error message comes after about 1 minute.
The error doesn't happen if I remove these events.
I read this but it didn't help me much as my game list request happens every second, not "hundreds of requests within seconds"
Any idea how to fix this ?
Your request for game_name instance is happening every loopindex... so that's what's causing it.
What you probably need to do is move that particular action out from under the loop, and have the loop trigger a boolean value or something once it's counted your rooms - then use the triggered boolean to request the game_name, etc.
If you have say 10 rooms, then that request is triggering 10 times in the matter of about 0.016 seconds. The "wait" you have put only delays this fact, since there will still be 10 requests waiting to check with a tiny delay between each 1 second wait. It's still causing a "cascade" effect.
I'm not sure to understand.
The loop condition (events 27) only contains local events as it's adding data to a local list object. The game list request happens after the loop condition, as in a different event (event 28).
The issue remains even if I remove the loop events.
Not remove the loop itself... just MOVE the request action (from event 28) into an isolated event so it's not triggering (with a 1 seconds delay) for every [loopindex].
So instead of requesting in that loop - set a global variable or something as a trigger (1?). Use that trigger to do the request only once instead of X "rooms" loopindex - then set itself back to (0?).
I'll be surprised if that doesn't fix it :/
It's either that, or something is telling the signalling server someone is joining constantly... I notice your master condition there is set off by "on join".
I've done this :
And the issue is still here (it disappears if I remove these two events).
On this screenshot, there is no loop that triggers more than 1 request per second as far as I know…
[quote:afo4u2s6]I notice your master condition there is set off by "on join".
I think "On signalling join" is only triggered when we and only we join a room, as it is different from "on peer join", right? So it is not triggered multiple times here. Plus, if I add a log of this event in my text area, it only happens once.
Still puzzled by this flooding message.
Develop games in your browser. Powerful, performant & highly capable.
Bah! I haven't worked enough with multiplayer stuff to know for sure then... it just seemed like the logical solution to me.
Is there another event somewhere that you're sending the room list too often? It may be a triggering issue as well... I mean, it sounds like something, somewhere, is popping through too many requests in a single tick maybe, or you're getting some weird cascading in your conditional requirements.
If you can post your capx I can take a look and mess with it as well.
https://www.dropbox.com/s/mey55anw4rv1d ... .capx?dl=1
I've made some tests and it appears that the flood message always happen after 198 game list requests. Any way to bypass this ? :/
Dawwww new version of C2 lol... ok let me update!
— le Canapin
OK I see the problem.... you are sending a request every 0.1 seconds, that's why. You're basically DDoS attacking the signalling server, so it's denying you after 198 requests in a given amount of time.
You need to only send the request signal when someone is actually pressing refresh on the room list, or maybe automatically every 10 or 20 seconds.
After that, the problem will stop.
You're basically bouncing between events 9 and 10 in the version you sent me... calling room -> on room called -> do stuff, then call room again -> repeat forever
I tried with an interval of 3 seconds and the flood message is still here. Flood after 10 minutes and 198 room list requests.
Of course I'm creating an infinite (but slow !) loop, because I need to refresh the room list every X seconds as long as my server is up.
I could have done "system : every X second -> multiplayer: request for room list", it would be almost the same.
How could I refresh and show the actual room list to my players if I don't have a loop ?
edit : I'll go for the refresh button if needed, but that's a bit annoying for the players… And if only 10 players refresh only every 10 seconds, that is the same as 1 request/sec so it doesn't solve the issue ?
The wait action isn't delaying the requests as you might think. It's not doing "every second, send a request", it's more like, "in a second, send all my requests", hence the flooding warning. You might want to do "wait loopindex+1 seconds" or better yet, switch to a timer based event structure.
Like creating a dummy sprite and assigning it the timer behavior ?
edit : I've done this
But the flood issue is still here. No change.
Well, maybe the server has blacklisted you and you will only ever get flooding warning for some time.
Would you mind to try this capx ? https://www.dropbox.com/s/mey55anw4rv1d ... .capx?dl=1
It uses the timer thing and you just have to let it run for about 200 seconds.
I'm surprised to encounter such an obstacle, refreshing every X seconds the room list is pretty basic for a multiplayer game.
Hrmm, error on request 198... You might want some hints from Ashley as to why this happens. Also why would you want to refresh the room list so often ? Normally you would request it once automatically, and allow the user to manually refresh the list once in a while.
When a player creates a new room from the main lobby, it could beforehand make the chat server broadcasting to all peers that this player has created a room. There is no need to request the room list regarding the room creations.
However, as rooms can't send messages to another room, there is no way for the master lobby to know if another room has been shut down (for example, a room host closing his browser). This is the reason why I need to return and refresh the room list from my master lobby.
It could be done every 5 secods instead of 1 or 3 seconds, but I'm pretty sure the issue will remain the same. And waiting for more than 5 seconds to actually see the available room is way too long. Anyway, it's still far from "hundred requests in seconds" to flood the server as Ashley mentionned on another thread.
I could also use a refresh button ; but what if, on average, 30 players hit the refresh button every 20 seconds ? It would be 1 room list request every 1,5 sec, so the issue would be the same again.
Or maybe it wouldn't because the requests would come from various rooms ?
(edit : seems to be per peer, as I did theses requests from the host and peer in parallel and they both did 190+ requests)
I wanted to ask Ashley about my issue but we can't send him private messages from his profile. Any way to contact him besides tagging him as you did ?