Cheers! There is no code difference. It's meant to be a direct version update. Anything that doesn't work is probably down to wrong ES compiler settings on my part...yetneverdone wrote: ↑Fri Jul 31, 2020 10:20 am Hey awesome work on love.js! Can the README of the repo describe what's the difference between the original love.js?
Love.js - A Direct Emscripten Port
Re: Love.js - Port to LÖVE v11.3
PM me on here or elsewhere if you'd like to discuss porting your game to Nintendo Switch via mazette!
personal page and a raycaster
personal page and a raycaster
Re: Love.js - A Direct Emscripten Port
Davidobot, please help me get your version of love.js working. I tried to follow the instructions but I just don't get it.
Among the stuff I tried:
- Download and unzip "love.js-master.zip"
- Open Visual Studio Code (that's what I usually use when I need to work with npm, but I suck at this)
- Open the "love.js-master\src\release" folder from Visual Studio Code
- Open the Terminal
- npm install (which does a bunch of things)
- love.js .\mygame.love .\myoutputfolder (this just hangs the terminal somehow)
- love.js C:\fullpathto\mygame.love C:\fullpathto\myoutputfolder (same result as above)
I also tried npm install love.js (even though that's not what the readme.md says), and it seems to install something but then I can't manage to call it.
Help? Thanks.
Among the stuff I tried:
- Download and unzip "love.js-master.zip"
- Open Visual Studio Code (that's what I usually use when I need to work with npm, but I suck at this)
- Open the "love.js-master\src\release" folder from Visual Studio Code
- Open the Terminal
- npm install (which does a bunch of things)
- love.js .\mygame.love .\myoutputfolder (this just hangs the terminal somehow)
- love.js C:\fullpathto\mygame.love C:\fullpathto\myoutputfolder (same result as above)
I also tried npm install love.js (even though that's not what the readme.md says), and it seems to install something but then I can't manage to call it.
Help? Thanks.
Zabuyaki, our upcoming beat 'em up: https://www.zabuyaki.com
Re: Love.js - A Direct Emscripten Port
If the love.js call doesn't work for some reason, you can just refer to index.js directly.
So while cd-ed into the directory where love.js is :
Code: Select all
./index.js path/to/game.love path/to/folder
PM me on here or elsewhere if you'd like to discuss porting your game to Nintendo Switch via mazette!
personal page and a raycaster
personal page and a raycaster
Re: Love.js - A Direct Emscripten Port
Thanks, but I'm still stuck. From what I see, love.js and index.js are not in the same folder, and from what I understand, index.js internally calls love.js. index.js is in love.js-master, and love.js is in love.js-master\src\release. So I suppose I should just go to the right folder (and make it my working directory) depending on whether I want to use index.js or love.js.
I'm not even sure what tool to use to cd into the right directory. What do you use? I tried Visual Studio Code (gets stuck after each love.js or index.js command for some reason, forcing me to kill the terminal) and the Node.js or Windows command prompts (both ask me which program to use to open the .js file, and I don't know).
Edit: hmm, maybe I should use Node.js as the application to run the js file. I tried that, but when I do, Node.js opens with a prompt that says "Love file or directory:" (as if it ignored my command parameters which already specify that). I tried putting the full path to my .love file in there, but that only results in Node.js closing instantly. I wonder if that could be due to it not running with admin privileges or something.
I'm not even sure what tool to use to cd into the right directory. What do you use? I tried Visual Studio Code (gets stuck after each love.js or index.js command for some reason, forcing me to kill the terminal) and the Node.js or Windows command prompts (both ask me which program to use to open the .js file, and I don't know).
Edit: hmm, maybe I should use Node.js as the application to run the js file. I tried that, but when I do, Node.js opens with a prompt that says "Love file or directory:" (as if it ignored my command parameters which already specify that). I tried putting the full path to my .love file in there, but that only results in Node.js closing instantly. I wonder if that could be due to it not running with admin privileges or something.
Zabuyaki, our upcoming beat 'em up: https://www.zabuyaki.com
Re: Love.js - A Direct Emscripten Port
The proper folder to be cd-ed into is love.js-master. You're getting confused between love.js the node package and the file. The node package is just called love.js and running the command love.js just runs index.js under the hood. The love.js file found in src/release is the love binary compiled to JS.Stifu wrote: ↑Sat Aug 08, 2020 2:33 pm Thanks, but I'm still stuck. From what I see, love.js and index.js are not in the same folder, and from what I understand, index.js internally calls love.js. index.js is in love.js-master, and love.js is in love.js-master\src\release. So I suppose I should just go to the right folder (and make it my working directory) depending on whether I want to use index.js or love.js.
Um, any terminal where you have access to node should be fine. I use the New Windows TerminalStifu wrote: ↑Sat Aug 08, 2020 2:33 pm I'm not even sure what tool to use to cd into the right directory. What do you use? I tried Visual Studio Code (gets stuck after each love.js or index.js command for some reason, forcing me to kill the terminal) and the Node.js or Windows command prompts (both ask me which program to use to open the .js file, and I don't know).
Good, that means it's working. Just specify the .love file and output folder as command line arguments to running ./index.jsStifu wrote: ↑Sat Aug 08, 2020 2:33 pm Edit: hmm, maybe I should use Node.js as the application to run the js file. I tried that, but when I do, Node.js opens with a prompt that says "Love file or directory:" (as if it ignored my command parameters which already specify that). I tried putting the full path to my .love file in there, but that only results in Node.js closing instantly. I wonder if that could be due to it not running with admin privileges or something.
PM me on here or elsewhere if you'd like to discuss porting your game to Nintendo Switch via mazette!
personal page and a raycaster
personal page and a raycaster
Re: Love.js - A Direct Emscripten Port
Yeah, I'm pretty confused. So that means the node package is just optional, if I understand correctly. I'll ignore it then.Davidobot wrote: ↑Sat Aug 08, 2020 7:21 pm The proper folder to be cd-ed into is love.js-master. You're getting confused between love.js the node package and the file. The node package is just called love.js and running the command love.js just runs index.js under the hood. The love.js file found in src/release is the love binary compiled to JS.
As I said, my command arguments seem to get ignored.
I run this, for example:
Code: Select all
.\index.js C:\zabuyaki.love C:\Zabuyaki
Sorry for being dumb. By the way, I'm on Windows 7, I wonder if that could be a problem.
Zabuyaki, our upcoming beat 'em up: https://www.zabuyaki.com
Re: Love.js - A Direct Emscripten Port
How about if you pick node to the default program? Or call from the node terminal (why does Windows have so many?!)
"npm install" installs dependencies so it's not optional, as far as I'm aware.
No worries at all. This exchange could be useful to others. If you'd like, you can pm me the file and I can do the conversion for you, to even test if the game will run in Web.
PM me on here or elsewhere if you'd like to discuss porting your game to Nintendo Switch via mazette!
personal page and a raycaster
personal page and a raycaster
Re: Love.js - A Direct Emscripten Port
Oh, that changes things a bit! Instead of opening a new Node.js window, this makes everything stay in the Node.js command prompt.
Here's what I get:
Code: Select all
C:\Users\Blabla\love.js-master>.\index.js --title Zabuyaki C:\zabuyaki.love C:\Zabuyaki
Love file or directory: C:\zabuyaki.love
Output directory:
C:\Users\Blabla\love.js-master>
Yeah, that's already what I do by default.
I think I'm good on that side. My node_modules folder is filled with 205 folders for a total of 20 MB.
Thank you. Well, I think we're close to getting it to work, so let's keep trying.
Maybe I should just record a video of everything I'm doing and send it to you. Maybe then you'll see what I'm doing wrong.
Edit: done recording that video, and sent it to you. Thanks.
Zabuyaki, our upcoming beat 'em up: https://www.zabuyaki.com
Re: Love.js - A Direct Emscripten Port
I'll post it here because I think it's useful for everyone. Once you install Node, make sure it's included in PATH (such that you can run node and npm in normal terminal).
Then, after running npm install just run
Code: Select all
node index.js game.love game_folder
EDIT: I also updated the github readme. Doing npm link makes the command love-js (I renamed it) globally-accessible.
PM me on here or elsewhere if you'd like to discuss porting your game to Nintendo Switch via mazette!
personal page and a raycaster
personal page and a raycaster
Re: Love.js - A Direct Emscripten Port
I double checked and that was already the case.
This worked! Hooray! Thank you very much.Davidobot wrote: ↑Sun Aug 09, 2020 8:39 am Then, after running npm install just runCode: Select all
node index.js game.love game_folder

That's cool. I hope that helps other people.
Zabuyaki, our upcoming beat 'em up: https://www.zabuyaki.com
Who is online
Users browsing this forum: No registered users and 0 guests