Earlier quoted context omitted.
I wonder if it would be more instant if they used postMessage api instead of going over network.
Any local network usage should be nearly instantaneous. My personal theory about the lag is that positioning the window is not synchronized to the JS thread, so the window moves before the JS thread is aware, which means you see the square move after the window has already moved.
Show HN: I saw this mind-blowing experiment, so I made a simple version of it
121–130 of 140 posts
Re: Show HN: I saw this mind-blowing experiment, so I made a simple version of it
#122Two more examples of multiple windows as a single unit. This time on the video game side. (Ludum Dare 35 Overall Winner) WindowFrame: https://youtu.be/CY7NUHn6GQg?t=273 Window Kill: https://youtu.be/7iP68FZWVxM?t=160
Metal Marines, a 1993 game with multiple windows that interact with each other: https://youtu.be/KiiAUP1fG14?t=297
Re: Show HN: I saw this mind-blowing experiment, so I made a simple version of it
#123Earlier quoted context omitted.
Pretty sure this is tongue-in-cheek, given the commenter (pretty high profile dev who creates a lot of cool stuff and does not shy away from using other open source code!) :)
Aw I thought it would be obvious :( Thanks for clarifying, of course nobody makes anything without being inspired from something that already existed, at least to a degree. I guess it's hard to accurately convey sarcasm online, thanks again!
Re: Show HN: I saw this mind-blowing experiment, so I made a simple version of it
#124Earlier quoted context omitted.
Why is it over a websocket? Can't it just share local data?
those were my thoughts too You can use Broadcast Channels as well as Service Workers, even WebRTC would use a loopback interface!
Re: Show HN: I saw this mind-blowing experiment, so I made a simple version of it
#125Re: Show HN: I saw this mind-blowing experiment, so I made a simple version of it
#126That's a great demo! I'd be curious to see how this would work with multiple monitors. Also, thank you for voluntarily acknowledging that you were directly inspired by somebody else and giving them credit - the software industry could use more people like you.
Here the original creator is demoing the behavior on multiple monitors
Re: Show HN: I saw this mind-blowing experiment, so I made a simple version of it
#127Re: Show HN: I saw this mind-blowing experiment, so I made a simple version of it
#128But… why does it lag? Shouldn’t this be trivial enough to be instant?
Even if we move to native world, making two different windows do the same instantly is not always trivial. For example, there have been articles about GUI toolkits making it impossible to have smooth window resizing. If we make everything ourselves (say, immediate drawing in response to WM_PAINT), we can only hope that the system notifies windows quickly, and that performance available is enough to pump bitmaps to screen. Or, better, we can try to use system-wide software or hardware compositor, add layers for individual objects, and only change their coordinates. Then we rely on compositor being good enough to handle 60/120/144/whatever updates per second when it's needed.
Re: Show HN: I saw this mind-blowing experiment, so I made a simple version of it
#129Might as well link to the original / "stolen from" author's equivalent demo with Three.js (open this in multiple overlapping windows) - https://bgstaal.github.io/multipleWindow3dScene/ - and repo - https://github.com/bgstaal/multipleWindow3dScene/
3 days old, twitter one seems 4 days old, who stole from who? Anyway nice repo, thanks for sharing!
Re: Show HN: I saw this mind-blowing experiment, so I made a simple version of it
#130> The original work by Bjorn Staal https://twitter.com/_nonfigurativ_/status/172732259457002734 used localStorage, but I found sockets more fun, because if tweaked a bit, this can be shared with friends. Anyone have a link to what this was? The tweet is gone.
It's missing a digit at the end, original tweet: https://twitter.com/_nonfigurativ_/status/172732259457002734... / https://nitter.net/_nonfigurativ_/status/1727322594570027343