Skip to content

Conversation

@IsaacElenbaas
Copy link
Contributor

I donated 32€ this morning to close out USA1 and USA3, and was surprised when they went from 76/100 and 42/50 to 93/100 and 42/50. Not a big deal, but odd.

The existing code in effect adds sponsored servers' numbers, then distributes the general funds by adding to each entry entry remaining * (funds / remaining costs). RUS4 and RUS6 are 50% funded right now, but if someone sponsored both of them at 50% they would jump to 75%, not 100%, because the general fund is at 50% and 30€ won't swing that much.

This changes it to (in effect) distribute the general funds first, add direct payments, and then redistribute any overflow as general funds. I think it makes more sense, especially if allowing direct payments for a server without sponsoring it. Those payments might be much smaller compared to the total and this makes them actually show up as intended.

Live state at time of PR:
scrot_2025-12-05-72376_631x1167

State with these changes at time of PR:
scrot_2025-12-05-72395_631x1169

Copy link
Member

@def- def- left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought we should do the opposite and spread all the general donations among the unsponsored servers. Because with your approach the sponsorings look even larger than they actually, and also larger than they currently look.

But maybe for next year a better approach would be to just fill up the donations from the first server first, then the second, etc.

@IsaacElenbaas
Copy link
Contributor Author

I think general donations should go towards DDNet.org, the Masters, and the Database before going towards any locations - we don't know what servers the donator plays on, and that infrastructure is critical.

What you're saying makes sense, but I would think that targeted donations vs general donations would be a pretty similar ratio for all regions, or even leaning towards targeted donations in regions with a smaller playerbase. Allocating properly should just make it clear what servers are a deadweight (and we can compare to playerbase to see how worth it that is). With the existing logic, sponsoring a server makes it receive less general funds than it did before you sponsored it.

Maybe something better would be to show the sponsored servers at the top with progress bars only for direct donations, and separately list the unsponsored server costs with no percentages. Their percentages are all the same and pretty meaningless when there is a bar for the total. The percentages for the sponsored servers showing only direct donations gives us good info to depend on if servers need to be cut - if a region is fully funding their servers, no cuts; if not, depends on how close it was and the playerbase.

@IsaacElenbaas
Copy link
Contributor Author

Though that other idea might drive people to do less general donations. . . maybe we would have to ensure DDNet.org, the Masters, and the Database are funded before allowing sponsorships for servers via $$ donation.

Also, I should note that I really appreciate the transparency. It feels much better to donate to something I enjoy when there are dollar goals and spending records instead of a bottomless "we accept donations :)" pit where I have no clue if they have gotten $20 this year or are way over costs.

@def-
Copy link
Member

def- commented Dec 6, 2025

Maybe something better would be to show the sponsored servers at the top with progress bars only for direct donations, and separately list the unsponsored server costs with no percentages. Their percentages are all the same and pretty meaningless when there is a bar for the total. The percentages for the sponsored servers showing only direct donations gives us good info to depend on if servers need to be cut - if a region is fully funding their servers, no cuts; if not, depends on how close it was and the playerbase.

I like this, but seems like some effort.

@IsaacElenbaas
Copy link
Contributor Author

Will resolve conflicts if this will be merged (heinrich5991 bailed us out). @def- I have implemented something close to what I described, but I didn't move any servers as I couldn't decide what to do with regions that have fully-sponsored and not servers. It didn't feel right to split the servers up, and sorting the regions by their costs felt mean.

scrot_2025-12-06-68544_845x1259

@def-
Copy link
Member

def- commented Dec 6, 2025

I don't understand what "1% of unmet costs" means.
Maybe you can just integrate this with #350 so we have it for 2026, and just leave 2025 as it is.

@IsaacElenbaas
Copy link
Contributor Author

"1% of unmet costs" refers to the Regions budget. If we are undergoal on infrastructure as well that will not affect it. E.g. USA1 is (100-87)/(3241-1578) ~= 1%. Not info we need since there's the console printout, but I think it's nice if viewing as a donator.

I assume the conflicts are just because I changed the "costs" map to be called "data" and the patches are anchoring on the data itself which is changing, should be a 5s rebase for this and #350. I can rebase on top of that if you prefer though.

@IsaacElenbaas
Copy link
Contributor Author

IsaacElenbaas commented Dec 6, 2025

One downside of this design is that even if the region budget is filled and we are set for the year, individual regions without enough direct donations will show as unfilled. I could put something in to mark them at 100% once the total is fully funded, but that doesn't help when we're $10 off of fully funded. Maybe there should be a slightly transparent section that displays up to the old version's number (direct + percent of region budget funded)?

@IsaacElenbaas
Copy link
Contributor Author

Here is that unfunded and funded.
scrot_2025-12-06-961_631x1258
scrot_2025-12-06-1254_631x1260

Copy link
Member

@def- def- left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks amazing!

The code is a bit messy, but not much worse than before ;)

@def- def- merged commit f3d94f5 into ddnet:master Dec 7, 2025
@IsaacElenbaas
Copy link
Contributor Author

Ack, surprise merge!

Looks like a stray console.log() is on line 214, and I realized after sleeping on it that the transparent bars aren't accurate - they don't subtract the regions' direct payment amounts from the numerator and denominator, so visually they show a tad higher than they should. It shouldn't be much of a difference though and we don't have that number readily available because sumDirect includes the infra.

@IsaacElenbaas
Copy link
Contributor Author

IsaacElenbaas commented Dec 7, 2025

Mm, GER3 says it's 187% of unmet costs on the live site and RUS2 303%. I'll open another PR to fix these last things haha

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants