DEV Community

Zoppatorsk
Zoppatorsk

Posted on

Let's build a multiplayer movie trivia/quiz game with socket.io, svelte and node. devlog #4

Oops, I did it again... I played with events, got lost in the jank

Yet another devlog, this will be a short one.
So yeah, as u can guess from the subtitle things turned into a mess.

Short story.. I dived in and just started code up things and as I have written before my brain don't like event driven code, it likes to think in a more linear way.

I noticed my code started to become smelly jank that I just kept putting band-aids on to make it work (and yes, it was working and i could have made it work, but it wld not have been nice) so I decided to just put a stop to it, better to just back track and do some actual planning.

Now many ppl wld see this as a waste of time not plan before but I don't see it that way, now I know what doesn't work so I still learned something and what I learned is what makes me able to actually make a plan that can work much better.

As i use to say 'failure is always an option' .... heeh..

So I made a plan for all the event junk, not super detailed but should be good enough to get things working as intended.

Behold the master plan.. I think it is rather self-explanatory
master_plan

That's all for today, now watch some Korean series and let the plan sink in until ready to code again!

falafel

Btw I have never tried falafel, is that stuff good? Comment below ;) .. I just had kebab as usual, don't know if I can trust that veggie stuff but I am curious about it.

Sentry blog image

How I fixed 20 seconds of lag for every user in just 20 minutes.

Our AI agent was running 10-20 seconds slower than it should, impacting both our own developers and our early adopters. See how I used Sentry Profiling to fix it in record time.

Read more

Top comments (0)

Cloudinary image

Optimize, customize, deliver, manage and analyze your images.

Remove background in all your web images at the same time, use outpainting to expand images with matching content, remove objects via open-set object detection and fill, recolor, crop, resize... Discover these and hundreds more ways to manage your web images and videos on a scale.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay