diff --git a/birb/modules/init.lua b/birb/modules/init.lua index da2199a..c9ebd04 100644 --- a/birb/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/birb/modules/world/world3D.lua b/birb/modules/world/world3D.lua index 58b364c..70a0696 100644 --- a/birb/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/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..aef0b73 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 = "space.kazhnuz.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 Example" -- 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 93% rename from main.lua rename to examples/main.lua index d890c83..47d0c30 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" +Core = require "birb" Game = require "game" -examples = require "examples" +scenes = require "scenes" function love.load() core = Core(true) 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 93% rename from examples/menus/options/init.lua rename to examples/scenes/menus/options/init.lua index e21c294..604fe85 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,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 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) 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