multitheftauto / mtasa-blue

Multi Theft Auto is a game engine that incorporates an extendable network play element into a proprietary commercial single-player game.
https://multitheftauto.com
GNU General Public License v3.0
1.38k stars 424 forks source link

Chat improvement #755

Open MrDadosz opened 5 years ago

MrDadosz commented 5 years ago

Original issue

You can't now correct a typo at the beginning of a message and you have to delete everything, write it again or send a message with a typo. In the chat should be "|" character indicating position like in the console. You should be able to change location where you're typing with left/right arrow. If this idea were to be introduced, it would also be possible to remove characters by pressing the "Delete" key (but it should delete character after "|").

Almost every game has this option. Now sometimes is better to use console than chat, Chat should work exactly like a console, but introducing only this change would be a good improvement

Summary

MTA chat system could use some tweaking to make it more user-friendly.

Requested features

CrosRoad95 commented 5 years ago

you can rewrite chat yourself using dx,cef or cegui like some dayz server did it

and add features which you want

MrDadosz commented 5 years ago

I know,I can rewrite everything but it doesn't make sense. Chat in MTA is good but it lacks several functions and you can customize it in the game's settings. That would improve every server, not only mine.

qaisjp commented 5 years ago

I agree that the chat input could do with some improvements.

patrikjuvonen commented 5 years ago

Having done server console input improvements recently I am going to look at this one as well.

4O4 commented 5 years ago

Support for basic selection manipulation and copy / paste keyboard shortcuts would be awesome too... :wink:

Wolfee-J commented 5 years ago

I personally think chat should be totally redone with more functions for server owners to customize it.

qaisjp commented 5 years ago

Total rewrites are unnecessary!

Wolfee-J commented 5 years ago

Total rewrites of 13+ year old code are.

Deltanic commented 5 years ago

No, it is not. It almost never is. Refactor whenever you can because before you know it you'll be breaking more than you want and you'll spend more time fixing bugs/being feature complete than you would otherwise have. As a famous man once said:

It’s important to remember that when you start from scratch there is absolutely no reason to believe that you are going to do a better job than you did the first time.

Joel Spolsky wrote a great post on this matter, I suggest you give it a read. https://www.joelonsoftware.com/2000/04/06/things-you-should-never-do-part-i/

Wolfee-J commented 5 years ago

I'm sorry but that's complete bull crap no matter how you take it. Not only do yo have in mind what could be improved over the previous system but there is also more collective experience to do a newer one. Refactoring old code ends up with a very poor, and unstable product a large chunk of the time.

Deltanic commented 5 years ago

Okay Cody. I'm sure your vast experience means more than what helpful people are trying to tell you. Clearly you're the expert.

4O4 commented 5 years ago

Guys, I'm not saying which one of you is right because actually you both might be - this particular topic (rewrite vs refactor of legacy codebases) has been discussed by many individuals and companies over the world with different conclusions and it is not an easy and obvious problem. There is no silver bullet, it all depends on varying factors.

It seems however that you two don't like each other and you're starting to make the atmosphere toxic which might be discouraging for many current and potential contributors :) Why so serious? There is always a way to make discussions calm, fun and definitely more fruitful. Please either change the tone of your discussion or don't discuss publicly at all (especially if you hate each other). Thanks in advance :)

Haxardous commented 5 years ago

Explaining more deeper. making it behave just like the console functionality as mentioned. those also are rare ways used by people using their keyboards that's much useful. CTRL + A selects everything written, CTRL/Hold + Left/Right Arrows would make you travel faster within your text, Shift + Left/Right Arrows going to select the chosen direction to select faster, CTRL + A /+/ CTRL + X going to delete the sentence and copy it. those are so useful within all servers overall if they get implemented.

Addlibs commented 5 years ago

Up and down arrows to traverse through history (like in F8 console) would also be useful — if for example you write a message that’s too long for /say, or you've been blocked from posting a message because you did it too quickly after a previous message, instead of having to rewrite all of it, you would open up the chatbox, press up and shorten it down or post again, etc.

PlatinMTA commented 5 years ago

It would be also nice that you could select & copy text that was written on the chatbox. Also, what is the function of showing the cursor when chat is open if you can't do anything with it? Weird.

Pirulax commented 3 years ago

Can't we somehow use a CEGUI EditBox?

lopezloo commented 2 years ago

Maybe chat should be rewritten as default resource instead? Just like scoreboard is implemented as resource. Modern multiplayer mods have chats implemented as external scripts.

By implementing it as resource scripters could easily tweak it to own needs.

