- Windows
Hey what part of the code is deleting the unseen messages? Tryna create a scroll feature for the chat since I'm not that good at coding to the point where I could make my own...
Hey what part of the code is deleting the unseen messages? Tryna create a scroll feature for the chat since I'm not that good at coding to the point where I could make my own...
Why did you delete a post then made the same post?
messages.shift() is what does it however with enough messages this can eventually break your project without a limiter if you aren't a strong programmer to begin with i advise against this
Fluffypoopo it was because I posted it on discussions rather than question... my bad oops
Varrience I am thinking of limiting it by time on there so after like a day or two it will disappear.. its a small chatroom for only my friends.
Nxjfjhdhdhdhdnj could have asked me to change it
Fluffypoopo didn't know that sorry
Nxjfjhdhdhdhdnj it is fine but now you know
also @Varrience I am not super bad at coding... just never really did any server based stuff
ah, i see well mess around with it for a bit and see how it turns out, you may also want a way to pause current messages from loading when looking at older messages because it will most likely move them every time someone posts something new.... you also have to account for how many messages you want to render at a time CDO's draw calls are limited! so saving those draw calls pretty much boosts performance drastically i would most likely go with 10 at a time though you could do more depending on how you do it otherwise it will be a nightmare for how you want your messages to archive, for removing messages by time there should be an occasional loop that checks around every 10 seconds or so to delete any messages based passed the time limit by subtracting the current time from the message time then deleting it if it exceeds the threshold. it'll be a lot of work is what i am trying to say for it to run optimally
Varrience that is true. Maybe instead of a scroll feature I could save more text to an array rather than drawing a million text boxes, and just shift the text around. This could make it so it still saves the info while saving on draw space… idk how this would affect code.org though, but I feel this is the best solution CPU and Server wise. Though me being only in my 3rd year of coding may just not be seeing something here…
Nxjfjhdhdhdhdnj
https://studio.code.org/projects/gamelab/kQvHjWXaASXUvc_YbNCY0UeFmpqRi1Slg6Jg8YaKsc8/view
here's a basic outline for a chatapp with nothing unnecessary
it has scrolling so you can try to learn from it if you want
Thx I’ll mess around with this and try to get it to work
I will also maybe experiment on this as well. Let's see what happens.
Every time I say experiment I always just imagine myself in a science lab experimenting with my beakers and flasks. My imagination is actually very interesting.