This project aims to provide easy to dive into templates for starting various love2d projects wihtout having to reinvent the deep plate :D
Copy content of desired sample folder etc "sample4_maid64_eventSystem" to the root folder of your project. If this was your project folder. Copy all content of sample4_maid64_eventSystem and paste it in inLove2d and replace everything, if there are existing files.
FYI:
sample4_maid64_eventSystem is the most mature setup
- UtillityFunctions
- Helper functions, etc: colorpalettes
- sample2_eventSystem
- base setup with eventSystem where you can publish/notify events and from desired place subscibe to event to trigger a action
- sample3_maid64_textbasic
- maid64 scaling for pixel art projects, font is set to look nice to avoid blurred letters, base for text input, work well for textbased game/writing games
- sample4_maid64_eventSystem
- maid64 scaling for pixel art projects, font is set to look nice to avoid blurred letters,, base setup with eventSystem where you can publish/notify events and from desired place subscibe to event to trigger a action
Install VSCode
Install LOVE2D
Make sure Love2d is added to the path
windows key + env
select path -> edit -> new -> add the love folder C:\Program Files\LOVE
open cmd check if love is installed by writing
love .
or
love --version
Install these extensions in VS CODE
Lua by Sumneko
Love2D Support by Pixelbyte Studios
Local Lua Debugger by Tom Blind
windows
Make terminal prints work:
Make a conf.lua file with the below in
REMEMBER TO SET conf.lua:
function love.conf(t)
t.console = true
endfor mac:
if you set t.console = true then a external terminal window will open
In the top of the main.lua file you need to add this, in order to make debugging in VS Code with breakpoints work :
if arg[2] == "debug" then
require("lldebugger").start()
endMake .exe file
https://love2d.org/wiki/Game_Distribution
- Add love.exe to your repo
- Zip all files your project
- Rename filename.zip to -> .love
- Open dir in cmd and run command:
4.1) copy /b love.exe+yourGameFileName.love theNameOfYourExeFileForYourGame.exe
OR if cmd dont work directly with that command try in powershell, that often does the trick then
x) Or open powershell and run command:
x) cmd /c "copy /b love.exe+yourGameFileName.love theNameOfYourExeFileForYourGame.exe"
Script provided by: All credits goes to abhimonk for the script! Script provided by https://itch.io/profile/abhimonk via comment @ https://itch.io/post/10552214 itch page: https://abhimonk.itch.io/ x page: https://x.com/abhisundu
- Place love_web_build.bat in your project folder
- Install node.JS on your system:
- Open your terminal write::
Winget install -e --id OpenJS.NodeJS
- Install love.JS -> https://github.com/Davidobot/love.js/
- Open your terminal:
npm i love.js- Install 7zip:
- Open terminal
winget install -e --id 7zip.7zip-
Edit the script file "love_web_build.bat": modify folders/files in the part
"....zipping up all files into %buildName%.zip"Ideally you put your main.lua in the root of your project and then you make everything else in a sub folder named src. Then you only need to include "src" "main.lua"
echo zipping up all files into %buildName%.zip "C:\Program Files\7-Zip\7z.exe" a %buildFolder%/%buildName%/%buildName%.zip "src" "main.lua"
it could also look like one of my projects:
echo zipping up all files into %buildName%.zip "C:\Program Files\7-Zip\7z.exe" a %buildFolder%/%buildName%/%buildName%.zip "fonts" "sfx" "sprites" "UtillityFunctions" "collision.lua" "conf.lua" "enemy.lua" "event.lua" "gameManager.lua" "inputManager.lua" "maid64.lua" "maid64.png" "main.lua" "player.lua" "sfxManager.lua" "weapon.lua"
-
Double click the love_web_build.bat
- Enter the buildName when promted
- Enter the gameName when promted
- ...Then the script will create a build folder in your project
-
Upload your game to itch.io
- upload your .zip file to itch from the build folder, and mark is file to be played as html, and then add "x" in SharedBufferArraryExport
-
Or test locally with a python webserver
- cd to the build folder and open the folder which are not zipped

- start python server (source: https://github.com/Davidobot/love.js/ under section: Test it)
python -m http.server 8000
- Open any browser and go to: localhost:8000

Now you can play your game locally
- cd to the build folder and open the folder which are not zipped
scaling:
maid64
If you have contributions, please make a pull request ma dudes :)
fonts: m6x11 By Daniel Lissen