PlatinMTA commented 2 years ago

Maybe chat should be rewritten as default resource instead? Just like scoreboard is implemented as resource. Modern mutliplayer mods have chats implemented as external scripts.

By implementing it as resource scripters could easily tweak it to own needs.

I think that's a bad idea.

MegadreamsBE commented 2 years ago

Maybe chat should be rewritten as default resource instead? Just like scoreboard is implemented as resource. Modern mutliplayer mods have chats implemented as external scripts. By implementing it as resource scripters could easily tweak it to own needs.

I think that's a bad idea.

Could you elaborate on why you think it's a bad idea from your standpoint? For me personally I'm mostly concerned over the performance but at the same time it would make it more easy for servers to customize. However there is no reason either why we can't have such a resource in place that you could use over the MTA version either way.

patrikjuvonen commented 2 years ago

It would be a big change for existing servers. Certainly not something you'd do on a whim. I don't recommend refactoring it out of MTA at this point.

PlatinMTA commented 2 years ago

Could you elaborate on why you think it's a bad idea from your standpoint? For me personally I'm mostly concerned over the performance but at the same time it would make it more easy for servers to customize. However there is no reason either why we can't have such a resource in place that you could use over the MTA version either way.

For my liking, the scoreboard resource should be a part of MTA and not a resource. You already can create your own chat by simply using showChat(false) and making your own. We could add a copy of the chat as a resource, I wouldn't really mind that, but it'll probably be a waste of time.

It's always advised to not do this because it's slow (dxDrawText without rendertargets gets worse every character, even a simple sentence can drop 5fps). I can't see problems like these happening with the current chat implementation. Scoreboard isn't a good example either, it performs kinda poorly. It has some nice customization tho.

(I would be more inclined in making the F11 map into a resource, it behaves kinda weird sometimes, and it lacks translation making users that don't speak english ask how it works and why they can't see it even when open [they have alpha at 0%]).

Dryxio commented 1 year ago

Bump. MTA chat lacks of those features that would greatly enhance the user experience.

We can't currently select, delete, or edit individual words within a message without having to rewrite the entire message. This can be frustrating, specially when we're used to those features on other platforms.

It will undoubtedly make MTA chat a more user-friendly and efficient.

CrosRoad95 commented 1 year ago

In my opinion default chat should not be part of mta, rather it should be resource. Now instead we focusing on adding features that you can't achive/are hard to achive in lua we are adding fancy feature that few people wants

Haxardous commented 1 year ago

a browser-based or even a CEGUI-based chat would do.

Fernando-A-Rocha commented 1 year ago

a browser-based or even a CEGUI-based chat would do.

In my opinion default chat should not be part of mta, rather it should be resource.

Valid points, but how do we proceed? Let's suppose all Chat features are stripped from MTA code and a new chatbox resource is made. How to make all servers use it?

CrosRoad95 commented 1 year ago

Let's suppose all Chat features are stripped from MTA code and a new chatbox resource is made. How to make all servers use it?

first, make "default chatbox resource", ship it with mta, give ~3 years to migration, delete old chat from code ( make some option to test how server/client will work without build in mta chat )

Fernando-A-Rocha commented 1 year ago

Let's suppose all Chat features are stripped from MTA code and a new chatbox resource is made. How to make all servers use it?

first, make "default chatbox resource", ship it with mta, give ~3 years to migration, delete old chat from code ( make some option to test how server/client will work without build in mta chat )

Waiting for people to migrate doesn't make sense. It should automatically use that new chatbox resource in MTA servers after a certain version.

CrosRoad95 commented 1 year ago

Let's suppose all Chat features are stripped from MTA code and a new chatbox resource is made. How to make all servers use it?

first, make "default chatbox resource", ship it with mta, give ~3 years to migration, delete old chat from code ( make some option to test how server/client will work without build in mta chat )

Waiting for people to migrate doesn't make sense. It should automatically use that new chatbox resource in MTA servers after a certain version.

mta should not touch resources folder at all, if you don't migrate after warnings, your problem. Browsers doing the same, they have 10000x greater user base, they can affect real businesses and they giving shorter window to migrate

Nico8340 commented 2 months ago

If we want to finally overcome this problem, then it is time to develop a suitable solution. I personally think it wouldn't be a bad idea to remove the current implementation and import it as a default resource like the scoreboard, using CEGUI.

However, the owners of the servers should be given a lot of time to make the necessary changes and this would break backwards compatibility. Maybe it's best if we decide to refactor it, but we do it within the project so that the server owners don't have to make any changes.