zzgames / loen

high-level framework for love2d

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

About

Loen is a high-level framework for Love2D that comes with an editor
Loen is made for fun so it kinda sucks(especially the code)
Inspired by Unity, Gii, Hippo and Pikuma's course

Example screenshot

Usage

! Note !

This whole README uses examples of aliased cli, so if you skipped that step, instead of cli use python cli.py

cli

cli is a command line tool to manipulate with the project, written in python. With it you can generate the build files, build the project into an executable, run the project etc.

You can use cli help to get help

Alias cli on Linux (optional)

Here is the full cli build command:

python cli.py build

But following the instructions below you can use that instead:

cli build

In the loen's directory, run these commands:

chmod +x ./sh/setup_alias.sh # make the shell script executable
./sh/setup_alias.sh          # execute the script
source ~/.bash_aliases       # update the alias

Alias cli on Windows (optional)

The only way to use the aliased cli on windows is using WSL. The WSL steps are the same as the linux ones

Dependencies

Windows

You will also have to add the path to the msbuild.exe in the Environment Variables. The path probably is C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin

Ubuntu/Debian-based

sudo add-apt-repository ppa:bartbes/love-stable
sudo apt install python3 build-essential libgl-dev libglfw3-dev love

Run the editor

Generate the build files

cli gen

You can choose a custom generator using the generator flag

cli gen --generator=vs2019

For windows the default generator is vs2022, for *nix it's gmake2

Build the project

cli build

You can choose the build configuration using the config flag

cli build --config=debug   # for the debug build
# or
cli build --config=release # for the release build

The default configuration is debug

Run the executable

cli run

ye

(Additional) Clear the build files

If for any reason you need to clear all of the build files, you can use the command below

cli clear

Game folder

The actual game is located in the game folder

Structure

.vscode          - vs specific settings (not gitignored because maybe it'll help someone)
editor           - editor's code
externals        - libraries used for the editor
game             - actual game files
loen             - the actual high-level framework
love             - love executables
modules          - modules for the framework
premake          - premake executables
sh               - shell scripts
tools            - cli tools
.gitignore       - files git should ignore
cli.bat          - run wsl
cli.py           - the main cli script
cli.sh           - idk tbh
conf.lua         - the game configuration
customLoader.lua - (lua module loader)[http://lua-users.org/wiki/LuaModulesLoader]
imgui.ini        - imgui specific stuff
main.lua         - the main love2d script
premake5.lua     - building configuration
README.md        - the file you're reading right now :)
TODO.md          - tasks to do

About

high-level framework for love2d

License:MIT License


Languages

Language:Lua 52.3%Language:C++ 44.8%Language:Python 2.6%Language:Shell 0.3%Language:Batchfile 0.0%