Shinobi Mountain Phase 1 70%
Accomplished a lot of what I want finished for phase 1, uploaded now on the HTML5 version. Combat is finished, the ninjas can kill you, and you can kill them too. Added some sfx for climbing, swinging your sword, hitting and getting hit. I acquired the sfx from here: https://filmcow.itch.io/filmcow-sfx which had a line in the readme saying they don't care if you credit them or not. So guess what? I didn't credit them in the game, sorry folks. I credit you here. Thanks FilmCow. These are great.
Figuring out how to build HTML5 from Love2D was a huge pain, simply for lack of documentation that was transparent enough for a novice like me. After installing all kinds of stuff I didn't need and looking all over, here's how I did it:
https://github.com/Davidobot/love.js (This is the golden ticket, but how to use it was quite obscure to me. It seemed like I needed 3 other builders, and builders for the builders etc [megasource,emscripten] because I don't do anything in JavaScript so none of this was already on my computer. After all that, still didn't work for me, so....)
https://kalis.me/building-love2d-games-web-docker/ - This tutorial got me as far as getting love.js properly installed. I did need to install Node.js (https://nodejs.org/en). The Node.js installer collects a variety of different tools it needs automatically through Powershell. Great, bc I don't know what half that crap does. Once it's installed I could install love.js properly (downloading the stuff from the git repository got me nowhere). Just pop open Admin CMD prompt and run: npm install -g love.js
Next:
https://github.com/pfirsich/makelove - The quickstart in the readme for this Love2D builder was what set me on the right path. Install Python (3.11 at time of this log). Then in cmd prompt (run as Administrator!!) you can properly install 'makelove' with pip3. Once makelove is installed, I created a new directory for my Love2D game with only the files I needed. First, I needed to create a conf.lua (https://love2d.org/wiki/Config_Files) to set the screen dimensions because love.js can't set that internally from the love.window.setMode() function, so I also commented out that function call in my main.lua. My new game directory had main.lua and conf.lua in the base dir, with folders for resources, libraries, and states (my luas for each game state). Exactly what I need for my web-based build and nothing more.
Next:
Following the makelove quickstart guide, I navigated to this new game folder in cmd prompt and ran: makelove --init
I just used this to set the game title pretty much, and kept defaults for everything else including build folder. If you maintain the default for "love_files" then makelove will build with everything in the directory. So having a clean directory with exactly what I want for the game made a lot more sense to my brain than trying to set files in the .toml file. The "target" for makelove is what you want to build for. It defaults to Win32 and Win64. You can add targets in the .toml file but instead of making sure I got that syntax dead on, I used the --help command to find the syntax for running makelove from cmd prompt. There are various options in the parameters, I chose to disable any pre or post build hooks, bc idk what they do man. So I ran makelove like this: makelove -d all lovejs
This creates a build folder, within which is a windows build and a lovejs build, in which folder is a zip file that can be neatly uploaded to itch.io Play in Browser game page. This works, but it had the clunky formatting of lovejs, so I cleared some of that out of the html file by unzipping it, going into the theme folder and deleting the png, clearing out the header and footer data in the css (idk if this is necessary now considering what I did next), then edited the index.html and deleted this line in the header: <link rel="stylesheet" type="text/css" href="theme/love.css">, and changed the canvas width and heigth from 800 and 600 to my custom dimensions. I left all the footer information in because i like the fullscreen button and I want Davidobot to get credit for the geniusness of lovejs.
So maybe if someone is trying to figure out a good process to get their Love2D game onto itch.io play in browser, this devlog can help you. Especially if you're in over your head like I am. All the caveats for lovejs stand, there are a number of Love2D functionalities it does not support, most notably streams, so all your audio will need to be handled as "static". Apparently it doesn't work great with larger games, but for a game this small it is ideal, because it's kind of a pain to download and unzip this old thing just to play for one minute or less.
Get Shinobi Mountain
Shinobi Mountain
The title says it all, and then some...
Status | Released |
Author | Mitsuda4Pres |
More posts
- Shinobi Mountain LogJul 31, 2023
Leave a comment
Log in with itch.io to leave a comment.