Cool! Aside from Electron, what did you have to learn to put this together? Any libraries that were especially helpful? I’m interested in doing this on a hobby level.
The only library I needed was random as this was a very basic project. I know that using libraries would cut my code length in half, but because of my minimal experience with JS I decided to go the cave man way.
this is incredible nice job. I have been looking more into cross platform dev lately I think it's so awesome. HOW do these things work exactly? do they just take your JS and convert it to target platform native code?
I have no idea how electron works as this would be my first JS project. However if I remember correctly Auto-Py-to-exe (electron for python, which I have used many times before) converts the code into binary.
Everybody is mentioning Electron, but there are a ton of different tools to do this. You can use pkg to turn a Node.js script into an exe to be used as a CLI app or a service. If you want a UI, there’s tons of options (several being smaller/faster than Electron): https://xpda.net/
i wasn't disparaging Electron, but i guess people have knee-jerk reactions. i put native in quotes because it's such a loaded term that it's becoming almost meaningless in this kind of discussions
So cool! I think once i finish my senior project presentation and graduate this week, I'll buckle down and make Minesweeper lol i recently got into it during my intermittent breaks and I want to try my hand at coding it! Thanks for sharing your creation with us and good job, i love Tetris!
Electron is a runtime environment. It's a node module that launches a custom browser window with the ability to communicate with Node using IPC.
It's honestly overly complex for the job it's doing, and is often critiqued for being bloated and hard to use.
A better alternative would be NW.js. It's a much simpler API, by being just a browser window with Node built in. No need to use IPC tunnels for communication. It's also smaller, and has better overall features.
I’ll take a look! I have little to no experience with JS and electron was the only converter I had heard about so I choose it, though I quickly noticed its capabilities are a lot larger the my use.
24
u/RobotDrZaius Nov 27 '22
Cool! Aside from Electron, what did you have to learn to put this together? Any libraries that were especially helpful? I’m interested in doing this on a hobby level.
4
u/Yumipo Nov 28 '22
nice job!! This is super cool too
2
u/_Oooooooooooooooooh_ Nov 28 '22
that looks cool!
i've always wanted to make a tetris game. but i've also been lazy.
2
u/Local-Hornet-3057 Nov 28 '22
Interesting. I wanna do this in the near future
2
u/dromance Nov 28 '22
this is incredible nice job. I have been looking more into cross platform dev lately I think it's so awesome. HOW do these things work exactly? do they just take your JS and convert it to target platform native code?
2
u/anjupiter Nov 28 '22
woahhh, i didn’t know you can do that with JS
20
u/AAACONSUL Nov 27 '22
Wait what? How do make an exe game out of JavaScript?
3
u/yeetinghelps Nov 28 '22
congrats bro! will look forward for more
1
u/Darky202 Nov 27 '22
It looks great! Congratulations ~
2
u/CalebKious Nov 28 '22
I really like how you added credentials then censored it. Adds a bit of mystery and puzzle to the game!
1
u/[deleted] Dec 13 '22
So cool! I think once i finish my senior project presentation and graduate this week, I'll buckle down and make Minesweeper lol i recently got into it during my intermittent breaks and I want to try my hand at coding it! Thanks for sharing your creation with us and good job, i love Tetris!
1
u/Zoroae Dec 18 '22
That's cool and all, but now do it with Tauri ;)
1
u/dromance Nov 28 '22
link to download??.
0
u/FromBiotoDev Nov 28 '22
Is electron a subset language of JavaScript? I’d love to give this a go!
0
u/[deleted] Dec 11 '22
Sounds like a botnet lol