Merge branch 'birb-refactor' of game-projects/gamecore into master
|
@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
|
|
||||||
## Unreleased
|
## Unreleased
|
||||||
|
|
||||||
|
- Project renamed to Birb
|
||||||
|
|
||||||
|
- New loading system
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
||||||
- Add a gamesystem module
|
- Add a gamesystem module
|
||||||
|
@ -23,6 +27,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
|
|
||||||
- **core/input:** extract virtualpads from the input controller
|
- **core/input:** extract virtualpads from the input controller
|
||||||
|
|
||||||
|
- **core:** The core is now separated from the rest of birb
|
||||||
|
|
||||||
## [0.6.0] - 2019-07-20
|
## [0.6.0] - 2019-07-20
|
||||||
|
|
||||||
- Meta: Add proper crediting
|
- Meta: Add proper crediting
|
||||||
|
|
40
README.md
|
@ -1,44 +1,20 @@
|
||||||
# gamecore
|
# Birb Love2D Engine
|
||||||
|
|
||||||
Gamecore aim to be an integrated, simple core system for love2D. It aim to make work in a integrated way several managers to automatically handle inputs, screen, and several utilities to make game developpement easier and less repetitive.
|
Birb aim to be an integrated, simple engine 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.
|
||||||
|
|
||||||
Gamecore use [Classic](https://github.com/rxi/classic/) as its base Object
|
Birb use [Classic](https://github.com/rxi/classic/) as its base Object.
|
||||||
|
|
||||||
## How to load GameCore
|
## How to load GameCore
|
||||||
|
|
||||||
To load gamecore, you basically need the following code.
|
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.
|
||||||
|
|
||||||
|
Note : the `birb` and `utils` global namespace will be used by birb.
|
||||||
|
|
||||||
````
|
````
|
||||||
Core = require "gamecore"
|
require "birb"
|
||||||
|
|
||||||
function love.load()
|
function love.load()
|
||||||
core = Core()
|
birb.startCore()
|
||||||
end
|
end
|
||||||
|
|
||||||
````
|
````
|
||||||
|
|
||||||
Then you have to create some scene object,
|
|
||||||
|
|
||||||
## Gamecore managers
|
|
||||||
|
|
||||||
- Debug
|
|
||||||
|
|
||||||
- Input
|
|
||||||
|
|
||||||
- Lang
|
|
||||||
|
|
||||||
- Options
|
|
||||||
|
|
||||||
- Screen
|
|
||||||
|
|
||||||
- Scene Manager
|
|
||||||
|
|
||||||
## GameCore modules
|
|
||||||
|
|
||||||
Modules are utilies that you can load everywhere in your code and that aren't loaded specifically inside the core.
|
|
||||||
|
|
||||||
- Scene Object
|
|
||||||
|
|
||||||
- Assets
|
|
||||||
|
|
||||||
- Menu System
|
|
||||||
|
|
|
@ -23,8 +23,7 @@
|
||||||
|
|
||||||
local DebugSystem = Object:extend()
|
local DebugSystem = Object:extend()
|
||||||
|
|
||||||
local cwd = (...):gsub('%.debug$', '') .. "."
|
local lovebird = require("birb.libs.lovebird")
|
||||||
local lovebird = require(cwd .. "libs.lovebird")
|
|
||||||
|
|
||||||
function DebugSystem:new(controller, active)
|
function DebugSystem:new(controller, active)
|
||||||
self.controller = controller
|
self.controller = controller
|
|
@ -25,13 +25,6 @@
|
||||||
|
|
||||||
local cwd = (...):gsub('%.init$', '') .. "."
|
local cwd = (...):gsub('%.init$', '') .. "."
|
||||||
|
|
||||||
-- GLOBAL UTILS/FUNCTION LOADING
|
|
||||||
-- Load in the global namespace utilities that'll need to be reusable everywhere
|
|
||||||
-- in the game
|
|
||||||
|
|
||||||
Object = require(cwd .. "libs.classic")
|
|
||||||
utils = require(cwd .. "utils")
|
|
||||||
|
|
||||||
local CoreSystem = Object:extend()
|
local CoreSystem = Object:extend()
|
||||||
|
|
||||||
local DebugSystem = require(cwd .. "debug")
|
local DebugSystem = require(cwd .. "debug")
|
||||||
|
@ -41,15 +34,11 @@ local Screen = require(cwd .. "screen")
|
||||||
local Lang = require(cwd .. "lang")
|
local Lang = require(cwd .. "lang")
|
||||||
local SceneManager = require(cwd .. "scenemanager")
|
local SceneManager = require(cwd .. "scenemanager")
|
||||||
|
|
||||||
local modules = require(cwd .. "modules")
|
|
||||||
|
|
||||||
require(cwd .. "callbacks")
|
|
||||||
|
|
||||||
-- INIT FUNCTIONS
|
-- INIT FUNCTIONS
|
||||||
-- Initialize and configure the core object
|
-- Initialize and configure the core object
|
||||||
|
|
||||||
function CoreSystem:new(DEBUGMODE)
|
function CoreSystem:new(DEBUGMODE)
|
||||||
self.modules = modules
|
self.modules = birb.modules
|
||||||
|
|
||||||
self.debug = DebugSystem(self, DEBUGMODE)
|
self.debug = DebugSystem(self, DEBUGMODE)
|
||||||
self.options = Options(self)
|
self.options = Options(self)
|
|
@ -24,8 +24,7 @@
|
||||||
|
|
||||||
local OptionsManager = Object:extend()
|
local OptionsManager = Object:extend()
|
||||||
|
|
||||||
local cwd = (...):gsub('%.options$', '') .. "."
|
local binser = require("birb.libs.binser")
|
||||||
local binser = require(cwd .. "modules.gamesystem.libs.binser")
|
|
||||||
|
|
||||||
local TRANSLATION_PATH = "datas/languages/"
|
local TRANSLATION_PATH = "datas/languages/"
|
||||||
|
|
|
@ -24,8 +24,7 @@
|
||||||
|
|
||||||
local ScreenManager = Object:extend()
|
local ScreenManager = Object:extend()
|
||||||
|
|
||||||
local cwd = (...):gsub('%.screen$', '') .. "."
|
local CScreen = require("birb.libs.cscreen")
|
||||||
local CScreen = require(cwd .. "libs.cscreen")
|
|
||||||
|
|
||||||
-- INIT FUNCTIONS
|
-- INIT FUNCTIONS
|
||||||
-- Initialize and configure the screen manager
|
-- Initialize and configure the screen manager
|
41
birb/init.lua
Normal file
|
@ -0,0 +1,41 @@
|
||||||
|
-- birb/init.lua :: The main file of birb, that initilize the whole birb engine
|
||||||
|
-- It basically works by loading everything needed for a full birb experience.
|
||||||
|
|
||||||
|
--[[
|
||||||
|
Copyright © 2019 Kazhnuz
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||||
|
this software and associated documentation files (the "Software"), to deal in
|
||||||
|
the Software without restriction, including without limitation the rights to
|
||||||
|
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||||
|
the Software, and to permit persons to whom the Software is furnished to do so,
|
||||||
|
subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||||
|
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||||
|
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||||
|
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.
|
||||||
|
]]
|
||||||
|
|
||||||
|
birb = {}
|
||||||
|
|
||||||
|
-- GLOBAL UTILS/FUNCTION LOADING
|
||||||
|
-- Load in the global namespace utilities that'll need to be reusable everywhere
|
||||||
|
-- in the game
|
||||||
|
|
||||||
|
Object = require("birb.libs.classic")
|
||||||
|
utils = require("birb.utils")
|
||||||
|
|
||||||
|
birb.modules = require("birb.modules")
|
||||||
|
birb.Core = require("birb.core")
|
||||||
|
|
||||||
|
function birb.startCore()
|
||||||
|
core = birb.Core(true)
|
||||||
|
end
|
||||||
|
|
||||||
|
require("birb.callbacks")
|
|
@ -26,10 +26,9 @@
|
||||||
]]
|
]]
|
||||||
|
|
||||||
local cwd = (...):gsub('%.init$', '') .. "."
|
local cwd = (...):gsub('%.init$', '') .. "."
|
||||||
local cwd2 = (...):gsub('%.gamesystem.init$', '') .. "."
|
|
||||||
|
|
||||||
local GameSystem = Object:extend()
|
local GameSystem = Object:extend()
|
||||||
local binser = require(cwd2 .. "libs.binser")
|
local binser = require("birb.libs.binser")
|
||||||
|
|
||||||
local DEFAULT_SAVENUMBER = 3
|
local DEFAULT_SAVENUMBER = 3
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
-- modules : different modules that are usable as part of gamecore
|
-- modules : different modules that are usable as part of birb
|
||||||
|
|
||||||
--[[
|
--[[
|
||||||
Copyright © 2019 Kazhnuz
|
Copyright © 2019 Kazhnuz
|
|
@ -183,7 +183,7 @@ end
|
||||||
-- Functions to draw the world
|
-- Functions to draw the world
|
||||||
|
|
||||||
function World3D:zSortItems(items)
|
function World3D:zSortItems(items)
|
||||||
-- zSorting algorithm taken from bump3D example, adapted to gamecore.
|
-- zSorting algorithm taken from bump3D example, adapted to birb.
|
||||||
local graph = Tsort.new()
|
local graph = Tsort.new()
|
||||||
local noOverlap = {}
|
local noOverlap = {}
|
||||||
|
|
Before Width: | Height: | Size: 2 KiB After Width: | Height: | Size: 2 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 5.8 KiB |
Before Width: | Height: | Size: 280 B After Width: | Height: | Size: 280 B |
Before Width: | Height: | Size: 580 B After Width: | Height: | Size: 580 B |
Before Width: | Height: | Size: 520 B After Width: | Height: | Size: 520 B |
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.7 KiB |
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
1
examples/birb
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
../birb/
|
|
@ -1,11 +1,11 @@
|
||||||
function love.conf(t)
|
function love.conf(t)
|
||||||
t.identity = "space.kazhnuz.GameCore" -- The name of the save directory (string)
|
t.identity = "city.kobold.Birb" -- The name of the save directory (string)
|
||||||
t.version = "11.1" -- The LÖVE version this game was made for (string)
|
t.version = "11.1" -- The LÖVE version this game was made for (string)
|
||||||
t.console = false -- Attach a console (boolean, Windows only)
|
t.console = false -- Attach a console (boolean, Windows only)
|
||||||
t.accelerometerjoystick = false -- Enable the accelerometer on iOS and Android by exposing it as a Joystick (boolean)
|
t.accelerometerjoystick = false -- Enable the accelerometer on iOS and Android by exposing it as a Joystick (boolean)
|
||||||
t.gammacorrect = false -- Enable gamma-correct rendering, when supported by the system (boolean)
|
t.gammacorrect = false -- Enable gamma-correct rendering, when supported by the system (boolean)
|
||||||
|
|
||||||
t.window.title = "GameCore Example" -- The window title (string)
|
t.window.title = "Birb Engine Examples" -- The window title (string)
|
||||||
t.window.icon = nil -- Filepath to an image to use as the window's icon (string)
|
t.window.icon = nil -- Filepath to an image to use as the window's icon (string)
|
||||||
t.window.width = 424 -- The window width (number)
|
t.window.width = 424 -- The window width (number)
|
||||||
t.window.height = 240 -- The window height (number)
|
t.window.height = 240 -- The window height (number)
|