Simulating a chat app

Hi,

I’m simulating a live chat app using a file as the text source for the “chat bubbles”. These chat bubbles each consist of a rectangle TOP fed into a text TOP. I then use a timer CHOP who’s onDone callback updates the text in the bubbles and manages text wrapping, sizing, positioning etc according to the new text. The callback also reseeds the timer with a random value every cycle so the replies feel more natural. So far so good with only two bubbles.

My first difficulty has to do with the fact that I obviously will need more than 2 bubbles to display the multiple replies in a long thread. I thought of programatically creating or copying the required OPs to generate the bubbles in a Python loop as new replies are required but this feels a bit tedious. Is there a simpler way of progressively “stamping” new parts onto an image?

My second difficulty is that the virtual chat display must automatically scroll once the replies reach the bottom so that earlier replies disappear at the top to make place for new ones at the bottom. I would know how to do this dynamically in pretty much any regular programming environment but am not sure what the proper TouchDesigner approach to achieving this would be. Currently I’m tempted to MovieOut a series of tiff images containing all the prerendered bubbles once when the app starts. Then I would Over TOP these onto a transparent rectangle until it reaches the bottom edge of the virtual display. From that point each time I add a new bubble I also move up the transparent rectangle a bit. This also feels a bit tedious…

Any simpler suggestions?

Thanks!
Untitled.png

Hey, I’m working on a similar project for instant messaging. My methods are a bit different, but I’m running into the same trouble with scrolling. I’m thinking about using a replicator, to have a fixed number of messages or lines viewable, save the messages in a dictionary, and then have a scroll bar that can load messages into whatever OP I’m replicating to load older messages.

I’m in a super heavy tech week, but I’ll try to post my project soon. Maybe we can find some solutions together.

The irony is I’m currently working on the exact same thing. I’ve taken a very different approach than pure TouchDesigner. There’s an app on iPhone called TextingStory where you can import a background. I imported a green screen and keyed it in Blender so that I could use some TouchDesigner animations in the background. Just an idea if you want a major shortcut. TextingStory has some smooth animations but it does cost for a license.