Compare commits

..

No commits in common. "7fd8db592d51e5045c6b56215b7129e1415cb539" and "69a567e4c2429cd3cfd5c56c07d0446cffa06c22" have entirely different histories.

170 changed files with 174 additions and 193 deletions

View file

@ -3,7 +3,7 @@
"love",
"loadstring",
"unpack",
"framework",
"birb",
"utils",
"core",
"scenes",

View file

@ -7,7 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## Unreleased
- Project renamed to Epervier Framework and rebased entirely on Sonic Radiance codebase
- Project renamed to Birb and rebased entirely on Sonic Radiance codebase
- New loading system
@ -25,7 +25,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- **core/input:** extract virtualpads from the input controller
- **core:** The core is now separated from the rest of the framework
- **core:** The core is now separated from the rest of birb
- **core+assets:** Music are now managed directly by the core

View file

@ -1,40 +1,20 @@
# Épervier Framework
# Birb Love2D Engine
The Épervier Framework is an RPG-oriented framework for Love2D. It aim to work as a set of managers to automatically handle inputs, screen, and several utilities to make game developpement easier and less repetitive. It's also specialized in game with RPG mechanics, with functions to serialize/deserialize easily datas.
Birb aim to be an integrated, simple engine for love2D, in replacement of my old "gamecore" love2D engine. It aim to work as a set of managers to automatically handle inputs, screen, and several utilities to make game developpement easier and less repetitive. It's also specialized in game with RPG mechanics, with functions to serialize/deserialize easily datas.
Épervier use [Classic](https://github.com/rxi/classic/) as its base Object.
Birb use [Classic](https://github.com/rxi/classic/) as its base Object.
## Core features
## How to load Birb
Épervier provide a lot of feature that can be usefull to create an RPG. This is a non-exhaustive list of what the framework can do :
The birb engine must be located in the `birb/` folder to work. After that, all you have to do is to load a gamecore based engine and then.
- Scene system to be able to change your gameplay easily, with transitions
- Easy data loading and parsing via the core.data module
- A save system using data serialization
- Tweening and time support via tween.lua
- A world system with support for camera, multiple hitbox per actor, and two type of physics (bump2D and bump3D) and tiled map loading (via sti.lua)
- A GUI system to make your game more easily have HUD and menus
- Several utilities functions
Note : the `birb` and `utils` global namespace will be used by birb.
## How to load Épervier
````
require "birb"
The framework must be located in the `framework/` folder to work. After that, all you have to do is to load a gamecore based engine and then.
Note : the `framework`, `core`, `game` and `utils` global namespaces will be used by the framework.
```lua
require "framework"
function love.load(args)
framework.start("game", args)
function love.load()
birb.startCore()
end
```
### Launch in debug mode
To launch in debug mode, the love2D game must be launched with a DEBUGLEVEL bigger than 1, for instance :
```sh
love ./examples DEBUGLEVEL=4
```
````

View file

@ -23,7 +23,7 @@
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
]]
local Rect = require "framework.classes.2D.rect"
local Rect = require "birb.classes.2D.rect"
local IndexedRect = Rect:extend()
function IndexedRect:new(origin, ox, oy, w, h)

View file

@ -21,7 +21,7 @@
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
]]
local Point = require "framework.classes.2D.point"
local Point = require "birb.classes.2D.point"
local Rect = Point:extend()
function Rect:new(x, y, w, h)

View file

@ -21,7 +21,7 @@
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
]]
local Point = require "framework.classes.3D.point3D"
local Point = require "birb.classes.3D.point3D"
local Box = Point:extend()
function Box:new(x, y, z, w, h, d)

View file

@ -23,7 +23,7 @@
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
]]
local Rect = require "framework.classes.2D.rect"
local Rect = require "birb.classes.2D.rect"
local IndexedRect = Rect:extend()
function IndexedRect:new(origin, ox, oy, oz, w, h, d)

View file

@ -28,7 +28,7 @@
]]
local Predicate = Object:extend()
local SimplePredicate = require "framework.classes.predicate.simple"
local SimplePredicate = require "birb.classes.predicate.simple"
function Predicate.createPredicate(data, solver, asker)
local predicate = nil

View file

@ -34,7 +34,7 @@ local SEPARATOR = ":"
local NOT = "not"
local DEFAULT = "default"
SimplePredicate.utils = require "framework.classes.predicate.utils"
SimplePredicate.utils = require "birb.classes.predicate.utils"
function SimplePredicate:new(data, solver, asker)
self.solver = solver

