cned
cned
CC#
Created by Tempest on 2/23/2025 in #help
How to tell if a variable is a reference or value data type
I think in/out on references will essentially make the double refs, which will likely require two memory lookups to resolve any value. I think that 99.9%of the time, “in” is incorrect and unnecessary (unless you have a massive value type/struct and copying it is more expensive that the addition memory hit)
27 replies
CC#
Created by Mango on 2/13/2025 in #help
Need an extension method to generate a random decimal within a range
A "random decimal" is a sort of odd concept.
70 replies
CC#
Created by Mango on 2/13/2025 in #help
Need an extension method to generate a random decimal within a range
What do you mean by "random". Because converting between types is going to mess up precision, which is going to introduce some bias.
70 replies
CC#
Created by V A R I A N T on 2/13/2025 in #help
[RESOLVED✅] StackPanel and CornerRadius of Border that contained it
You probably need to add a border and rounded corners to the top bar too. I don't think the "CornerRadius" modifies the clip region. (If it did, the drop shadows would also likely get cliped away by the outer box). You can specify all 4 corners, so you can only round the top corners of the blue area.
7 replies
CC#
Created by ARDA64 on 2/4/2025 in #help
Preventing ddos attacks in the game
I'm going to step away from this, because I'm not sure how this project vibes with the ToS of Brawl Stars.
121 replies
CC#
Created by ARDA64 on 2/4/2025 in #help
Preventing ddos attacks in the game
This problem has nothing to do with ddos.
121 replies
CC#
Created by ARDA64 on 2/4/2025 in #help
Preventing ddos attacks in the game
All you had to do was add an if check in the old OnReceive method... This code is wildly different and still doesn't solve the problem. Once in the HandleClient loop, nothing ever exits it. I think you might want to start with a smaller project if you are just learning C#.
121 replies
CC#
Created by ARDA64 on 2/4/2025 in #help
Preventing ddos attacks in the game
Either fix the code that’s handling that packet wrong, or try to block the ip of the sender and hope they don’t move.
121 replies
CC#
Created by ARDA64 on 2/4/2025 in #help
Preventing ddos attacks in the game
Magically knowing when you get a bad packet isn’t going to be something anything can do.
121 replies
CC#
Created by ARDA64 on 2/4/2025 in #help
Preventing ddos attacks in the game
Doubtful.
121 replies
CC#
Created by ARDA64 on 2/4/2025 in #help
Preventing ddos attacks in the game
I’ve not used AWS, so I’m not familiar with there networking configuration options.
121 replies
CC#
Created by ARDA64 on 2/4/2025 in #help
Preventing ddos attacks in the game
Yes. Whatever hosting you are using will have a way to block connections.
121 replies
CC#
Created by ARDA64 on 2/4/2025 in #help
Preventing ddos attacks in the game
The code in tcp seems fine, other than the persisten connection problem. The udo client has no protection, and does the same logic, and that’s harder to block in code since it’s a connection less protocol. The best bet is to hand this outside code, at a firewall level, since that will be more reliable and you wont have to waste code processing the connection at all.
121 replies
CC#
Created by ARDA64 on 2/4/2025 in #help
Preventing ddos attacks in the game
Heck there are dozens of ways for non-malicious attackers to accidentally crash the server (all the unsafe collection access i've mentioned)
121 replies
CC#
Created by ARDA64 on 2/4/2025 in #help
Preventing ddos attacks in the game
If you think something is crashing, add logs around it, run that, and see if you are right. If not, log more and more and more until you can find the line or value that's breaking stuff.
121 replies
CC#
Created by ARDA64 on 2/4/2025 in #help
Preventing ddos attacks in the game
I don't have time to rewrite the entire code base for you. If you find a problem, people here can help fix it.
121 replies
CC#
Created by ARDA64 on 2/4/2025 in #help
Preventing ddos attacks in the game
I've reviewed the code. There are dozens, if not hundreds of ways for a malicious actor to either crash the server or cause it to behave incorrectly.
121 replies
CC#
Created by ARDA64 on 2/4/2025 in #help
Preventing ddos attacks in the game
That isn't even an attack, it's just sending you a message.
121 replies
CC#
Created by ARDA64 on 2/4/2025 in #help
Preventing ddos attacks in the game
Sure, yah, that's one of your many, many problems.
121 replies
CC#
Created by ARDA64 on 2/4/2025 in #help
Preventing ddos attacks in the game
My first suggestion would be to go through the process of finding out what's going on, either by logging more or debugging. If you find yourself with multiple problems. Write them down so you can focus on one at a time. Once you know what's happening, you can come back and ask for help on a specific problem. 🙂
121 replies