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.

Top comments (0)