A LÖVE (Love2d) template that includes everything you need to develop a game with modern niceties
Mostly just exploring Love2d and some modules. Also trying to wrap my head around how I should structure a game and all it's parts.
git clone https://github.com/james2doyle/love2d-template
cd love2d-template
love .The game starts with a splash page, then goes to the main menu. You can click some of the menu items to go to those other menus. Pressing any button in the credits goes back to the main menu.
Pressing ``` at any time will toggle the debug menu.
- Badr - Simple and easy user interfaces with composable components
- Roomy - Organize your game into "screens" (title/start screen, levels, pause screen)
- Flux (fork) - Fast, lightweight tweening library
- Step - Timer module for interval actions or delayed actions
- Lurker (fork) - Auto-swaps changed files in a running
- Lume (fork) - Helpful functions
- Luacolors - Collection of functions for common colors and conversions
local _sceneName = {}
-- `previous` - the previously active scene, or `false` if there was no previously active scene
-- `...` - additional arguments passed to `manager.enter` or `manager.push`
function _sceneName:enter(previous, ...)
-- set up the level
end
function _sceneName:update(dt)
-- update entities
end
function _sceneName:keypressed(key)
-- someone pressed a key
end
function _sceneName:mousepressed(x, y, button, istouch, presses)
-- someone clicked the mouse
end
-- `next` - the scene that will be active next
-- `...` - additional arguments passed to `manager.enter` or `manager.pop`
function _sceneName:leave(next, ...)
-- destroy entities and cleanup resources
end
-- `next` - the scene that was pushed on top of this scene
-- `...` - additional arguments passed to `manager.push`
function _sceneName:pause(next, ...)
-- destroy entities and cleanup resources
end
-- `previous` - the scene that was popped
-- `...` - additional arguments passed to `manager.pop`
function _sceneName:resume(previous, ...)
-- Called when a scene is popped and this scene becomes active again.
end
function _sceneName:draw()
-- draw the level
end
return _sceneName