diff --git a/CHANGELOG.md b/CHANGELOG.md index 9788772..fb82064 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased +- Project renamed to Birb + +- New loading system + ### Added - 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:** The core is now separated from the rest of birb + ## [0.6.0] - 2019-07-20 - Meta: Add proper crediting diff --git a/README.md b/README.md index 8e482c4..2a84206 100644 --- a/README.md +++ b/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 -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() - core = Core() + birb.startCore() 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 diff --git a/gamecore/callbacks.lua b/birb/callbacks.lua similarity index 100% rename from gamecore/callbacks.lua rename to birb/callbacks.lua diff --git a/gamecore/debug.lua b/birb/core/debug.lua similarity index 95% rename from gamecore/debug.lua rename to birb/core/debug.lua index 0c1097a..53d62f2 100644 --- a/gamecore/debug.lua +++ b/birb/core/debug.lua @@ -23,8 +23,7 @@ local DebugSystem = Object:extend() -local cwd = (...):gsub('%.debug$', '') .. "." -local lovebird = require(cwd .. "libs.lovebird") +local lovebird = require("birb.libs.lovebird") function DebugSystem:new(controller, active) self.controller = controller diff --git a/gamecore/init.lua b/birb/core/init.lua similarity index 91% rename from gamecore/init.lua rename to birb/core/init.lua index b172785..21dd59e 100644 --- a/gamecore/init.lua +++ b/birb/core/init.lua @@ -25,13 +25,6 @@ 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 DebugSystem = require(cwd .. "debug") @@ -41,15 +34,11 @@ local Screen = require(cwd .. "screen") local Lang = require(cwd .. "lang") local SceneManager = require(cwd .. "scenemanager") -local modules = require(cwd .. "modules") - -require(cwd .. "callbacks") - -- INIT FUNCTIONS -- Initialize and configure the core object function CoreSystem:new(DEBUGMODE) - self.modules = modules + self.modules = birb.modules self.debug = DebugSystem(self, DEBUGMODE) self.options = Options(self) diff --git a/gamecore/input.lua b/birb/core/input.lua similarity index 100% rename from gamecore/input.lua rename to birb/core/input.lua diff --git a/gamecore/lang.lua b/birb/core/lang.lua similarity index 100% rename from gamecore/lang.lua rename to birb/core/lang.lua diff --git a/gamecore/options.lua b/birb/core/options.lua similarity index 97% rename from gamecore/options.lua rename to birb/core/options.lua index 28b8efb..0067e62 100644 --- a/gamecore/options.lua +++ b/birb/core/options.lua @@ -24,8 +24,7 @@ local OptionsManager = Object:extend() -local cwd = (...):gsub('%.options$', '') .. "." -local binser = require(cwd .. "modules.gamesystem.libs.binser") +local binser = require("birb.libs.binser") local TRANSLATION_PATH = "datas/languages/" diff --git a/gamecore/scenemanager.lua b/birb/core/scenemanager.lua similarity index 100% rename from gamecore/scenemanager.lua rename to birb/core/scenemanager.lua diff --git a/gamecore/screen.lua b/birb/core/screen.lua similarity index 97% rename from gamecore/screen.lua rename to birb/core/screen.lua index 7a39c22..82b601e 100644 --- a/gamecore/screen.lua +++ b/birb/core/screen.lua @@ -24,8 +24,7 @@ local ScreenManager = Object:extend() -local cwd = (...):gsub('%.screen$', '') .. "." -local CScreen = require(cwd .. "libs.cscreen") +local CScreen = require("birb.libs.cscreen") -- INIT FUNCTIONS -- Initialize and configure the screen manager diff --git a/birb/init.lua b/birb/init.lua new file mode 100644 index 0000000..a43f79f --- /dev/null +++ b/birb/init.lua @@ -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") diff --git a/gamecore/modules/gamesystem/libs/binser.lua b/birb/libs/binser.lua similarity index 100% rename from gamecore/modules/gamesystem/libs/binser.lua rename to birb/libs/binser.lua diff --git a/gamecore/libs/classic.lua b/birb/libs/classic.lua similarity index 100% rename from gamecore/libs/classic.lua rename to birb/libs/classic.lua diff --git a/gamecore/libs/cscreen.lua b/birb/libs/cscreen.lua similarity index 100% rename from gamecore/libs/cscreen.lua rename to birb/libs/cscreen.lua diff --git a/gamecore/libs/lovebird.lua b/birb/libs/lovebird.lua similarity index 100% rename from gamecore/libs/lovebird.lua rename to birb/libs/lovebird.lua diff --git a/gamecore/modules/assets/animator.lua b/birb/modules/assets/animator.lua similarity index 100% rename from gamecore/modules/assets/animator.lua rename to birb/modules/assets/animator.lua diff --git a/gamecore/modules/assets/autotile.lua b/birb/modules/assets/autotile.lua similarity index 100% rename from gamecore/modules/assets/autotile.lua rename to birb/modules/assets/autotile.lua diff --git a/gamecore/modules/assets/background.lua b/birb/modules/assets/background.lua similarity index 100% rename from gamecore/modules/assets/background.lua rename to birb/modules/assets/background.lua diff --git a/gamecore/modules/assets/fonts.lua b/birb/modules/assets/fonts.lua similarity index 100% rename from gamecore/modules/assets/fonts.lua rename to birb/modules/assets/fonts.lua diff --git a/gamecore/modules/assets/imagefonts.lua b/birb/modules/assets/imagefonts.lua similarity index 100% rename from gamecore/modules/assets/imagefonts.lua rename to birb/modules/assets/imagefonts.lua diff --git a/gamecore/modules/assets/init.lua b/birb/modules/assets/init.lua similarity index 100% rename from gamecore/modules/assets/init.lua rename to birb/modules/assets/init.lua diff --git a/gamecore/modules/assets/sprites.lua b/birb/modules/assets/sprites.lua similarity index 100% rename from gamecore/modules/assets/sprites.lua rename to birb/modules/assets/sprites.lua diff --git a/gamecore/modules/assets/texture.lua b/birb/modules/assets/texture.lua similarity index 100% rename from gamecore/modules/assets/texture.lua rename to birb/modules/assets/texture.lua diff --git a/gamecore/modules/assets/tileset.lua b/birb/modules/assets/tileset.lua similarity index 100% rename from gamecore/modules/assets/tileset.lua rename to birb/modules/assets/tileset.lua diff --git a/gamecore/modules/gamesystem/init.lua b/birb/modules/gamesystem/init.lua similarity index 97% rename from gamecore/modules/gamesystem/init.lua rename to birb/modules/gamesystem/init.lua index c3c7fe8..82b0649 100644 --- a/gamecore/modules/gamesystem/init.lua +++ b/birb/modules/gamesystem/init.lua @@ -26,10 +26,9 @@ ]] local cwd = (...):gsub('%.init$', '') .. "." -local cwd2 = (...):gsub('%.gamesystem.init$', '') .. "." local GameSystem = Object:extend() -local binser = require(cwd2 .. "libs.binser") +local binser = require("birb.libs.binser") local DEFAULT_SAVENUMBER = 3 diff --git a/gamecore/modules/gamesystem/submodule.lua b/birb/modules/gamesystem/submodule.lua similarity index 100% rename from gamecore/modules/gamesystem/submodule.lua rename to birb/modules/gamesystem/submodule.lua diff --git a/gamecore/modules/init.lua b/birb/modules/init.lua similarity index 95% rename from gamecore/modules/init.lua rename to birb/modules/init.lua index da2199a..c9ebd04 100644 --- a/gamecore/modules/init.lua +++ b/birb/modules/init.lua @@ -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 diff --git a/gamecore/modules/menusystem/flowbox.lua b/birb/modules/menusystem/flowbox.lua similarity index 100% rename from gamecore/modules/menusystem/flowbox.lua rename to birb/modules/menusystem/flowbox.lua diff --git a/gamecore/modules/menusystem/grid.lua b/birb/modules/menusystem/grid.lua similarity index 100% rename from gamecore/modules/menusystem/grid.lua rename to birb/modules/menusystem/grid.lua diff --git a/gamecore/modules/menusystem/hlistbox.lua b/birb/modules/menusystem/hlistbox.lua similarity index 100% rename from gamecore/modules/menusystem/hlistbox.lua rename to birb/modules/menusystem/hlistbox.lua diff --git a/gamecore/modules/menusystem/init.lua b/birb/modules/menusystem/init.lua similarity index 100% rename from gamecore/modules/menusystem/init.lua rename to birb/modules/menusystem/init.lua diff --git a/gamecore/modules/menusystem/listbox.lua b/birb/modules/menusystem/listbox.lua similarity index 100% rename from gamecore/modules/menusystem/listbox.lua rename to birb/modules/menusystem/listbox.lua diff --git a/gamecore/modules/menusystem/parent.lua b/birb/modules/menusystem/parent.lua similarity index 100% rename from gamecore/modules/menusystem/parent.lua rename to birb/modules/menusystem/parent.lua diff --git a/gamecore/modules/menusystem/widgets/init.lua b/birb/modules/menusystem/widgets/init.lua similarity index 100% rename from gamecore/modules/menusystem/widgets/init.lua rename to birb/modules/menusystem/widgets/init.lua diff --git a/gamecore/modules/menusystem/widgets/utils.lua b/birb/modules/menusystem/widgets/utils.lua similarity index 100% rename from gamecore/modules/menusystem/widgets/utils.lua rename to birb/modules/menusystem/widgets/utils.lua diff --git a/gamecore/modules/scenes.lua b/birb/modules/scenes.lua similarity index 100% rename from gamecore/modules/scenes.lua rename to birb/modules/scenes.lua diff --git a/gamecore/modules/timers/init.lua b/birb/modules/timers/init.lua similarity index 100% rename from gamecore/modules/timers/init.lua rename to birb/modules/timers/init.lua diff --git a/gamecore/modules/timers/libs/timer.lua b/birb/modules/timers/libs/timer.lua similarity index 100% rename from gamecore/modules/timers/libs/timer.lua rename to birb/modules/timers/libs/timer.lua diff --git a/gamecore/modules/timers/libs/tween.lua b/birb/modules/timers/libs/tween.lua similarity index 100% rename from gamecore/modules/timers/libs/tween.lua rename to birb/modules/timers/libs/tween.lua diff --git a/gamecore/modules/world/actors/actor2D.lua b/birb/modules/world/actors/actor2D.lua similarity index 100% rename from gamecore/modules/world/actors/actor2D.lua rename to birb/modules/world/actors/actor2D.lua diff --git a/gamecore/modules/world/actors/actor3D.lua b/birb/modules/world/actors/actor3D.lua similarity index 100% rename from gamecore/modules/world/actors/actor3D.lua rename to birb/modules/world/actors/actor3D.lua diff --git a/gamecore/modules/world/actors/baseactor.lua b/birb/modules/world/actors/baseactor.lua similarity index 100% rename from gamecore/modules/world/actors/baseactor.lua rename to birb/modules/world/actors/baseactor.lua diff --git a/gamecore/modules/world/actors/gfx2D.lua b/birb/modules/world/actors/gfx2D.lua similarity index 100% rename from gamecore/modules/world/actors/gfx2D.lua rename to birb/modules/world/actors/gfx2D.lua diff --git a/gamecore/modules/world/actors/gfx3D.lua b/birb/modules/world/actors/gfx3D.lua similarity index 100% rename from gamecore/modules/world/actors/gfx3D.lua rename to birb/modules/world/actors/gfx3D.lua diff --git a/gamecore/modules/world/actors/utils/boxes/init.lua b/birb/modules/world/actors/utils/boxes/init.lua similarity index 100% rename from gamecore/modules/world/actors/utils/boxes/init.lua rename to birb/modules/world/actors/utils/boxes/init.lua diff --git a/gamecore/modules/world/actors/utils/boxes/mapped.lua b/birb/modules/world/actors/utils/boxes/mapped.lua similarity index 100% rename from gamecore/modules/world/actors/utils/boxes/mapped.lua rename to birb/modules/world/actors/utils/boxes/mapped.lua diff --git a/gamecore/modules/world/actors/utils/boxes/parent.lua b/birb/modules/world/actors/utils/boxes/parent.lua similarity index 100% rename from gamecore/modules/world/actors/utils/boxes/parent.lua rename to birb/modules/world/actors/utils/boxes/parent.lua diff --git a/gamecore/modules/world/actors/utils/boxes/textured.lua b/birb/modules/world/actors/utils/boxes/textured.lua similarity index 100% rename from gamecore/modules/world/actors/utils/boxes/textured.lua rename to birb/modules/world/actors/utils/boxes/textured.lua diff --git a/gamecore/modules/world/actors/utils/hitbox2D.lua b/birb/modules/world/actors/utils/hitbox2D.lua similarity index 100% rename from gamecore/modules/world/actors/utils/hitbox2D.lua rename to birb/modules/world/actors/utils/hitbox2D.lua diff --git a/gamecore/modules/world/actors/utils/hitbox3D.lua b/birb/modules/world/actors/utils/hitbox3D.lua similarity index 100% rename from gamecore/modules/world/actors/utils/hitbox3D.lua rename to birb/modules/world/actors/utils/hitbox3D.lua diff --git a/gamecore/modules/world/actors/utils/timer.lua b/birb/modules/world/actors/utils/timer.lua similarity index 100% rename from gamecore/modules/world/actors/utils/timer.lua rename to birb/modules/world/actors/utils/timer.lua diff --git a/gamecore/modules/world/baseworld.lua b/birb/modules/world/baseworld.lua similarity index 100% rename from gamecore/modules/world/baseworld.lua rename to birb/modules/world/baseworld.lua diff --git a/gamecore/modules/world/camera/init.lua b/birb/modules/world/camera/init.lua similarity index 100% rename from gamecore/modules/world/camera/init.lua rename to birb/modules/world/camera/init.lua diff --git a/gamecore/modules/world/camera/utils.lua b/birb/modules/world/camera/utils.lua similarity index 100% rename from gamecore/modules/world/camera/utils.lua rename to birb/modules/world/camera/utils.lua diff --git a/gamecore/modules/world/libs/bump-3dpd.lua b/birb/modules/world/libs/bump-3dpd.lua similarity index 100% rename from gamecore/modules/world/libs/bump-3dpd.lua rename to birb/modules/world/libs/bump-3dpd.lua diff --git a/gamecore/modules/world/libs/bump.lua b/birb/modules/world/libs/bump.lua similarity index 100% rename from gamecore/modules/world/libs/bump.lua rename to birb/modules/world/libs/bump.lua diff --git a/gamecore/modules/world/libs/tsort.lua b/birb/modules/world/libs/tsort.lua similarity index 100% rename from gamecore/modules/world/libs/tsort.lua rename to birb/modules/world/libs/tsort.lua diff --git a/gamecore/modules/world/maps/init.lua b/birb/modules/world/maps/init.lua similarity index 100% rename from gamecore/modules/world/maps/init.lua rename to birb/modules/world/maps/init.lua diff --git a/gamecore/modules/world/maps/libs/sti/graphics.lua b/birb/modules/world/maps/libs/sti/graphics.lua similarity index 100% rename from gamecore/modules/world/maps/libs/sti/graphics.lua rename to birb/modules/world/maps/libs/sti/graphics.lua diff --git a/gamecore/modules/world/maps/libs/sti/init.lua b/birb/modules/world/maps/libs/sti/init.lua similarity index 100% rename from gamecore/modules/world/maps/libs/sti/init.lua rename to birb/modules/world/maps/libs/sti/init.lua diff --git a/gamecore/modules/world/maps/libs/sti/plugins/box2d.lua b/birb/modules/world/maps/libs/sti/plugins/box2d.lua similarity index 100% rename from gamecore/modules/world/maps/libs/sti/plugins/box2d.lua rename to birb/modules/world/maps/libs/sti/plugins/box2d.lua diff --git a/gamecore/modules/world/maps/libs/sti/plugins/bump.lua b/birb/modules/world/maps/libs/sti/plugins/bump.lua similarity index 100% rename from gamecore/modules/world/maps/libs/sti/plugins/bump.lua rename to birb/modules/world/maps/libs/sti/plugins/bump.lua diff --git a/gamecore/modules/world/maps/libs/sti/utils.lua b/birb/modules/world/maps/libs/sti/utils.lua similarity index 100% rename from gamecore/modules/world/maps/libs/sti/utils.lua rename to birb/modules/world/maps/libs/sti/utils.lua diff --git a/gamecore/modules/world/maps/parent.lua b/birb/modules/world/maps/parent.lua similarity index 100% rename from gamecore/modules/world/maps/parent.lua rename to birb/modules/world/maps/parent.lua diff --git a/gamecore/modules/world/maps/sti.lua b/birb/modules/world/maps/sti.lua similarity index 100% rename from gamecore/modules/world/maps/sti.lua rename to birb/modules/world/maps/sti.lua diff --git a/gamecore/modules/world/world2D.lua b/birb/modules/world/world2D.lua similarity index 100% rename from gamecore/modules/world/world2D.lua rename to birb/modules/world/world2D.lua diff --git a/gamecore/modules/world/world3D.lua b/birb/modules/world/world3D.lua similarity index 99% rename from gamecore/modules/world/world3D.lua rename to birb/modules/world/world3D.lua index 58b364c..70a0696 100644 --- a/gamecore/modules/world/world3D.lua +++ b/birb/modules/world/world3D.lua @@ -183,7 +183,7 @@ end -- Functions to draw the world 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 noOverlap = {} diff --git a/gamecore/utils/filesystem.lua b/birb/utils/filesystem.lua similarity index 100% rename from gamecore/utils/filesystem.lua rename to birb/utils/filesystem.lua diff --git a/gamecore/utils/graphics.lua b/birb/utils/graphics.lua similarity index 100% rename from gamecore/utils/graphics.lua rename to birb/utils/graphics.lua diff --git a/gamecore/utils/init.lua b/birb/utils/init.lua similarity index 100% rename from gamecore/utils/init.lua rename to birb/utils/init.lua diff --git a/gamecore/utils/math.lua b/birb/utils/math.lua similarity index 100% rename from gamecore/utils/math.lua rename to birb/utils/math.lua diff --git a/gamecore/utils/table.lua b/birb/utils/table.lua similarity index 100% rename from gamecore/utils/table.lua rename to birb/utils/table.lua diff --git a/assets/credits.md b/examples/assets/credits.md similarity index 100% rename from assets/credits.md rename to examples/assets/credits.md diff --git a/assets/fonts/medium.lua b/examples/assets/fonts/medium.lua similarity index 100% rename from assets/fonts/medium.lua rename to examples/assets/fonts/medium.lua diff --git a/assets/fonts/medium.png b/examples/assets/fonts/medium.png similarity index 100% rename from assets/fonts/medium.png rename to examples/assets/fonts/medium.png diff --git a/assets/music/options.ogg b/examples/assets/music/options.ogg similarity index 100% rename from assets/music/options.ogg rename to examples/assets/music/options.ogg diff --git a/assets/sfx/menu_confirm.mp3 b/examples/assets/sfx/menu_confirm.mp3 similarity index 100% rename from assets/sfx/menu_confirm.mp3 rename to examples/assets/sfx/menu_confirm.mp3 diff --git a/assets/sfx/menu_error.mp3 b/examples/assets/sfx/menu_error.mp3 similarity index 100% rename from assets/sfx/menu_error.mp3 rename to examples/assets/sfx/menu_error.mp3 diff --git a/assets/sfx/menu_move.mp3 b/examples/assets/sfx/menu_move.mp3 similarity index 100% rename from assets/sfx/menu_move.mp3 rename to examples/assets/sfx/menu_move.mp3 diff --git a/assets/sprites/box.png b/examples/assets/sprites/box.png similarity index 100% rename from assets/sprites/box.png rename to examples/assets/sprites/box.png diff --git a/assets/sprites/boxtop.png b/examples/assets/sprites/boxtop.png similarity index 100% rename from assets/sprites/boxtop.png rename to examples/assets/sprites/boxtop.png diff --git a/assets/sprites/coin.lua b/examples/assets/sprites/coin.lua similarity index 100% rename from assets/sprites/coin.lua rename to examples/assets/sprites/coin.lua diff --git a/assets/sprites/coin.png b/examples/assets/sprites/coin.png similarity index 100% rename from assets/sprites/coin.png rename to examples/assets/sprites/coin.png diff --git a/assets/sprites/debris.png b/examples/assets/sprites/debris.png similarity index 100% rename from assets/sprites/debris.png rename to examples/assets/sprites/debris.png diff --git a/assets/sprites/gfx/poof.lua b/examples/assets/sprites/gfx/poof.lua similarity index 100% rename from assets/sprites/gfx/poof.lua rename to examples/assets/sprites/gfx/poof.lua diff --git a/assets/sprites/gfx/poof.png b/examples/assets/sprites/gfx/poof.png similarity index 100% rename from assets/sprites/gfx/poof.png rename to examples/assets/sprites/gfx/poof.png diff --git a/assets/sprites/gfx/sparkle.lua b/examples/assets/sprites/gfx/sparkle.lua similarity index 100% rename from assets/sprites/gfx/sparkle.lua rename to examples/assets/sprites/gfx/sparkle.lua diff --git a/assets/sprites/gfx/sparkle.png b/examples/assets/sprites/gfx/sparkle.png similarity index 100% rename from assets/sprites/gfx/sparkle.png rename to examples/assets/sprites/gfx/sparkle.png diff --git a/assets/sprites/monkey_lad.lua b/examples/assets/sprites/monkey_lad.lua similarity index 100% rename from assets/sprites/monkey_lad.lua rename to examples/assets/sprites/monkey_lad.lua diff --git a/assets/sprites/monkey_lad.png b/examples/assets/sprites/monkey_lad.png similarity index 100% rename from assets/sprites/monkey_lad.png rename to examples/assets/sprites/monkey_lad.png diff --git a/assets/sprites/weapon.lua b/examples/assets/sprites/weapon.lua similarity index 100% rename from assets/sprites/weapon.lua rename to examples/assets/sprites/weapon.lua diff --git a/assets/sprites/weapon.png b/examples/assets/sprites/weapon.png similarity index 100% rename from assets/sprites/weapon.png rename to examples/assets/sprites/weapon.png diff --git a/examples/birb b/examples/birb new file mode 120000 index 0000000..0629dda --- /dev/null +++ b/examples/birb @@ -0,0 +1 @@ +../birb/ \ No newline at end of file diff --git a/conf.lua b/examples/conf.lua similarity index 94% rename from conf.lua rename to examples/conf.lua index ed117b5..71dc5e7 100644 --- a/conf.lua +++ b/examples/conf.lua @@ -1,11 +1,11 @@ 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.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.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.width = 424 -- The window width (number) t.window.height = 240 -- The window height (number) diff --git a/datas/inputs.lua b/examples/datas/inputs.lua similarity index 100% rename from datas/inputs.lua rename to examples/datas/inputs.lua diff --git a/datas/languages/en/commons.lua b/examples/datas/languages/en/commons.lua similarity index 100% rename from datas/languages/en/commons.lua rename to examples/datas/languages/en/commons.lua diff --git a/datas/languages/en/init.lua b/examples/datas/languages/en/init.lua similarity index 100% rename from datas/languages/en/init.lua rename to examples/datas/languages/en/init.lua diff --git a/datas/languages/en/inventory.lua b/examples/datas/languages/en/inventory.lua similarity index 100% rename from datas/languages/en/inventory.lua rename to examples/datas/languages/en/inventory.lua diff --git a/datas/languages/en/mainmenu.lua b/examples/datas/languages/en/mainmenu.lua similarity index 100% rename from datas/languages/en/mainmenu.lua rename to examples/datas/languages/en/mainmenu.lua diff --git a/datas/languages/en/options.lua b/examples/datas/languages/en/options.lua similarity index 100% rename from datas/languages/en/options.lua rename to examples/datas/languages/en/options.lua diff --git a/datas/languages/fr/commons.lua b/examples/datas/languages/fr/commons.lua similarity index 100% rename from datas/languages/fr/commons.lua rename to examples/datas/languages/fr/commons.lua diff --git a/datas/languages/fr/init.lua b/examples/datas/languages/fr/init.lua similarity index 100% rename from datas/languages/fr/init.lua rename to examples/datas/languages/fr/init.lua diff --git a/datas/languages/fr/inventory.lua b/examples/datas/languages/fr/inventory.lua similarity index 100% rename from datas/languages/fr/inventory.lua rename to examples/datas/languages/fr/inventory.lua diff --git a/datas/languages/fr/mainmenu.lua b/examples/datas/languages/fr/mainmenu.lua similarity index 100% rename from datas/languages/fr/mainmenu.lua rename to examples/datas/languages/fr/mainmenu.lua diff --git a/datas/languages/fr/options.lua b/examples/datas/languages/fr/options.lua similarity index 100% rename from datas/languages/fr/options.lua rename to examples/datas/languages/fr/options.lua diff --git a/datas/languages/init.lua b/examples/datas/languages/init.lua similarity index 100% rename from datas/languages/init.lua rename to examples/datas/languages/init.lua diff --git a/datas/maps/action3D/map.lua b/examples/datas/maps/action3D/map.lua similarity index 100% rename from datas/maps/action3D/map.lua rename to examples/datas/maps/action3D/map.lua diff --git a/datas/maps/action3D/map.tmx b/examples/datas/maps/action3D/map.tmx similarity index 100% rename from datas/maps/action3D/map.tmx rename to examples/datas/maps/action3D/map.tmx diff --git a/datas/maps/action3D/tileset_basic_terrain.png b/examples/datas/maps/action3D/tileset_basic_terrain.png similarity index 100% rename from datas/maps/action3D/tileset_basic_terrain.png rename to examples/datas/maps/action3D/tileset_basic_terrain.png diff --git a/datas/maps/action3D/tileset_basic_terrain.tsx b/examples/datas/maps/action3D/tileset_basic_terrain.tsx similarity index 100% rename from datas/maps/action3D/tileset_basic_terrain.tsx rename to examples/datas/maps/action3D/tileset_basic_terrain.tsx diff --git a/datas/maps/action3D/tileset_mountains.png b/examples/datas/maps/action3D/tileset_mountains.png similarity index 100% rename from datas/maps/action3D/tileset_mountains.png rename to examples/datas/maps/action3D/tileset_mountains.png diff --git a/datas/maps/action3D/tileset_mountains.tsx b/examples/datas/maps/action3D/tileset_mountains.tsx similarity index 100% rename from datas/maps/action3D/tileset_mountains.tsx rename to examples/datas/maps/action3D/tileset_mountains.tsx diff --git a/datas/maps/action3D/tileset_mountains2.png b/examples/datas/maps/action3D/tileset_mountains2.png similarity index 100% rename from datas/maps/action3D/tileset_mountains2.png rename to examples/datas/maps/action3D/tileset_mountains2.png diff --git a/datas/maps/action3D/tileset_other.png b/examples/datas/maps/action3D/tileset_other.png similarity index 100% rename from datas/maps/action3D/tileset_other.png rename to examples/datas/maps/action3D/tileset_other.png diff --git a/datas/maps/action3D/tileset_other.tsx b/examples/datas/maps/action3D/tileset_other.tsx similarity index 100% rename from datas/maps/action3D/tileset_other.tsx rename to examples/datas/maps/action3D/tileset_other.tsx diff --git a/datas/maps/action3D/tileset_water.png b/examples/datas/maps/action3D/tileset_water.png similarity index 100% rename from datas/maps/action3D/tileset_water.png rename to examples/datas/maps/action3D/tileset_water.png diff --git a/datas/maps/plateformer/monkeylad_further.png b/examples/datas/maps/plateformer/monkeylad_further.png similarity index 100% rename from datas/maps/plateformer/monkeylad_further.png rename to examples/datas/maps/plateformer/monkeylad_further.png diff --git a/datas/maps/plateformer/monkeylad_further.tsx b/examples/datas/maps/plateformer/monkeylad_further.tsx similarity index 100% rename from datas/maps/plateformer/monkeylad_further.tsx rename to examples/datas/maps/plateformer/monkeylad_further.tsx diff --git a/datas/maps/plateformer/platformer.lua b/examples/datas/maps/plateformer/platformer.lua similarity index 100% rename from datas/maps/plateformer/platformer.lua rename to examples/datas/maps/plateformer/platformer.lua diff --git a/datas/maps/plateformer/platformer.tmx b/examples/datas/maps/plateformer/platformer.tmx similarity index 100% rename from datas/maps/plateformer/platformer.tmx rename to examples/datas/maps/plateformer/platformer.tmx diff --git a/datas/maps/topdown/arena.lua b/examples/datas/maps/topdown/arena.lua similarity index 100% rename from datas/maps/topdown/arena.lua rename to examples/datas/maps/topdown/arena.lua diff --git a/datas/maps/topdown/arena.tmx b/examples/datas/maps/topdown/arena.tmx similarity index 100% rename from datas/maps/topdown/arena.tmx rename to examples/datas/maps/topdown/arena.tmx diff --git a/datas/maps/topdown/overworld.png b/examples/datas/maps/topdown/overworld.png similarity index 100% rename from datas/maps/topdown/overworld.png rename to examples/datas/maps/topdown/overworld.png diff --git a/datas/maps/topdown/overworld.tsx b/examples/datas/maps/topdown/overworld.tsx similarity index 100% rename from datas/maps/topdown/overworld.tsx rename to examples/datas/maps/topdown/overworld.tsx diff --git a/game/init.lua b/examples/game/init.lua similarity index 67% rename from game/init.lua rename to examples/game/init.lua index a11400e..27835df 100644 --- a/game/init.lua +++ b/examples/game/init.lua @@ -1,4 +1,4 @@ -local GameSystem = require "gamecore.modules.gamesystem" +local GameSystem = require "birb.modules.gamesystem" local Game = GameSystem:extend() function Game:new() diff --git a/examples/init.lua b/examples/init.lua deleted file mode 100644 index 66c6c5a..0000000 --- a/examples/init.lua +++ /dev/null @@ -1,12 +0,0 @@ -return { - MainMenu = require "examples.mainmenu", - Test = require "examples.basic.test_scene", - Test2 = require "examples.basic.test_scene2", - TestMenu = require "examples.basic.test_menus", - Inventory = require "examples.menus.inventory", - Options = require "examples.menus.options", - MovePlayer = require "examples.gameplay.moveplayer", - MovePlayer3D = require "examples.gameplay.moveplayer3D", - Action3D = require "examples.gameplay.action3D", - Plateformer = require "examples.gameplay.plateform" -} diff --git a/main.lua b/examples/main.lua similarity index 92% rename from main.lua rename to examples/main.lua index d890c83..b0f6ba0 100644 --- a/main.lua +++ b/examples/main.lua @@ -21,14 +21,14 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ]] -Core = require "gamecore" +require "birb" Game = require "game" -examples = require "examples" +scenes = require "scenes" function love.load() - core = Core(true) + birb.startCore() game = Game() game:read(1) - examples.MainMenu() + scenes.MainMenu() end diff --git a/examples/basic/test_menus/init.lua b/examples/scenes/basic/test_menus/init.lua similarity index 94% rename from examples/basic/test_menus/init.lua rename to examples/scenes/basic/test_menus/init.lua index 102ee08..21bfe38 100644 --- a/examples/basic/test_menus/init.lua +++ b/examples/scenes/basic/test_menus/init.lua @@ -21,13 +21,13 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ]] -local Scene = require "gamecore.modules.scenes" +local Scene = require "birb.modules.scenes" local TestScene = Scene:extend() -local MenuType = require "gamecore.modules.menusystem.listbox" -local MenuType2 = require "gamecore.modules.menusystem.flowbox" -local MenuType3 = require "gamecore.modules.menusystem.grid" -local Widget = require "gamecore.modules.menusystem.widgets" +local MenuType = require "birb.modules.menusystem.listbox" +local MenuType2 = require "birb.modules.menusystem.flowbox" +local MenuType3 = require "birb.modules.menusystem.grid" +local Widget = require "birb.modules.menusystem.widgets" local MenuWidget = Widget.Text:extend() diff --git a/examples/basic/test_scene/init.lua b/examples/scenes/basic/test_scene/init.lua similarity index 95% rename from examples/basic/test_scene/init.lua rename to examples/scenes/basic/test_scene/init.lua index 38d58d3..af4a622 100644 --- a/examples/basic/test_scene/init.lua +++ b/examples/scenes/basic/test_scene/init.lua @@ -21,7 +21,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ]] -local Scene = require "gamecore.modules.scenes" +local Scene = require "birb.modules.scenes" local TestScene = Scene:extend() function TestScene:new() @@ -37,9 +37,9 @@ end function TestScene:mousepressed(x, y) if (x > 424/2) then core.scenemanager:storeCurrentScene("pausedScene") - examples.Test2() + scenes.Test2() else - examples.TestMenu() + scenes.TestMenu() end end diff --git a/examples/basic/test_scene2/actors/explosion.lua b/examples/scenes/basic/test_scene2/actors/explosion.lua similarity index 71% rename from examples/basic/test_scene2/actors/explosion.lua rename to examples/scenes/basic/test_scene2/actors/explosion.lua index eafc527..52788fd 100644 --- a/examples/basic/test_scene2/actors/explosion.lua +++ b/examples/scenes/basic/test_scene2/actors/explosion.lua @@ -1,4 +1,4 @@ -local Parent = require "examples.basic.test_scene2.actors.parent" +local Parent = require "scenes.basic.test_scene2.actors.parent" local Explosion = Parent:extend() function Explosion:new(world, x, y) diff --git a/examples/basic/test_scene2/actors/init.lua b/examples/scenes/basic/test_scene2/actors/init.lua similarity index 100% rename from examples/basic/test_scene2/actors/init.lua rename to examples/scenes/basic/test_scene2/actors/init.lua diff --git a/examples/basic/test_scene2/actors/parent.lua b/examples/scenes/basic/test_scene2/actors/parent.lua similarity index 83% rename from examples/basic/test_scene2/actors/parent.lua rename to examples/scenes/basic/test_scene2/actors/parent.lua index cc3c57f..60ba267 100644 --- a/examples/basic/test_scene2/actors/parent.lua +++ b/examples/scenes/basic/test_scene2/actors/parent.lua @@ -1,4 +1,4 @@ -local Base = require "gamecore.modules.world.actors.actor2D" +local Base = require "birb.modules.world.actors.actor2D" local Parent = Base:extend() function Parent:new(world, type, x, y, w, h) diff --git a/examples/basic/test_scene2/assets.lua b/examples/scenes/basic/test_scene2/assets.lua similarity index 82% rename from examples/basic/test_scene2/assets.lua rename to examples/scenes/basic/test_scene2/assets.lua index 952d7f9..c758041 100644 --- a/examples/basic/test_scene2/assets.lua +++ b/examples/scenes/basic/test_scene2/assets.lua @@ -1,4 +1,4 @@ -local folder = "examples/basic/test_scene2/" +local folder = "scenes/basic/test_scene2/" return { ["images"] = { diff --git a/examples/basic/test_scene2/init.lua b/examples/scenes/basic/test_scene2/init.lua similarity index 90% rename from examples/basic/test_scene2/init.lua rename to examples/scenes/basic/test_scene2/init.lua index ad2cd27..edd02df 100644 --- a/examples/basic/test_scene2/init.lua +++ b/examples/scenes/basic/test_scene2/init.lua @@ -21,22 +21,22 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ]] -local Scene = require "gamecore.modules.scenes" +local Scene = require "birb.modules.scenes" local TestScene = Scene:extend() -local folder = "examples/basic/test_scene2/" +local folder = "scenes/basic/test_scene2/" -local World = require "gamecore.modules.world.baseworld" +local World = require "birb.modules.world.baseworld" function TestScene:new() TestScene.super.new(self) - self.assets:batchImport("examples.basic.test_scene2.assets") + self.assets:batchImport("scenes.basic.test_scene2.assets") self.i = 0 self.estImpair = false - World(self, "examples.basic.test_scene2.actors") + World(self, "scenes.basic.test_scene2.actors") self.world:newActor("explosion", 12, 12) self.world:newActor("explosion", 1, 78) diff --git a/examples/gameplay/action3D/actors/box.lua b/examples/scenes/gameplay/action3D/actors/box.lua similarity index 78% rename from examples/gameplay/action3D/actors/box.lua rename to examples/scenes/gameplay/action3D/actors/box.lua index bfe15d6..ed93259 100644 --- a/examples/gameplay/action3D/actors/box.lua +++ b/examples/scenes/gameplay/action3D/actors/box.lua @@ -1,4 +1,4 @@ -local Base = require "gamecore.modules.world.actors.actor3D" +local Base = require "birb.modules.world.actors.actor3D" local Box = Base:extend() function Box:new(world, x, y, z) diff --git a/examples/gameplay/action3D/actors/coin.lua b/examples/scenes/gameplay/action3D/actors/coin.lua similarity index 83% rename from examples/gameplay/action3D/actors/coin.lua rename to examples/scenes/gameplay/action3D/actors/coin.lua index c543b82..cc324f1 100644 --- a/examples/gameplay/action3D/actors/coin.lua +++ b/examples/scenes/gameplay/action3D/actors/coin.lua @@ -1,4 +1,4 @@ -local Base = require "gamecore.modules.world.actors.actor3D" +local Base = require "birb.modules.world.actors.actor3D" local Coin = Base:extend() function Coin:new(world, x, y, z) diff --git a/examples/gameplay/action3D/actors/hitboxes/player.lua b/examples/scenes/gameplay/action3D/actors/hitboxes/player.lua similarity index 100% rename from examples/gameplay/action3D/actors/hitboxes/player.lua rename to examples/scenes/gameplay/action3D/actors/hitboxes/player.lua diff --git a/examples/gameplay/action3D/actors/init.lua b/examples/scenes/gameplay/action3D/actors/init.lua similarity index 87% rename from examples/gameplay/action3D/actors/init.lua rename to examples/scenes/gameplay/action3D/actors/init.lua index 1f594b5..69122db 100644 --- a/examples/gameplay/action3D/actors/init.lua +++ b/examples/scenes/gameplay/action3D/actors/init.lua @@ -5,7 +5,7 @@ local cwd = (...):gsub('%.init$', '') .. "." Obj.Player = require(cwd .. "player") Obj.Box = require(cwd .. "box") Obj.Coin = require(cwd .. "coin") -Obj.GFX = require("gamecore.modules.world.actors.gfx3D") +Obj.GFX = require("birb.modules.world.actors.gfx3D") Obj.index = {} Obj.index["player"] = Obj.Player diff --git a/examples/gameplay/action3D/actors/parent.lua b/examples/scenes/gameplay/action3D/actors/parent.lua similarity index 80% rename from examples/gameplay/action3D/actors/parent.lua rename to examples/scenes/gameplay/action3D/actors/parent.lua index c6fb85f..fd67fd8 100644 --- a/examples/gameplay/action3D/actors/parent.lua +++ b/examples/scenes/gameplay/action3D/actors/parent.lua @@ -1,4 +1,4 @@ -local Base = require "gamecore.modules.world.actors.actor3D" +local Base = require "birb.modules.world.actors.actor3D" local Parent = Base:extend() function Parent:new(world, type, x, y, z, w, h, d, isSolid) diff --git a/examples/gameplay/action3D/actors/player.lua b/examples/scenes/gameplay/action3D/actors/player.lua similarity index 96% rename from examples/gameplay/action3D/actors/player.lua rename to examples/scenes/gameplay/action3D/actors/player.lua index b3b550b..02494d1 100644 --- a/examples/gameplay/action3D/actors/player.lua +++ b/examples/scenes/gameplay/action3D/actors/player.lua @@ -8,7 +8,7 @@ function Player:new(world, x, y, z, id) self:setSprite("player", 8, 12) self:cloneSprite() - self:setHitboxFile("examples.gameplay.action3D.actors.hitboxes.player") + self:setHitboxFile("scenes.gameplay.action3D.actors.hitboxes.player") end function Player:updateStart(dt) diff --git a/examples/gameplay/action3D/actors/wall.lua b/examples/scenes/gameplay/action3D/actors/wall.lua similarity index 78% rename from examples/gameplay/action3D/actors/wall.lua rename to examples/scenes/gameplay/action3D/actors/wall.lua index 0851ae3..667bdda 100644 --- a/examples/gameplay/action3D/actors/wall.lua +++ b/examples/scenes/gameplay/action3D/actors/wall.lua @@ -1,4 +1,4 @@ -local Base = require "gamecore.modules.world.actors.actor3D" +local Base = require "birb.modules.world.actors.actor3D" local Wall = Base:extend() function Wall:new(world, x, y, z, w, h, d) diff --git a/examples/gameplay/action3D/init.lua b/examples/scenes/gameplay/action3D/init.lua similarity index 86% rename from examples/gameplay/action3D/init.lua rename to examples/scenes/gameplay/action3D/init.lua index 098a6d3..6e91136 100644 --- a/examples/gameplay/action3D/init.lua +++ b/examples/scenes/gameplay/action3D/init.lua @@ -21,19 +21,19 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ]] -local Scene = require "gamecore.modules.scenes" +local Scene = require "birb.modules.scenes" local MovePlayer = Scene:extend() -local World = require "gamecore.modules.world.world3D" +local World = require "birb.modules.world.world3D" function MovePlayer:new(playerNumber, cameraMode) local playerNumber = playerNumber or 1 local cameraMode = cameraMode or "split" MovePlayer.super.new(self) - self.assets:batchImport("examples.gameplay.plateform.assets") + self.assets:batchImport("scenes.gameplay.plateform.assets") - World(self, "examples.gameplay.action3D.actors", "datas/maps/action3D/map.lua") + World(self, "scenes.gameplay.action3D.actors", "datas/maps/action3D/map.lua") self.world:setPlayerNumber(playerNumber) self.world.cameras:setMode(cameraMode) diff --git a/examples/gameplay/moveplayer/actors/init.lua b/examples/scenes/gameplay/moveplayer/actors/init.lua similarity index 100% rename from examples/gameplay/moveplayer/actors/init.lua rename to examples/scenes/gameplay/moveplayer/actors/init.lua diff --git a/examples/gameplay/moveplayer/actors/parent.lua b/examples/scenes/gameplay/moveplayer/actors/parent.lua similarity index 79% rename from examples/gameplay/moveplayer/actors/parent.lua rename to examples/scenes/gameplay/moveplayer/actors/parent.lua index 3ca81f5..39c049b 100644 --- a/examples/gameplay/moveplayer/actors/parent.lua +++ b/examples/scenes/gameplay/moveplayer/actors/parent.lua @@ -1,4 +1,4 @@ -local Base = require "gamecore.modules.world.actors.actor2D" +local Base = require "birb.modules.world.actors.actor2D" local Parent = Base:extend() function Parent:new(world, type, x, y, w, h, isSolid) diff --git a/examples/gameplay/moveplayer/actors/player.lua b/examples/scenes/gameplay/moveplayer/actors/player.lua similarity index 100% rename from examples/gameplay/moveplayer/actors/player.lua rename to examples/scenes/gameplay/moveplayer/actors/player.lua diff --git a/examples/gameplay/moveplayer/actors/wall.lua b/examples/scenes/gameplay/moveplayer/actors/wall.lua similarity index 80% rename from examples/gameplay/moveplayer/actors/wall.lua rename to examples/scenes/gameplay/moveplayer/actors/wall.lua index bc35e3a..40b737d 100644 --- a/examples/gameplay/moveplayer/actors/wall.lua +++ b/examples/scenes/gameplay/moveplayer/actors/wall.lua @@ -1,4 +1,4 @@ -local Base = require "gamecore.modules.world.actors.actor2D" +local Base = require "birb.modules.world.actors.actor2D" local Wall = Base:extend() function Wall:new(world, x, y, w, h) diff --git a/examples/gameplay/moveplayer/init.lua b/examples/scenes/gameplay/moveplayer/init.lua similarity index 89% rename from examples/gameplay/moveplayer/init.lua rename to examples/scenes/gameplay/moveplayer/init.lua index b115961..7d2fde5 100644 --- a/examples/gameplay/moveplayer/init.lua +++ b/examples/scenes/gameplay/moveplayer/init.lua @@ -21,10 +21,10 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ]] -local Scene = require "gamecore.modules.scenes" +local Scene = require "birb.modules.scenes" local MovePlayer = Scene:extend() -local World = require "gamecore.modules.world.world2D" +local World = require "birb.modules.world.world2D" function MovePlayer:new(playerNumber, cameraMode) local playerNumber = playerNumber or 1 @@ -32,7 +32,7 @@ function MovePlayer:new(playerNumber, cameraMode) MovePlayer.super.new(self) - World(self, "examples.gameplay.moveplayer.actors", "datas/maps/topdown/arena.lua") + World(self, "scenes.gameplay.moveplayer.actors", "datas/maps/topdown/arena.lua") self.world:setPlayerNumber(playerNumber) self.world.cameras:setMode(cameraMode) diff --git a/examples/gameplay/moveplayer3D/actors/init.lua b/examples/scenes/gameplay/moveplayer3D/actors/init.lua similarity index 100% rename from examples/gameplay/moveplayer3D/actors/init.lua rename to examples/scenes/gameplay/moveplayer3D/actors/init.lua diff --git a/examples/gameplay/moveplayer3D/actors/parent.lua b/examples/scenes/gameplay/moveplayer3D/actors/parent.lua similarity index 82% rename from examples/gameplay/moveplayer3D/actors/parent.lua rename to examples/scenes/gameplay/moveplayer3D/actors/parent.lua index b71c7e0..f0cc900 100644 --- a/examples/gameplay/moveplayer3D/actors/parent.lua +++ b/examples/scenes/gameplay/moveplayer3D/actors/parent.lua @@ -1,4 +1,4 @@ -local Base = require "gamecore.modules.world.actors.actor3D" +local Base = require "birb.modules.world.actors.actor3D" local Parent = Base:extend() function Parent:new(world, type, x, y, z, w, h, d, isSolid) diff --git a/examples/gameplay/moveplayer3D/actors/player.lua b/examples/scenes/gameplay/moveplayer3D/actors/player.lua similarity index 100% rename from examples/gameplay/moveplayer3D/actors/player.lua rename to examples/scenes/gameplay/moveplayer3D/actors/player.lua diff --git a/examples/gameplay/moveplayer3D/actors/wall.lua b/examples/scenes/gameplay/moveplayer3D/actors/wall.lua similarity index 77% rename from examples/gameplay/moveplayer3D/actors/wall.lua rename to examples/scenes/gameplay/moveplayer3D/actors/wall.lua index 6de23b0..b303d62 100644 --- a/examples/gameplay/moveplayer3D/actors/wall.lua +++ b/examples/scenes/gameplay/moveplayer3D/actors/wall.lua @@ -1,4 +1,4 @@ -local Base = require "gamecore.modules.world.actors.actor3D" +local Base = require "birb.modules.world.actors.actor3D" local Wall = Base:extend() function Wall:new(world, x, y, z, w, h, d) diff --git a/examples/gameplay/moveplayer3D/init.lua b/examples/scenes/gameplay/moveplayer3D/init.lua similarity index 86% rename from examples/gameplay/moveplayer3D/init.lua rename to examples/scenes/gameplay/moveplayer3D/init.lua index 58c8716..4f33cd4 100644 --- a/examples/gameplay/moveplayer3D/init.lua +++ b/examples/scenes/gameplay/moveplayer3D/init.lua @@ -21,19 +21,19 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ]] -local Scene = require "gamecore.modules.scenes" +local Scene = require "birb.modules.scenes" local MovePlayer = Scene:extend() -local World = require "gamecore.modules.world.world3D" +local World = require "birb.modules.world.world3D" function MovePlayer:new(playerNumber, cameraMode) local playerNumber = playerNumber or 1 local cameraMode = cameraMode or "split" MovePlayer.super.new(self) - self.assets:batchImport("examples.gameplay.plateform.assets") + self.assets:batchImport("scenes.gameplay.plateform.assets") - World(self, "examples.gameplay.moveplayer3D.actors", "datas/maps/topdown/arena.lua") + World(self, "scenes.gameplay.moveplayer3D.actors", "datas/maps/topdown/arena.lua") self.world:setPlayerNumber(playerNumber) self.world.cameras:setMode(cameraMode) diff --git a/examples/gameplay/plateform/actors/coin.lua b/examples/scenes/gameplay/plateform/actors/coin.lua similarity index 81% rename from examples/gameplay/plateform/actors/coin.lua rename to examples/scenes/gameplay/plateform/actors/coin.lua index e3364f5..17b6219 100644 --- a/examples/gameplay/plateform/actors/coin.lua +++ b/examples/scenes/gameplay/plateform/actors/coin.lua @@ -1,4 +1,4 @@ -local Base = require "gamecore.modules.world.actors.actor2D" +local Base = require "birb.modules.world.actors.actor2D" local Coin = Base:extend() function Coin:new(world, x, y) diff --git a/examples/gameplay/plateform/actors/hitboxes/player.lua b/examples/scenes/gameplay/plateform/actors/hitboxes/player.lua similarity index 100% rename from examples/gameplay/plateform/actors/hitboxes/player.lua rename to examples/scenes/gameplay/plateform/actors/hitboxes/player.lua diff --git a/examples/gameplay/plateform/actors/init.lua b/examples/scenes/gameplay/plateform/actors/init.lua similarity index 83% rename from examples/gameplay/plateform/actors/init.lua rename to examples/scenes/gameplay/plateform/actors/init.lua index 0c9ed5e..0fa7209 100644 --- a/examples/gameplay/plateform/actors/init.lua +++ b/examples/scenes/gameplay/plateform/actors/init.lua @@ -4,7 +4,7 @@ local Obj = {} local cwd = (...):gsub('%.init$', '') .. "." Obj.Player = require(cwd .. "player") -Obj.GFX = require("gamecore.modules.world.actors.gfx2D") +Obj.GFX = require("birb.modules.world.actors.gfx2D") Obj.index = {} Obj.index["player"] = require(cwd .. "player") diff --git a/examples/gameplay/plateform/actors/player.lua b/examples/scenes/gameplay/plateform/actors/player.lua similarity index 95% rename from examples/gameplay/plateform/actors/player.lua rename to examples/scenes/gameplay/plateform/actors/player.lua index f964a0a..892fef3 100644 --- a/examples/gameplay/plateform/actors/player.lua +++ b/examples/scenes/gameplay/plateform/actors/player.lua @@ -1,4 +1,4 @@ -local Base = require "gamecore.modules.world.actors.actor2D" +local Base = require "birb.modules.world.actors.actor2D" local Player = Base:extend() function Player:new(world, x, y, id) @@ -13,7 +13,7 @@ function Player:new(world, x, y, id) self.isDead = false self.punchName = "" - self:setHitboxFile("examples.gameplay.plateform.actors.hitboxes.player") + self:setHitboxFile("scenes.gameplay.plateform.actors.hitboxes.player") end function Player:updateStart(dt) diff --git a/examples/gameplay/plateform/actors/wall.lua b/examples/scenes/gameplay/plateform/actors/wall.lua similarity index 69% rename from examples/gameplay/plateform/actors/wall.lua rename to examples/scenes/gameplay/plateform/actors/wall.lua index 3fa11bc..d5513e2 100644 --- a/examples/gameplay/plateform/actors/wall.lua +++ b/examples/scenes/gameplay/plateform/actors/wall.lua @@ -1,4 +1,4 @@ -local Base = require "gamecore.modules.world.actors.actor2D" +local Base = require "birb.modules.world.actors.actor2D" local Wall = Base:extend() function Wall:new(world, x, y, w, h) diff --git a/examples/gameplay/plateform/assets.lua b/examples/scenes/gameplay/plateform/assets.lua similarity index 100% rename from examples/gameplay/plateform/assets.lua rename to examples/scenes/gameplay/plateform/assets.lua diff --git a/examples/gameplay/plateform/init.lua b/examples/scenes/gameplay/plateform/init.lua similarity index 88% rename from examples/gameplay/plateform/init.lua rename to examples/scenes/gameplay/plateform/init.lua index f35be24..c149a1a 100644 --- a/examples/gameplay/plateform/init.lua +++ b/examples/scenes/gameplay/plateform/init.lua @@ -21,18 +21,18 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ]] -local Scene = require "gamecore.modules.scenes" +local Scene = require "birb.modules.scenes" local Plateformer = Scene:extend() -local World = require "gamecore.modules.world.world2D" -local Pause = require "examples.gameplay.plateform.pause" +local World = require "birb.modules.world.world2D" +local Pause = require "scenes.gameplay.plateform.pause" function Plateformer:new() Plateformer.super.new(self) - local folder = "examples.gameplay.plateform" + local folder = "scenes.gameplay.plateform" - self.assets:batchImport("examples.gameplay.plateform.assets") + self.assets:batchImport("scenes.gameplay.plateform.assets") World(self, folder .. ".actors", "datas/maps/plateformer/platformer.lua") diff --git a/examples/gameplay/plateform/pause.lua b/examples/scenes/gameplay/plateform/pause.lua similarity index 91% rename from examples/gameplay/plateform/pause.lua rename to examples/scenes/gameplay/plateform/pause.lua index 1ac3bac..e20f4a4 100644 --- a/examples/gameplay/plateform/pause.lua +++ b/examples/scenes/gameplay/plateform/pause.lua @@ -1,5 +1,5 @@ -local ListMenu = require "gamecore.modules.menusystem.listbox" -local Widget = require "gamecore.modules.menusystem.widgets" +local ListMenu = require "birb.modules.menusystem.listbox" +local Widget = require "birb.modules.menusystem.widgets" local PauseMenu = ListMenu:extend() diff --git a/examples/scenes/init.lua b/examples/scenes/init.lua new file mode 100644 index 0000000..b08ed96 --- /dev/null +++ b/examples/scenes/init.lua @@ -0,0 +1,12 @@ +return { + MainMenu = require "scenes.mainmenu", + Test = require "scenes.basic.test_scene", + Test2 = require "scenes.basic.test_scene2", + TestMenu = require "scenes.basic.test_menus", + Inventory = require "scenes.menus.inventory", + Options = require "scenes.menus.options", + MovePlayer = require "scenes.gameplay.moveplayer", + MovePlayer3D = require "scenes.gameplay.moveplayer3D", + Action3D = require "scenes.gameplay.action3D", + Plateformer = require "scenes.gameplay.plateform" +} diff --git a/examples/mainmenu/assets.lua b/examples/scenes/mainmenu/assets.lua similarity index 100% rename from examples/mainmenu/assets.lua rename to examples/scenes/mainmenu/assets.lua diff --git a/examples/mainmenu/init.lua b/examples/scenes/mainmenu/init.lua similarity index 83% rename from examples/mainmenu/init.lua rename to examples/scenes/mainmenu/init.lua index 5f01961..d23539b 100644 --- a/examples/mainmenu/init.lua +++ b/examples/scenes/mainmenu/init.lua @@ -1,4 +1,4 @@ --- scenes/mainmenu :: the main menu of the different gamecore examples +-- scenes/mainmenu :: the main menu of the different birb scenes --[[ Copyright © 2019 Kazhnuz @@ -21,11 +21,11 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ]] -local Scene = require "gamecore.modules.scenes" +local Scene = require "birb.modules.scenes" local MainMenu = Scene:extend() -local ListBox = require "gamecore.modules.menusystem.listbox" -local Widget = require "gamecore.modules.menusystem.widgets" +local ListBox = require "birb.modules.menusystem.listbox" +local Widget = require "birb.modules.menusystem.widgets" local SubMenuWidget = Widget.Text:extend() local SceneWidget = Widget.Text:extend() @@ -33,26 +33,26 @@ local ExitWidget = Widget.Text:extend() function MainMenu:new() MainMenu.super.new(self) - self.assets:batchImport("examples.mainmenu.assets") + self.assets:batchImport("scenes.mainmenu.assets") self:addMenu("main", true) for i=1, 4 do local name = i .. "player" self:addSubMenu(name, name) if i == 1 then - self:addScene(name, examples.Plateformer, "plateform", i) + self:addScene(name, scenes.Plateformer, "plateform", i) end - self:addScene(name, examples.MovePlayer, "topdown", i) - self:addScene(name, examples.MovePlayer3D, "topdown3D", i) - self:addScene(name, examples.Action3D, "bigmap3D", i) + self:addScene(name, scenes.MovePlayer, "topdown", i) + self:addScene(name, scenes.MovePlayer3D, "topdown3D", i) + self:addScene(name, scenes.Action3D, "bigmap3D", i) if i > 1 then - self:addScene(name, examples.MovePlayer, "topdown (zoom)", i, "zoom") - self:addScene(name, examples.MovePlayer3D, "topdown3D (zoom)", i, "zoom") + self:addScene(name, scenes.MovePlayer, "topdown (zoom)", i, "zoom") + self:addScene(name, scenes.MovePlayer3D, "topdown3D (zoom)", i, "zoom") end end self:addSubMenu("menus", "menu") - self:addScene("menus", examples.Inventory, "inventory") - self:addScene("menus", examples.Options, "options") + self:addScene("menus", scenes.Inventory, "inventory") + self:addScene("menus", scenes.Options, "options") self.menusystem:setSoundFromSceneAssets("navigate") @@ -134,7 +134,7 @@ function SceneWidget:action() self.newscene(self.args[1], self.args[2], self.args[3], self.args[4], self.args[5]) end --- Exit Widget : exit the examples +-- Exit Widget : exit the scenes function ExitWidget:new(scene, menu) self.scene = scene diff --git a/examples/menus/inventory/init.lua b/examples/scenes/menus/inventory/init.lua similarity index 93% rename from examples/menus/inventory/init.lua rename to examples/scenes/menus/inventory/init.lua index 54ef075..af94dac 100644 --- a/examples/menus/inventory/init.lua +++ b/examples/scenes/menus/inventory/init.lua @@ -21,12 +21,12 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ]] -local Scene = require "gamecore.modules.scenes" +local Scene = require "birb.modules.scenes" local Inventory = Scene:extend() -local HListBox = require "gamecore.modules.menusystem.hlistbox" -local FloxBox = require "gamecore.modules.menusystem.flowbox" -local Widget = require "gamecore.modules.menusystem.widgets" +local HListBox = require "birb.modules.menusystem.hlistbox" +local FloxBox = require "birb.modules.menusystem.flowbox" +local Widget = require "birb.modules.menusystem.widgets" local InventoryWidget = Widget.Text:extend() local ItemWidget = Widget.Text:extend() diff --git a/examples/menus/options/init.lua b/examples/scenes/menus/options/init.lua similarity index 92% rename from examples/menus/options/init.lua rename to examples/scenes/menus/options/init.lua index e21c294..fb3ae28 100644 --- a/examples/menus/options/init.lua +++ b/examples/scenes/menus/options/init.lua @@ -1,4 +1,4 @@ --- scenes/options :: a basic example of how to handle gamecore options in a menu +-- scenes/options :: a basic example of how to handle birb options in a menu --[[ Copyright © 2019 Kazhnuz @@ -21,16 +21,16 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ]] -local Scene = require "gamecore.modules.scenes" +local Scene = require "birb.modules.scenes" local OptionsMenu = Scene:extend() -local ListBox = require "gamecore.modules.menusystem.listbox" -local Widgets = require "examples.menus.options.widgets" +local ListBox = require "birb.modules.menusystem.listbox" +local Widgets = require "scenes.menus.options.widgets" function OptionsMenu:new() OptionsMenu.super.new(self) self.assets:addImageFont("medium", "assets/fonts/medium") - self.assets:setMusic("assets/music/music.ogg") + self.assets:setMusic("assets/music/options.ogg") self.assets:addSFX("navigate", "assets/sfx/menu_move.mp3") self.assets:addSFX("confirm", "assets/sfx/menu_confirm.mp3") diff --git a/examples/menus/options/widgets.lua b/examples/scenes/menus/options/widgets.lua similarity index 98% rename from examples/menus/options/widgets.lua rename to examples/scenes/menus/options/widgets.lua index f072fd9..e7401b7 100644 --- a/examples/menus/options/widgets.lua +++ b/examples/scenes/menus/options/widgets.lua @@ -23,7 +23,7 @@ local widgets = {} -local Widget = require "gamecore.modules.menusystem.widgets" +local Widget = require "birb.modules.menusystem.widgets" local DoubleTextWidget = Widget.Text:extend() widgets.SubMenu = DoubleTextWidget:extend() @@ -85,7 +85,7 @@ function widgets.Dummy:action() -- shoosh end --- Exit Widget : exit the examples +-- Exit Widget : exit the scenes function widgets.Exit:new(scene, menu) self.scene = scene