View file

@ -20,9 +20,9 @@
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
]]
local Serializable = require "framework.classes.serializable"
local Serializable = require "birb.classes.serializable"
local Serializer = Serializable:extend()
local binser = require("framework.libs.binser")
local binser = require("birb.libs.binser")
function Serializer:new(serializeFields, listSerializable)
Serializer.super.new(self, serializeFields, listSerializable)

View file

@ -1,4 +1,4 @@
local Timer = require "framework.classes.time.timer"
local Timer = require "birb.classes.time.timer"
local TimedFunction = Timer:extend()
function TimedFunction:new(actor, name, func, t)

View file

@ -1,6 +1,6 @@
-- time.lua :: a timer, tweener and timed switch handler.
-- This class need framework.libs.tween to work
-- This class need birb.libs.tween to work
--[[
Copyright © 2019 Kazhnuz
@ -25,9 +25,9 @@
local TweenManager = Object:extend()
local tween = require "framework.libs.tween"
local Timer = require "framework.classes.time.timer"
local TimedFunction = require "framework.classes.time.func"
local tween = require "birb.libs.tween"
local Timer = require "birb.classes.time.timer"
local TimedFunction = require "birb.classes.time.func"
function TweenManager:new(subject)
self.subject = subject

View file

@ -24,8 +24,8 @@
]]
local DataManager = Object:extend()
local DataPack = require "framework.classes.datapack"
local Parser = require "framework.classes.parser"
local DataPack = require "birb.classes.datapack"
local Parser = require "birb.classes.parser"
local index = require "datas.gamedata.index"
function DataManager:new(core)

View file

@ -38,7 +38,7 @@ function DebugSystem:new(controller, debugLevel)
self.debugLevel = debugLevel or Levels.WARNING
self.active = (self.debugLevel == Levels.DEBUG)
if (self.active) then
lovebird = require "framework.libs.lovebird"
lovebird = require "birb.libs.lovebird"
lovebird.update()
end
end

View file

@ -21,7 +21,7 @@
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
]]
local Serializer = require "framework.classes.serializable.serializer"
local Serializer = require "birb.classes.serializable.serializer"
local OptionsManager = Serializer:extend()
local TRANSLATION_PATH = "datas/languages/"

View file

@ -24,7 +24,7 @@
local ScreenManager = Object:extend()
local CScreen = require("framework.libs.cscreen")
local CScreen = require("birb.libs.cscreen")
-- INIT FUNCTIONS
-- Initialize and configure the screen manager

View file

