Zandronum Chat on our Discord Server Get the latest version: 3.1
Source Code

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001861Zandronum[All Projects] Suggestionpublic2014-06-26 14:242014-06-29 20:38
ReporterAlienOverlord 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutiondenied 
PlatformOSOS Version
Product Version1.2 
Target VersionFixed in Version 
Summary0001861: Increasing MAXPLAYERNAME
DescriptionRecently I bumped into this issue for like 6th time and well, it felt bad.
So I suggest these two things to be done (can code them myself, if Torr accepts):
 - increasing MAXPLAYERNAME to 128+3 (yes, that huge number)
 - adding a new check in V_CleanPlayerName to limit actual name length to the current value (well, almost current value: 32 characters), excluding color control characters; that is so people don't abuse the feature above to play with 128 character long nicks.

This will mainly help people that use custom colors in their names, as for such colors one control sequence takes minimum of 4 characters (\c, [, letter, ]) and in existing popular packs up to 6 characters.

Although that'll be most noticeable, this will affect people that use system colors as well, enabling them to for example use smoother transitions.
Attached Files

- Relationships

-  Notes
User avatar (0009753)
Leonard (developer)
2014-06-26 18:28
edited on: 2014-06-26 18:29

I already thought about not counting the color characters for the name limit and I think it would be very useful.
For the newtextcolor wad I'm sure a ton of people already hit the limit just because of the colors.
Even with only "Leonard" I can max use 4/5 different custom colors before hitting the limit.

User avatar (0009756)
Catastrophe (reporter)
2014-06-26 21:00

If what you're trying to say is that the current 32 character limit should NOT include the additional text needed to add colors (such as \cm), then I agree. This becomes especially noticeable when using custom color wads.
User avatar (0009760)
Watermelon (developer)
2014-06-26 22:53

I'm personally fine with extending it, though IDK if Carn has littered Zan with MAXPLAYERSNAME + 3 + 1 (making it a lot harder to find bugs)

I believe it should be capped at 32 characters, but upped to 32 * 3 to allow color for each letter. Since names are restricted to changing only every 30 sec, bandwidth wouldn't be really an issue.
User avatar (0009763)
Dusk (developer)
2014-06-27 19:21
edited on: 2014-06-27 19:23

Ideally netname should be an FString but considering the wonderful code practice of our upstream we cannot really do that.

EDIT: Hmm. In recent ZDoom versions userinfo_t is a TMap<FName,FBaseCVar *> derivative and the public netname field has been replaced by GetName:
const char *GetName() const
{
    return *static_cast<FStringCVar *>(*CheckKey(NAME_Name));
}


User avatar (0009781)
AlienOverlord (reporter)
2014-06-29 12:48
edited on: 2014-06-29 12:48

> I believe it should be capped at 32 characters, but upped to 32 * 3 to allow color for each letter.
Well this is basically what I said. The only difference is that I wanted it to be capped at 32 and upped to 32 * 4.

Also just saying, right now it's not capped to 32. It's capped to 31 due to Carn being dum dum. Quote from d_player.h:

// [BC] Allow longer names since we can now colorize them and stuff.
// [BB] "+3" so that playernames can always be terminated by "\\c-"
#define MAXPLAYERNAME 31+3


User avatar (0009783)
Watermelon (developer)
2014-06-29 14:03

Quote
Well this is basically what I said. The only difference is that I wanted it to be capped at 32 and upped to 32 * 4.

Why *4 instead of *3?
User avatar (0009784)
AlienOverlord (reporter)
2014-06-29 14:11

Quote
Why *4 instead of *3?

Because the number looks nicer :)
User avatar (0009785)
Edward-san (developer)
2014-06-29 14:33

... I'd say "16*4+3", because, uh, is it there a name which should have more than 16 characters (without counting the color control chars)?
User avatar (0009786)
ZzZombo (reporter)
2014-06-29 15:11

Yes? "[myclan] mr. twister" is 20 characters long.
User avatar (0009795)
Dusk (developer)
2014-06-29 20:38

closing after developer discussion: bumping MAXPLAYERNAME is unnecessary and if someone bumps into the buffer limit using color codes they should consider using a simpler color scheme.

Issue Community Support
This issue is already marked as resolved.
If you feel that is not the case, please reopen it and explain why.
Supporters: Leonard WaTaKiD rosking Esum AlienOverlord
Opponents: No one explicitly opposes this issue yet.

- Issue History
Date Modified Username Field Change
2014-06-26 14:24 AlienOverlord New Issue
2014-06-26 18:28 Leonard Note Added: 0009753
2014-06-26 18:29 Leonard Note Edited: 0009753 View Revisions
2014-06-26 21:00 Catastrophe Note Added: 0009756
2014-06-26 22:53 Watermelon Note Added: 0009760
2014-06-27 19:21 Dusk Note Added: 0009763
2014-06-27 19:23 Dusk Note Edited: 0009763 View Revisions
2014-06-27 19:23 Dusk Note Edited: 0009763 View Revisions
2014-06-29 12:48 AlienOverlord Note Added: 0009781
2014-06-29 12:48 AlienOverlord Note Edited: 0009781 View Revisions
2014-06-29 12:48 AlienOverlord Note Edited: 0009781 View Revisions
2014-06-29 14:03 Watermelon Note Added: 0009783
2014-06-29 14:11 AlienOverlord Note Added: 0009784
2014-06-29 14:33 Edward-san Note Added: 0009785
2014-06-29 15:11 ZzZombo Note Added: 0009786
2014-06-29 16:39 Dusk Severity major => minor
2014-06-29 20:38 Dusk Note Added: 0009795
2014-06-29 20:38 Dusk Status new => closed
2014-06-29 20:38 Dusk Resolution open => denied






Questions or other issues? Contact Us.

Links


Copyright © 2000 - 2024 MantisBT Team
Powered by Mantis Bugtracker