tducasse / lovevania

A metroidvania template in Love2d

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

mvania

A metroidvania template in Love2d.

Setup

Prerequisites

  • Love2d 11.4
  • a recent enough make (can be installed with chocolatey on windows for example; more info here)
  • if you plan on deploying to itch.io, butler - run butler login before you use the Makefile
  • if you plan on bundling for web, a compatible version of Node.js, since we use love.js.

Folder structure

This project is set up to use love-deploy. Follow the README there to set everything up the way it should!

# project folder for Love projects
- myLoveProjects
  - love_deploy_makefile_here
  - your_project_here/
    - project_Makefile_here

Third party software we use

What's included

Not included, but easy to add:

Quick breakdown of the codebase

Misc files

.vscode/ folder

  • extensions.json lists recommended extensions
  • settings.json sets a few things like autoformatting, Lua Autocompletion, etc

lua-format.yaml

This is a list of rules used to enforce a standard coding style.

lib/ folder

This is where you find all the libraries we have installed. While it is possible to fetch them from GitHub using submodules or a package manager, it's often safer to just download them and include them in this folder. You'll notice that some libraries depend on other libraries, like peachy does on tween for example, which explains why we have tween.lua in this folder.

assets/ folder

Put anything related to art (sounds, music, pngs, aseprite json, etc) in this folder.

src/ folder

globals.lua

You can think of this as a way to define both global variables as constants, where tables would be less ambiguous and risky than strings for example (signal names are a good example), but also config values, like screen and game sizes.

entities/ folder

This is where we put all the actors in the game: enemies, player, items, projectiles, etc. We also use classic, a lightweight OOP library for Lua, which allows us to define classes and extend them as we want.

screens/ folder

This project uses ScreenManager (more info here to manage scenes/states/screens/whatever you want to call them. Each one of the files inside this folder is an instance of Screen, which redefines the Love2d callbacks such as update and draw.

main.lua

This is where it all starts! Also have a look at conf.lua, which holds the config for the Love engine; more info here.

About

A metroidvania template in Love2d

License:MIT License


Languages

Language:Lua 97.6%Language:HTML 2.4%Language:Makefile 0.0%