@ -21,7 +21,7 @@
]]
local Serializer = require "framework.classes.serializable.serializer"
local Serializer = require "birb.classes.serializable.serializer"
local GameSystem = Serializer:extend()
local VAR_TO_SERIALIZE = {

View file

@ -1,5 +1,4 @@
-- framework :: The main Épervier Framework script, loading the core and main
-- utilities
-- birb :: The main birb script, loading the core and main utilities
--[[
Copyright © 2021 Kazhnuz
@ -22,32 +21,32 @@
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
]]
framework = {}
birb = {}
-- GLOBAL UTILS/FUNCTION LOADING
-- Load in the global namespace utilities that'll need to be reusable everywhere
-- in the game
Object = require("framework.libs.classic")
utils = require("framework.utils")
enum = require("framework.utils.enum")
Object = require("birb.libs.classic")
utils = require("birb.utils")
enum = require("birb.utils.enum")
framework.Core = require("framework.core")
birb.Core = require("birb.core")
function framework.start(gamemodule, args)
framework.startCore(args)
function birb.start(gamemodule, args)
birb.startCore(args)
if (gamemodule ~= nil) then
framework.startGame(gamemodule)
birb.startGame(gamemodule)
end
end
function framework.startCore(args)
core = framework.Core(args)
function birb.startCore(args)
core = birb.Core(args)
end
function framework.startGame(gamemodule)
function birb.startGame(gamemodule)
local GameObject = require(gamemodule)
game = GameObject()
end
require("framework.callbacks")
require("birb.callbacks")

View file

@ -1,4 +1,4 @@
local Parent = require "framework.scenes.gui.elements.drawable"
local Parent = require "birb.modules.gui.elements.drawable"
local AssetElement = Parent:extend()
function AssetElement:new(name, assetType, assetName, x, y,r,sx,sy,ox,oy, opacity)

View file

@ -1,4 +1,4 @@
local Parent = require "framework.scenes.gui.elements.parent"
local Parent = require "birb.modules.gui.elements.parent"
local CanvasElement = Parent:extend()
function CanvasElement:new(name, x, y, w, h, r,sx,sy,ox,oy, opacity)

View file

@ -1,4 +1,4 @@
local Parent = require "framework.scenes.gui.elements.parent"
local Parent = require "birb.modules.gui.elements.parent"
local ColorElement = Parent:extend()
function ColorElement:new(name, r, g, b, opacity)

View file

@ -1,4 +1,4 @@
local Parent = require "framework.scenes.gui.elements.parent"
local Parent = require "birb.modules.gui.elements.parent"
local CompositeElement = Parent:extend()
function CompositeElement:new(name, x, y, childrenList)

View file

@ -1,4 +1,4 @@
local Parent = require "framework.scenes.gui.elements.variable"
local Parent = require "birb.modules.gui.elements.variable"
local CounterElement = Parent:extend()
function CounterElement:new(name, fontName, object, varName, nbrs, x, y, align)

View file

@ -1,4 +1,4 @@
local Parent = require "framework.scenes.gui.elements.parent"
local Parent = require "birb.modules.gui.elements.parent"
local DrawableElement = Parent:extend()
function DrawableElement:new(name, drawable, x, y,r,sx,sy,ox,oy, opacity)

View file

@ -1,7 +1,7 @@
local Rect = require "framework.classes.2D.rect"
local Rect = require "birb.classes.2D.rect"
local GuiElement = Rect:extend()
local TweenManager = require "framework.classes.time"
local TweenManager = require "birb.classes.time"
function GuiElement:new(name, x, y, w, h)
GuiElement.super.new(self, x, y, w, h)

View file

@ -1,4 +1,4 @@
local Parent = require "framework.scenes.gui.elements.parent"
local Parent = require "birb.modules.gui.elements.parent"
local TextElement = Parent:extend()
function TextElement:new(name, fontName, text, x, y, align)

View file

@ -1,4 +1,4 @@
local Parent = require "framework.scenes.gui.elements.drawable"
local Parent = require "birb.modules.gui.elements.drawable"
local TileElement = Parent:extend()
function TileElement:new(name, assetName, id, x, y,r,sx,sy,ox,oy, opacity)

View file

@ -1,4 +1,4 @@
local Parent = require "framework.scenes.gui.elements.text"
local Parent = require "birb.modules.gui.elements.text"
local VariableElement = Parent:extend()
function VariableElement:new(name, fontName, object, varName, x, y, align)

View file

@ -23,12 +23,12 @@
local Gui = Object:extend()
local ElementList = require "framework.scenes.gui.mixins.elements"
local ScreenList = require "framework.scenes.gui.mixins.screens"
local ElementList = require "birb.modules.gui.mixins.elements"
local ScreenList = require "birb.modules.gui.mixins.screens"
Gui:implement(ScreenList)
Gui:implement(ElementList)
local TransformDataStruct = require "framework.structures.tween"
local TransformDataStruct = require "birb.structures.tween"
function Gui:new(scene)
self.scene = scene

View file

@ -26,7 +26,7 @@ local cwd = (...):gsub('%.grid$', '') .. "."
local Menu = require(cwd .. "parent")
local GridBox = Menu:extend()
local View2D = require "framework.scenes.gui.menus.views.view2D"
local View2D = require "birb.modules.gui.menus.views.view2D"
-- INIT FUNCTIONS
-- Initialize and configure the menu

View file

@ -1,5 +1,5 @@
local MenuModel = Object:extend()
local Page = require "framework.scenes.gui.menus.model.page"
local Page = require "birb.modules.gui.menus.model.page"
local function updateWidgetByOrder(a, b)
if a.order ~= b.order then

View file

@ -21,12 +21,12 @@
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
]]
local GuiElement = require "framework.scenes.gui.elements.canvas"
local GuiElement = require "birb.modules.gui.elements.canvas"
local Menu = GuiElement:extend()
local MenuModel = require "framework.scenes.gui.menus.model"
local MenuModel = require "birb.modules.gui.menus.model"
local menuUtils = require "framework.scenes.gui.utils"
local menuUtils = require "birb.modules.gui.utils"
-- INIT FUNCTIONS
-- Initialize and configure functions.

View file

@ -21,7 +21,7 @@
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
]]
local View1D = require "framework.scenes.gui.menus.views.view1D"
local View1D = require "birb.modules.gui.menus.views.view1D"
local View2D = View1D:extend()
function View2D:new(colNumber, lineNumber)

