Discuss Scratch

--CHA0S_TEST--
Scratcher
11 posts

Single sprite multiplayer glitching fix

Hey y'all. I'm working on a multiple pen engine for a game on my main in the future. But there seems to be some glitching. I have found the source but can't find a solution. I am modding Griffpatch's mmo tutorial engine. I have moved everything to one sprite and is currently 100% pen, but when other players come online, their dot flickers when either moving or staying still. I know the source is that the broadcast is running after erasing the screen, so it lags behind the main render block and therefore flickers. My restraints are that it needs to stay 100% pen, no editing the costumes, and that it all must stay in one sprite. Other than that it needs to stay multiplayer. Thanks! Link: https://scratch.mit.edu/projects/1064314882
LeoDevDeveloper
Scratcher
2 posts

Single sprite multiplayer glitching fix

Hello, can u reply my comment but in spanish? is because i can't help you, because idk english (so much).
--CHA0S_TEST--
Scratcher
11 posts

Single sprite multiplayer glitching fix

from Google translate: Hola a todos. Estoy trabajando en un motor de lápiz múltiple para un juego en mi principal en el futuro. Pero parece haber algunos fallos. Encontré la fuente pero no puedo encontrar una solución. Estoy modificando el motor tutorial mmo de Griffpatch. Moví todo a un objeto y actualmente es 100% lápiz, pero cuando otros jugadores se conectan, su punto parpadea cuando se mueven o permanecen quietos. Sé que la fuente es que la transmisión se ejecuta después de borrar la pantalla, por lo que va por detrás del bloque de renderizado principal y, por lo tanto, parpadea. Mis restricciones son que debe permanecer 100% escrito, sin editar el vestuario, y que todo debe permanecer en un solo objeto. Aparte de eso, debe seguir siendo multijugador. ¡Gracias! Enlace: https://scratch.mit.edu/projects/1064314882
SpyCoderX
Scratcher
1000+ posts

Single sprite multiplayer glitching fix

Maybe put the erase all in its own broadcast? If they are both delayed, will it work?
--CHA0S--
Scratcher
100+ posts

Single sprite multiplayer glitching fix

I’ll try that thanks
--CHA0S--
Scratcher
100+ posts

Single sprite multiplayer glitching fix

SpyCoderX wrote:

Maybe put the erase all in its own broadcast? If they are both delayed, will it work?
That did not work I put the broadcast everywhere that it would theoretically work and the screen showed up blank

Last edited by --CHA0S-- (Sept. 10, 2024 23:39:41)

Malicondi
Scratcher
1000+ posts

Single sprite multiplayer glitching fix

Here's the fixed project: clicky

What I did was take all of the players data, and stuff it in a list for it to be systematically rendered as the clone itself only gets data to render every couple ticks or so which is what causes the flickering. There are comments inside explaining (the best I could) what I did and why it works, and how you can customize it.

Hope this helps!

man I'm so rusty at coding that took longer than it should
--CHA0S_TEST--
Scratcher
11 posts

Single sprite multiplayer glitching fix

I tested it out, with my phone on my main and this account on my computer, and it doesn't work I can't even see the other player.
Malicondi
Scratcher
1000+ posts

Single sprite multiplayer glitching fix

--CHA0S_TEST-- wrote:

I tested it out, with my phone on my main and this account on my computer, and it doesn't work I can't even see the other player.
That's odd, worked perfectly fine for me, I'll check it out and see if anything's wrong when I get back home as I'm now in the car.
--CHA0S--
Scratcher
100+ posts

Single sprite multiplayer glitching fix

Ok thanks
Malicondi
Scratcher
1000+ posts

Single sprite multiplayer glitching fix

I retried it again but it works fine for me and can't seem to replicate the issue you had, try again and see if it works and wasn't a problem with the cloud variables.
--CHA0S--
Scratcher
100+ posts

Single sprite multiplayer glitching fix

I just tried it again and it worked thanks! Idk what happened before tho as to why it didn’t work.
--CHA0S_TEST--
Scratcher
11 posts

Single sprite multiplayer glitching fix

I do have to ask tho what does the x and y inputs do in the render online players custom block do exactly.
Malicondi
Scratcher
1000+ posts

Single sprite multiplayer glitching fix

--CHA0S_TEST-- wrote:

I do have to ask tho what does the x and y inputs do in the render online players custom block do exactly.
Since the players are drawn by the main sprite, i added those x and y inputs so they can go back to their original position and not send the position of the players they are rendering, so you just put your x and y position in those inputs and go back to them at the end of the block.
--CHA0S--
Scratcher
100+ posts

Single sprite multiplayer glitching fix

Alr thanks so much

Powered by DjangoBB