Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In-Game Chat Issues #10

Open
coyotezin opened this issue Feb 15, 2017 · 9 comments
Open

In-Game Chat Issues #10

coyotezin opened this issue Feb 15, 2017 · 9 comments

Comments

@coyotezin
Copy link

coyotezin commented Feb 15, 2017

I would like if possible, a review of the in-game chat to fix this issues, chat needs to have a minimum size while resizing it so it doesnt stay like 1 letter per text line if you resize too much(can happen accidentally while making it smaller), and also a cap/limit or a horizontal scroll to avoid text getting all the way over/outside the input box.

@Asunaya
Copy link
Owner

Asunaya commented Feb 17, 2017

b20464a adds a minimum size of 10% of your resolution in each dimension.
a2f0243 expands the input field vertically and wraps when the input string is more than one line long.

Let me know what you think about those changes. o:

While we're on the topic, so that I'll remember, here are some other things that should probably be added sometime, off the top of my head:

  • A scroll bar to navigate the history. (The Z button should also expand downwards if the history cursor isn't at the end.)
  • A scrolling animation when adding new lines, like CSGO's chat.
  • Display parts of lines that are occluded. Right now it either displays the line if there's enough vertical space or doesn't display it at all; it should instead display the visible part only.
  • Documentation of the format specifiers (like ^1, etc.) and possibly addition of alphabetical color format specifiers (^a, etc.).
  • Mint integration
  • Add font, font size and color options and save chat position to config.xml.
  • Relative border size.

@coyotezin
Copy link
Author

coyotezin commented Feb 18, 2017

Thanks for the both fixes! Those are really nice and ideas would make the chat even better! The ones i liked the most would be the scrolling animation and mint integration so it would be easier to implement emoticons, also the scrollbar would be nice, can't wait for those to be implemented! Keep it up!

Btw, i've noticed few others issues, if you could take a look to them too would be nice.

Caret not changing position when using arrow keys, the function itself works because you can text where it should be after pressing the arrow keys but caret still at the end of the text. Important: If you press left arrow key to go back a few letters and press the right arrow key to go back to the end, it will crash the game (it crashes somewhere around RFont::EndFont).

The other problem is that when you press the TAB in order to write someone's nickname it only gets one name and you can't choose, for example, 5 players in the room, pressing tab in the chat input would only print the name of 1 of those players and theres no way to choose between them.

Thanks for the attention 😄 👍

Asunaya added a commit that referenced this issue Feb 21, 2017
@Asunaya
Copy link
Owner

Asunaya commented Feb 21, 2017

What a silly bug! Thanks for bringing it to my attention. Should be fixed with 991702b, I think. Let me know if you spot any more issues. (:

As for tab not working, it currently works differently from the normal chat. Tab autocompletes a name. For instance, if players "abcd", "fjds" and "dfa" are in a room, writing "d" and then pressing tab should autocomplete it to "dfa".

I previously had code for having the normal tab player list thing, but at some point I commented it out (see e.g. this) and added the current functionality. I should probably add some option for selecting between them, or something. o.o

I also added some support for Unicode text just now, sample: http://i.imgur.com/ndx3fg5.jpg. There are a bunch of things missing, like right-to-left support, astral plane support, input methods for CJK, etc.; just basic stuff for now.

This could be the basis for emoticon support, by just rendering the unicode emoji characters in a font that supports them. Strings listed e.g. here could be used to input them.

Here are some other things to add:

  • Navigation with up and down arrow keys when the input field is extended
  • Navigation with CTRL + arrow key
  • Forward deletion with delete key
  • Selection with shift and CTRL + A
  • Scrolling history with page up/down
  • Stop expanding the input field when the bottom would stretch outside the screen

@rafadsm
Copy link

rafadsm commented Feb 28, 2017

Hello, I made the chat changes you made too, but when I send a message in the chat, it gets cut off, and the other messages do not appear
See the image: http://prnt.sc/ee86ju

What could be causing this problem?

@Asunaya
Copy link
Owner

Asunaya commented Mar 1, 2017

I don't know. o: Hard to tell when I don't know what code you're using. :X

Looks like Chat::ChatLinesPixelOffsetY isn't decreasing, which SHOULD be done every frame by Chat::UpdateNewMessagesAnimation.

@rafadsm
Copy link

rafadsm commented Mar 1, 2017

I find the problem, I discovered that my OnUpdate was not working properly due to the code in ZApplication::OnUpdate

auto ElapsedTime = m_Timer.UpdateFrame();

	if (Timescale != 1.f)
		ElapsedTime *= Timescale;

i used the default code
fElapsed = ZApplication::m_Timer.UpdateFrame();

I noticed that in window mode, cursor positions to move / scale chat frame are different 😄

Your tips are great and useful for new chat

  • Scrolling history with page up/down
  • Stop expanding the input field when the bottom would stretch outside the screen

Asunaya added a commit that referenced this issue Mar 1, 2017
…r position wrong

The code was using the Windows API GetCursorPos, which gets the global/screen position, i.e. the position over the ENTIRE screen, rather than the position within the client area of the Gunz window (the basis of which can be translated by moving the window, and is already translated by the addition of the border space to the window frame).

The new code uses the MEvent::LatestPos value instead, which is correctly in the client area.

See #10
@Asunaya
Copy link
Owner

Asunaya commented Mar 1, 2017

I find the problem.

Good to hear. ^__^

I noticed that in window mode, cursor positions to move / scale chat frame are different 😄

Woops! That's a pretty obvious bug in retrospect, but I never use bordered windowed mode, only borderless windowed or fullscreen, so I never noticed it. Should be fixed with 3510719. Thanks!

@rafadsm
Copy link

rafadsm commented Mar 1, 2017

Thanks for the correction!

Could you show me which commit to locate:
Misc client stuff

  • Dynamic resource loading -- Clothes are loaded individually as they are required, not loaded all together when you start the game. This reduces load time and memory usage.

About based on unicode emoticons, it is already possible to put emoticons like 😊 ?

@Asunaya
Copy link
Owner

Asunaya commented Mar 2, 2017

Could you show me which commit to locate: ...

I don't think there's any single commit that added only all the stuff relevant to that feature.

I think it's mainly the MeshManager class and some changes to RVisualMesh, along with some other changes that I don't really remember. And the PartsIndexer program, which produces the parts_index.xml.

I'll write some documentation about that stuff sometime, I guess. :o

About based on unicode emoticons, it is already possible to put emoticons like 😊 ?

Nah, I haven't added that stuff yet, sorry.

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

No branches or pull requests

3 participants