View file

@ -24,7 +24,7 @@
local Widget = {}
-- Add the widget as subvariable to the returned table
Widget.Base = require "framework.scenes.gui.menus.widgets.base"
Widget.Text = require "framework.scenes.gui.menus.widgets.text"
Widget.Base = require "birb.modules.gui.menus.widgets.base"
Widget.Text = require "birb.modules.gui.menus.widgets.text"
return Widget

View file

@ -20,7 +20,7 @@
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
]]
local BaseWidget = require "framework.scenes.gui.menus.widgets.base"
local BaseWidget = require "birb.modules.gui.menus.widgets.base"
local TextWidget = BaseWidget:extend()
-- TEXT WIDGET

View file

@ -1,11 +1,11 @@
local GuiScreen = Object:extend()
local ElementList = require "framework.scenes.gui.mixins.elements"
local ElementList = require "birb.modules.gui.mixins.elements"
GuiScreen:implement(ElementList)
local TweenManager = require "framework.classes.time"
local ScreenSet = require "framework.scenes.gui.screen.screenset"
local TweenManager = require "birb.classes.time"
local ScreenSet = require "birb.modules.gui.screen.screenset"
local elementDataStruct = require "framework.structures.elementData"
local elementDataStruct = require "birb.structures.elementData"
function GuiScreen:new(name)
self:initWrapper()

View file

@ -24,10 +24,10 @@
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
]]
local ListBox = require "framework.scenes.gui.menus.listbox"
local ListBox = require "birb.modules.gui.menus.listbox"
local TextMenu = ListBox:extend()
TextMenu.baseWidgets = require "framework.scenes.gui.textmenu.widgets"
TextMenu.baseWidgets = require "birb.modules.gui.textmenu.widgets"
local BASE_PADDING = 8

View file

@ -21,7 +21,7 @@
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
]]
local TextMenuWidget = require "framework.scenes.gui.textmenu.widgets.basic"
local TextMenuWidget = require "birb.modules.gui.textmenu.widgets.basic"
local BackWidget = TextMenuWidget:extend()

View file

@ -23,7 +23,7 @@
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
]]
local TextWidget = require "framework.scenes.gui.menus.widgets.text"
local TextWidget = require "birb.modules.gui.menus.widgets.text"
local TextMenuWidget = TextWidget:extend()

View file

@ -24,8 +24,8 @@
local Widget = {}
-- Add the widget as subvariable to the returned table
Widget.Base = require "framework.scenes.gui.textmenu.widgets.basic"
Widget.SubMenu= require "framework.scenes.gui.textmenu.widgets.submenu"
Widget.Back = require "framework.scenes.gui.textmenu.widgets.back"
Widget.Base = require "birb.modules.gui.textmenu.widgets.basic"
Widget.SubMenu= require "birb.modules.gui.textmenu.widgets.submenu"
Widget.Back = require "birb.modules.gui.textmenu.widgets.back"
return Widget

View file

@ -22,7 +22,7 @@
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
]]
local TextMenuWidget = require "framework.scenes.gui.textmenu.widgets.basic"
local TextMenuWidget = require "birb.modules.gui.textmenu.widgets.basic"
local SubmenuWidget = TextMenuWidget:extend()

View file

@ -22,10 +22,12 @@
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
]]
local cwd = (...):gsub('%.scenes$', '') .. "."
local Scene = Object:extend()
local Assets = require "framework.scenes.assets"
local Gui = require "framework.scenes.gui"
local Assets = require(cwd .. "assets")
local Gui = require (cwd .. "gui")
-- INIT FUNCTIONS
-- Initialize and configure the scene

View file

@ -1,4 +1,4 @@
local TransitionParent = require "framework.scenes.transitions.parent"
local TransitionParent = require "birb.modules.transitions.parent"
local CanvasTransition = TransitionParent:extend()
function CanvasTransition:new(func, ox, oy, fadeOut, easeIn, easeOut, duration, wait)

View file

@ -1,4 +1,4 @@
local TransitionParent = require "framework.scenes.transitions.canvas"
local TransitionParent = require "birb.modules.transitions.canvas"
local DefaultTransition = TransitionParent:extend()
function DefaultTransition:new(func, ox, oy, fadeOut)

View file

@ -1,4 +1,4 @@
local TransitionParent = require "framework.scenes.transitions.canvas"
local TransitionParent = require "birb.modules.transitions.canvas"
local DecalTransition = TransitionParent:extend()
function DecalTransition:new(func, ox, oy, fadeOut, decal)

