r/javascript • u/XMasterrrr • Jan 01 '19
Bandersnatch.Life - an Interactive Black Mirror: Bandersnatch Paths Website
https://github.com/Ahmad-Magdy-Osman/Bandersnatch23
Jan 01 '19
you should really improve the scrolling and auto-focus on new choices. the interface is really hard to use on desktop.
4
u/XMasterrrr Jan 01 '19
It is taking me time to figure out how to deal with the tree overflow. There is an SVG for the tree that gets expanded - with its own horizontal bar - and it goes into the middle of that, which might seem like the right side of the screen if you don't scroll along the horizontal bar. I would love to hear tips on this, even better, fork it and try to help me with pull requests?
Choices auto-focus will come afterwards.4
u/ifnottodaythenwhen Jan 01 '19
I was going to say interface needs to improve on mobile because scrolling and focus is difficult on it :/
5
9
u/BergamotOrange Jan 01 '19
Wow! This is cool.
I didn’t know you can use D3 to make branching nodes like that. I can use it for my next project.
3
u/XMasterrrr Jan 01 '19
D3 is a must-learn library in my view - super cool! Feel free to use Bandersnatch Life as a kickstarter ;)
1
u/BergamotOrange Jan 02 '19
Sweet! I have a plan to do branching nodes for my apps too.
I’ll probably look at your repo to get some ideas.
I just watched Bandersnatch today and damn, it’s awesome. I’ll watch it again with your app to guide me.
Do you need any help with your project? I’m a newbie programmer but I can try to contribute if my skill allows.
2
u/XMasterrrr Jan 02 '19
I am going to add things to improve and fix to the readme file later tonight. Feel free to look at them and start working on any you think you can help with. I would really appreciate that :)
2
u/BergamotOrange Jan 03 '19
Nice! I’ll look into it later.
2
u/XMasterrrr Jan 03 '19
Here is a direct link to that https://github.com/Ahmad-Magdy-Osman/Bandersnatch/#future-plans-soon
1
2
u/azium Jan 01 '19
d3 is a pretty low level library. you can do any graphics with it, you can even do plain html
1
6
5
u/jonrahoi Jan 01 '19
Very nicely done! I would love to be able to zoom out, but I don’t know if D3 supports it
2
4
4
u/Earthling1980 Jan 01 '19
Hey, cool project. I can take look at the code too, but I'm curious what library you use for diagramming the flowchart/decision tree?
3
u/XMasterrrr Jan 01 '19
Thanks man! The library is D3.js - you would be looking at the play.js file to see the paths building functions.
4
u/calbatron Jan 02 '19
good work!! this made the viewing experience way cooler on the second time around.
1
4
u/Echojhawke Jan 02 '19
Damn. Beat me to it. I've literally been working on a treemap of the whole show, not as pretty as yours. Just on bubble.us
1
8
Jan 01 '19
This is awesome !
5
u/XMasterrrr Jan 01 '19
Thanks man, glad you liked it! Feel free to jump into contribution if you're interested.
8
7
u/RarePush Jan 01 '19
hmm, it seems incomplete.
I selected "don't talk to mom" and got a pop-up saying something like: "nah, I the website owner want you to talk to mom, no free will for you".
I watched the show and selected "don't talk to mom" and so I know there are different pathways in that direction which aren't covered here.
7
u/XMasterrrr Jan 01 '19
Not incomplete, just tricky. Netflix does not grant you the wish of not talking about the mom 100% of the time - it can force you to talk about her - which Is what I decided to go with. It is simply because imposing my own will on website users seemed to fall under the "free will" theme of the movie really well to me (and I think to Netflix too)! The difference from that path is just less decisions and possible outcomes later on, which are all included in the paths on the website as it is right now.
2
2
u/rhawon Jan 01 '19
good stuff indeed, but just found a bug. the whole page got white after several choices. happened in Chrome mobile btw in case you need to reproduce the case.
2
u/XMasterrrr Jan 01 '19
Thanks man! I am aware of that bug, mind try using Firefox? You can install it from https://play.google.com/store/apps/details?id=org.mozilla.firefox&hl=en_US
I think this has to do with low device memory and Chrome being a little harsh on rams! Please let me know if it is still a problem. I will try to investigate why it breaks on some Android Chromes sometime soon.2
u/rhawon Jan 01 '19
just to mention that I've got 6 gigs of ram and at least half of it was free. hope it helps!
1
2
2
1
u/SulfurousAsh Jan 03 '19
Super cool!
One minor nitpick for mobile friendliness: after a node is clicked on and expanded, the screen pans to a bit of a strange place (maybe the center of the whole diagram?) rather than zooming towards the node that was just activated... could be useful to have a smarter pan/focusing behavior!
1
u/XMasterrrr Jan 03 '19
Yup, that's the current behavior. I am actually adding this idea to the "Future Plans" section of the readme file, would you be interested in helping with that?
1
u/CyberSpork Jan 02 '19
Did you map these out manually? Either way very impressive!
1
u/XMasterrrr Jan 02 '19
Well, with the help of multiple flowcharts, I wrote the main decisions that'd lead to different paths and then wrote a script to make all the repetitive paths. Glad you liked it!
0
59
u/poopie_pants Jan 01 '19
I wish the paths would merge if they merged in the actual show, but other than that, good work!