Guys, how do i make scroll chat?

0 favourites
From the Asset Store
All popular touch mechanics - scrolling, zooming, swiping
  • Guys, hi everyone!

    Here is the problem-> I've created a photon-based multiplayer game and it's has a chat. so i want to make such thing - on incoming or outgoing messages it should be created some sprite as a background and text object with message text. as in viber or whatsap and they must be scroll-controlled, for i can see the history of chat. any ideas?

    in this momnet it's made by using textbox as text area. but it's looks like a piece of shit.

  • Refer to the Multiplayer chat example included in Construct 2.

    Go to File -> New -> Multiplayer chat example

    In the "Chat event" event sheet, under the group "Chat log", you can see that it uses a Textbox, set to read-only, where you set the text in a function to "Self.Text & newline & Function.Param(0)" and scroll to the bottom.

    Each time, you want to add something to the chat, call the function with the Parameter containing the text you want to add.

  • No man, it's the same shit =/

    At now i using exactly this. (self.text and so on).

    and i need - such scroll, as in messengers (viber, hangouts, whatsapp) - when 'on any message' there is creating new sprite blok with text object on it and it's scrolling. get it?

    for example ==>>>

  • so many views but still no help in use =/

    more suggestios?

  • up

  • Sorry, but we have a private life too and don't spend our time waiting for someone to post a thread to answer it immediately.

    I'm working on it, just so you know.

  • There you go: ... atsUp.capx

    This is only sending stuff, not including receiving messages.

    I did it as fast as possible, since you are apparently in a hurry.

    But adding it won't be hard.

    (if you need help though and got the time, tell me)

    [EDIT] Updated link to .capx with requested scrolling

  • oh my god! thanx man!

    But link is inactive.

    404 error =(

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Sorry about that, I edited my post, link should work now.

  • randomly great example!

    but how ca i make it scrolling by touch (for examle - when i need to read a history of messages)?

  • Updated my original .capx post.

    You can now scroll the chat while restricting the scrolling intelligently to specific scenarios (see comments in .capx)

    This version logs messages to a dictionary but the history of the chat only goes as far as the layout's "margin" setting is set.

    I could include a "load from dictionary" when the user tries to look at messages that are longer past than the margin goes.

    But that would be a hell of work.

    I won't try to replicate a full messenger here. If you want to, go ahead, but I'd say this is quite a base to start from.

    With a margin of 2000, this version will be able to save around 100 one-line messages.

    I don't know how much a higher margin (i.e. more objects being in the layout but not on screen) affect the performance, but that's to you to figure out.

  • randomly Any suggestions?

  • I'm using php server to send and recieve messages. So,they keeped in db,which created automatically for each user. All i use now-textarea,where all history is showing. I'm understand,that i should extend height of layer,where message-sprotes (from your example) are created for every created object and besides that-should use scrolly. I have already made scrolly. But can't discover how to connect your system with my scroll-system

  • Sorry, I can't really grasp what you are saying.

    Are you saying that you need to combine your message database to the C2 layout?

    I have no experience with PHP, so you'll need to tell me how you access your PHP database and how you receive and send every user's messages dependent on the timestamp..

  • randomly no, your link isn't work again =(

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)