View file

@ -1,4 +1,4 @@
local TransitionParent = require "framework.scenes.transitions.parent"
local TransitionParent = require "birb.modules.transitions.parent"
local DefaultTransition = TransitionParent:extend()
function DefaultTransition:new(func, ox, oy, fadeOut)

View file

@ -0,0 +1,4 @@
return {
default = require "birb.modules.transitions.default",
circle = require "birb.modules.transitions.circle"
}

View file

@ -1,5 +1,5 @@
local TransitionParent = Object:extend()
local TweenManager = require "framework.classes.time"
local TweenManager = require "birb.classes.time"
function TransitionParent:new(func, ox, oy, fadeOut, easeIn, easeOut, duration, wait)
self.tween = TweenManager(self)

View file

@ -21,13 +21,13 @@
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
]]
local Rect = require "framework.classes.2D.rect"
local Rect = require "birb.classes.2D.rect"
local BaseActor = require "framework.scenes.world.actors.mixins.base"
local SpritedActor = require("framework.scenes.world.actors.mixins.sprites")
local TimedActor = require("framework.scenes.world.actors.mixins.timers")
local InputActor = require("framework.scenes.world.actors.mixins.inputs")
local PhysicalActor = require("framework.scenes.world.actors.mixins.physics")
local BaseActor = require "birb.modules.world.actors.mixins.base"
local SpritedActor = require("birb.modules.world.actors.mixins.sprites")
local TimedActor = require("birb.modules.world.actors.mixins.timers")
local InputActor = require("birb.modules.world.actors.mixins.inputs")
local PhysicalActor = require("birb.modules.world.actors.mixins.physics")
local Actor2D = Rect:extend()
Actor2D:implement(BaseActor)
@ -36,7 +36,7 @@ Actor2D:implement(TimedActor)
Actor2D:implement(InputActor)
Actor2D:implement(PhysicalActor)
local Hitbox = require "framework.scenes.world.actors.utils.hitbox2D"
local Hitbox = require "birb.modules.world.actors.utils.hitbox2D"
-- INIT FUNCTIONS
-- Initialise the actor and its base functions

View file

@ -22,16 +22,16 @@
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
]]
local Hitbox = require("framework.scenes.world.actors.utils.hitbox3D")
local Boxes = require("framework.scenes.world.actors.utils.boxes")
local BasicBox = require "framework.classes.3D.box"
local Hitbox = require("birb.modules.world.actors.utils.hitbox3D")
local Boxes = require("birb.modules.world.actors.utils.boxes")
local BasicBox = require "birb.classes.3D.box"
local BaseActor = require("framework.scenes.world.actors.mixins.base")
local SpritedActor = require("framework.scenes.world.actors.mixins.sprites")
local TimedActor = require("framework.scenes.world.actors.mixins.timers")
local InputActor = require("framework.scenes.world.actors.mixins.inputs")
local PhysicalActor = require("framework.scenes.world.actors.mixins.physics")
local Shape3DActor = require("framework.scenes.world.actors.mixins.shapes")
local BaseActor = require("birb.modules.world.actors.mixins.base")
local SpritedActor = require("birb.modules.world.actors.mixins.sprites")
local TimedActor = require("birb.modules.world.actors.mixins.timers")
local InputActor = require("birb.modules.world.actors.mixins.inputs")
local PhysicalActor = require("birb.modules.world.actors.mixins.physics")
local Shape3DActor = require("birb.modules.world.actors.mixins.shapes")
local Actor3D = BasicBox:extend()
Actor3D:implement(BaseActor)

View file

@ -1,5 +1,5 @@
PhysicalActor = Object:extend()
local hitboxStructure = require "framework.structures.hitbox"
local hitboxStructure = require "birb.structures.hitbox"
-- PHYSICS FUNCTIONS
-- Raw implementation of everything common in physics

View file

@ -22,7 +22,7 @@
]]
local SpritedActor = Object:extend()
local Sprite = require("framework.scenes.world.actors.utils.sprites")
local Sprite = require("birb.modules.world.actors.utils.sprites")
function SpritedActor:initSprite()
self:addUpdateFunction(self.updateSprite)

View file

@ -23,7 +23,7 @@
local TimedActor = Object:extend()
local TweenManager = require "framework.classes.time"
local TweenManager = require "birb.classes.time"
-- TIMER FUNCTIONS
-- Control the integrated timers of the actor

Some files were not shown because too many files have changed in this diff Show more