Merge branch 'master' of https://git.kobold.cafe/sonic/sonic-radiance
This commit is contained in:
commit
011335ab1a
17 changed files with 159 additions and 139 deletions
1
debug.sh
Executable file
1
debug.sh
Executable file
|
@ -0,0 +1 @@
|
||||||
|
love ./sonic-radiance.love DEBUGLEVEL=4
|
1
launch.sh
Executable file
1
launch.sh
Executable file
|
@ -0,0 +1 @@
|
||||||
|
love ./sonic-radiance.love
|
|
@ -23,7 +23,7 @@
|
||||||
|
|
||||||
local DebugSystem = Object:extend()
|
local DebugSystem = Object:extend()
|
||||||
|
|
||||||
local lovebird = require "birb.libs.lovebird"
|
local lovebird
|
||||||
|
|
||||||
local Levels = enum {
|
local Levels = enum {
|
||||||
"ERROR",
|
"ERROR",
|
||||||
|
@ -32,18 +32,19 @@ local Levels = enum {
|
||||||
"DEBUG"
|
"DEBUG"
|
||||||
}
|
}
|
||||||
|
|
||||||
function DebugSystem:new(controller)
|
function DebugSystem:new(controller, debugLevel)
|
||||||
self.controller = controller
|
self.controller = controller
|
||||||
|
|
||||||
self.debugLevel = self.controller.conf.debugLevel or Levels.INFO
|
self.debugLevel = debugLevel or Levels.WARNING
|
||||||
self.active = (self.debugLevel == Levels.DEBUG)
|
self.active = (self.debugLevel == Levels.DEBUG)
|
||||||
if (self.active) then
|
if (self.active) then
|
||||||
|
lovebird = require "birb.libs.lovebird"
|
||||||
lovebird.update()
|
lovebird.update()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function DebugSystem:update(dt)
|
function DebugSystem:update(dt)
|
||||||
if (self.active) then
|
if (self.active and lovebird ~= nil) then
|
||||||
lovebird.update(dt)
|
lovebird.update(dt)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -40,10 +40,11 @@ local DataManager = require(cwd .. "datas")
|
||||||
-- INIT FUNCTIONS
|
-- INIT FUNCTIONS
|
||||||
-- Initialize and configure the core object
|
-- Initialize and configure the core object
|
||||||
|
|
||||||
function CoreSystem:new()
|
function CoreSystem:new(args)
|
||||||
|
self.args = args
|
||||||
self:setDefaultConf()
|
self:setDefaultConf()
|
||||||
|
|
||||||
self.debug = DebugSystem(self)
|
self.debug = DebugSystem(self, self:getArg("DEBUGLEVEL", true))
|
||||||
self.options = Options(self)
|
self.options = Options(self)
|
||||||
self.input = Input(self)
|
self.input = Input(self)
|
||||||
self.screen = Screen(self)
|
self.screen = Screen(self)
|
||||||
|
@ -77,6 +78,20 @@ function CoreSystem:getIdentity(versionned)
|
||||||
return identity
|
return identity
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function CoreSystem:getArg(name, isNumber)
|
||||||
|
for _, arg in ipairs(self.args) do
|
||||||
|
print(arg)
|
||||||
|
local argData = utils.string.split(arg, "=")
|
||||||
|
if (argData[1] == name) then
|
||||||
|
if (isNumber == true) then
|
||||||
|
return tonumber(argData[2])
|
||||||
|
else
|
||||||
|
return argData[2]
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
-- MOUSE FUNCTIONS
|
-- MOUSE FUNCTIONS
|
||||||
-- get directly the mouse when needed
|
-- get directly the mouse when needed
|
||||||
|
|
||||||
|
|
|
@ -33,15 +33,15 @@ enum = require("birb.utils.enum")
|
||||||
|
|
||||||
birb.Core = require("birb.core")
|
birb.Core = require("birb.core")
|
||||||
|
|
||||||
function birb.start(gamemodule)
|
function birb.start(gamemodule, args)
|
||||||
birb.startCore()
|
birb.startCore(args)
|
||||||
if (gamemodule ~= nil) then
|
if (gamemodule ~= nil) then
|
||||||
birb.startGame(gamemodule)
|
birb.startGame(gamemodule)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function birb.startCore()
|
function birb.startCore(args)
|
||||||
core = birb.Core()
|
core = birb.Core(args)
|
||||||
end
|
end
|
||||||
|
|
||||||
function birb.startGame(gamemodule)
|
function birb.startGame(gamemodule)
|
||||||
|
|
|
@ -102,7 +102,7 @@ local Talkies = {
|
||||||
titleBackgroundColor = nil,
|
titleBackgroundColor = nil,
|
||||||
titleBorderColor = nil,
|
titleBorderColor = nil,
|
||||||
messageColor = {1, 1, 1},
|
messageColor = {1, 1, 1},
|
||||||
messageBackgroundColor = {0, 0, 0, 0.5},
|
messageBackgroundColor = {0, 0, 0, 0.8},
|
||||||
messageBorderColor = nil,
|
messageBorderColor = nil,
|
||||||
|
|
||||||
rounding = 0,
|
rounding = 0,
|
||||||
|
|
|
@ -4,7 +4,6 @@ function love.conf(t)
|
||||||
t.console = false -- Attach a console (boolean, Windows only)
|
t.console = false -- Attach a console (boolean, Windows only)
|
||||||
t.accelerometerjoystick = false -- Enable the accelerometer on iOS and Android by exposing it as a Joystick (boolean)
|
t.accelerometerjoystick = false -- Enable the accelerometer on iOS and Android by exposing it as a Joystick (boolean)
|
||||||
t.gammacorrect = false -- Enable gamma-correct rendering, when supported by the system (boolean)
|
t.gammacorrect = false -- Enable gamma-correct rendering, when supported by the system (boolean)
|
||||||
t.debugLevel = 4 -- Debug level mode : 0=Error only, 3=Everything.
|
|
||||||
t.gameversion = "0.0.7" -- The game version (different than love2D version)
|
t.gameversion = "0.0.7" -- The game version (different than love2D version)
|
||||||
|
|
||||||
t.window.title = "Sonic Radiance" -- The window title (string)
|
t.window.title = "Sonic Radiance" -- The window title (string)
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
return {
|
return {
|
||||||
|
{"hitcombo", 2},
|
||||||
}
|
}
|
||||||
|
|
|
@ -78,23 +78,23 @@ return {
|
||||||
pauseAtEnd = true,
|
pauseAtEnd = true,
|
||||||
},
|
},
|
||||||
["spindash"] = {
|
["spindash"] = {
|
||||||
startAt = 46,
|
startAt = 59,
|
||||||
endAt = 48,
|
endAt = 62,
|
||||||
loop = 37,
|
loop = 59,
|
||||||
speed = 25,
|
speed = 25,
|
||||||
pauseAtEnd = false,
|
pauseAtEnd = false,
|
||||||
},
|
},
|
||||||
["spindash_full"] = {
|
["spindash_full"] = {
|
||||||
startAt = 41,
|
startAt = 59,
|
||||||
endAt = 44,
|
endAt = 62,
|
||||||
loop = 41,
|
loop = 59,
|
||||||
speed = 25,
|
speed = 25,
|
||||||
pauseAtEnd = false,
|
pauseAtEnd = false,
|
||||||
},
|
},
|
||||||
["spin"] = {
|
["spin"] = {
|
||||||
startAt = 45,
|
startAt = 55,
|
||||||
endAt = 48,
|
endAt = 58,
|
||||||
loop = 45,
|
loop = 55,
|
||||||
speed = 25,
|
speed = 25,
|
||||||
pauseAtEnd = false,
|
pauseAtEnd = false,
|
||||||
},
|
},
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 43 KiB After Width: | Height: | Size: 50 KiB |
|
@ -1,8 +1,7 @@
|
||||||
return {
|
return {
|
||||||
--{attack_name, level},
|
--{attack_name, level},
|
||||||
{"spinattack", 2},
|
{"spindash", 2},
|
||||||
--{"spinjump", 3},
|
--{"spinjump", 3},
|
||||||
{"spindash", 8},
|
|
||||||
{"hommingattack", 11},
|
{"hommingattack", 11},
|
||||||
{"spinattack", 15},
|
{"spinattack", 15},
|
||||||
{"sonicflare", 18},
|
{"sonicflare", 18},
|
||||||
|
|
|
@ -78,23 +78,23 @@ return {
|
||||||
pauseAtEnd = true,
|
pauseAtEnd = true,
|
||||||
},
|
},
|
||||||
["spindash"] = {
|
["spindash"] = {
|
||||||
startAt = 46,
|
startAt = 66,
|
||||||
endAt = 48,
|
endAt = 73,
|
||||||
loop = 37,
|
loop = 66,
|
||||||
speed = 25,
|
speed = 25,
|
||||||
pauseAtEnd = false,
|
pauseAtEnd = false,
|
||||||
},
|
},
|
||||||
["spindash_full"] = {
|
["spindash_full"] = {
|
||||||
startAt = 41,
|
startAt = 66,
|
||||||
endAt = 44,
|
endAt = 73,
|
||||||
loop = 41,
|
loop = 66,
|
||||||
speed = 25,
|
speed = 25,
|
||||||
pauseAtEnd = false,
|
pauseAtEnd = false,
|
||||||
},
|
},
|
||||||
["spin"] = {
|
["spin"] = {
|
||||||
startAt = 45,
|
startAt = 62,
|
||||||
endAt = 48,
|
endAt = 65,
|
||||||
loop = 45,
|
loop = 65,
|
||||||
speed = 25,
|
speed = 25,
|
||||||
pauseAtEnd = false,
|
pauseAtEnd = false,
|
||||||
},
|
},
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 58 KiB After Width: | Height: | Size: 65 KiB |
|
@ -4,42 +4,27 @@
|
||||||
-- Also serve as a tutoriel for how to create a file attack and choregraphy
|
-- Also serve as a tutoriel for how to create a file attack and choregraphy
|
||||||
|
|
||||||
return {
|
return {
|
||||||
name = "attack", -- unused for this attack, but still usefull sometimes
|
name = "attack", -- unused for this attack, but still usefull sometimes
|
||||||
cost = 00, -- the pp cost of the attack. Will be ignored if it's set
|
fullname = "Spin Attack",
|
||||||
-- as character default attack
|
cost = 00, -- the pp cost of the attack. Will be ignored if it's set
|
||||||
|
-- as character default attack
|
||||||
|
description = "Spin to attack. Roll at the right time for more damages",
|
||||||
|
|
||||||
needTarget = true,
|
|
||||||
targetNumber = 1, -- 0 for targeting all ennemies
|
targetNumber = 1, -- 0 for targeting all ennemies
|
||||||
|
targetEnnemies = true,
|
||||||
|
|
||||||
choregraphy = { -- the main attack choregraphy
|
choregraphy = { -- the main attack choregraphy
|
||||||
{"setAnimation", "none", "walk", false},
|
{"setAnimation", "none", "walk", false},
|
||||||
{'goTo', "none", "target", -1, 0, 0.3, true},
|
{"goTo", "none", "target", 0, 0, 0.6, false},
|
||||||
|
{"wait", "none", 0.3},
|
||||||
{"addQTE", "none", {"simplePrompt", {{"A", 1}}, 0.2}, "target", false},
|
{"setAnimation", "none", "spin", false},
|
||||||
{'playSFX', "none", 'hit'},
|
{'playSFX', "none", 'spinrelease'},
|
||||||
{'setAnimation', "none", 'hit1start', true},
|
{"waitActorFinished", "none", "goTo"},
|
||||||
{'sendDamage', "none", 33, "basic", "none", false},
|
{"sendDamage", "none", 100, "basic", "none", false},
|
||||||
{'addGFX',"sentDamage", 'hitGFX', "actor", 0.75, 0, true, false},
|
{'addGFX', "sentDamage", 'hitGFX', "target", 0, 0, true, false},
|
||||||
{'playSFX', "sentDamage", 'hitconnect'},
|
{'playSFX', "sentDamage", 'hitconnect'},
|
||||||
{'setAnimation', "none", 'hit1end', true},
|
{'jumpBack', "none", 0.3, true},
|
||||||
|
{"wait", "none", 0.1},
|
||||||
{"addQTE", "none", {"simplePrompt", {{"A", 1}}, 0.2}, "target", false},
|
|
||||||
{'playSFX', "none", 'hit'},
|
|
||||||
{'setAnimation', "none", 'hit2start', true},
|
|
||||||
{'sendDamage', "none", 33, "basic", "none", false},
|
|
||||||
{'addGFX',"sentDamage", 'hitGFX', "actor", 0.75, 0, true, false},
|
|
||||||
{'playSFX', "sentDamage", 'hitconnect'},
|
|
||||||
{'setAnimation', "none", 'hit2end', true},
|
|
||||||
|
|
||||||
{"addQTE", "none", {"simplePrompt", {{"A", 1}}, 0.2}, "target", false},
|
|
||||||
{'playSFX', "none", 'hit'},
|
|
||||||
{'setAnimation', "none", 'hit3start', true},
|
|
||||||
{'sendDamage', "none", 33, "basic", "none", false},
|
|
||||||
{'addGFX',"sentDamage", 'hitGFX', "actor", 0.75, 0, true, false},
|
|
||||||
{'playSFX', "sentDamage", 'hitconnect'},
|
|
||||||
{'setAnimation', "none", 'hit3end', true},
|
|
||||||
{'setAnimation', "none", 'idle', false},
|
|
||||||
{'wait', "none", 0.2},
|
|
||||||
{"setAnimation", "none", "walk", false},
|
{"setAnimation", "none", "walk", false},
|
||||||
{'goTo', "none", "start", 0, 0, 0.3, true},
|
{'goTo', "none", "start", 0, 0, 0.3, true},
|
||||||
{'setAnimation', "none", 'idle', false},
|
{'setAnimation', "none", 'idle', false},
|
||||||
|
@ -49,42 +34,3 @@ return {
|
||||||
-- specific effect when you touch the ennemy.
|
-- specific effect when you touch the ennemy.
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
--[[
|
|
||||||
CHOREGRAPHY POSSIBLE EFFECTS
|
|
||||||
-- "wait" :: Simply wait before doing the next command
|
|
||||||
-- :: {"wait", condition, duration}
|
|
||||||
|
|
||||||
-- "setAnimation" :: Change the animation of the battler
|
|
||||||
-- {"setAnimation", condition, animation, blockProcess}
|
|
||||||
|
|
||||||
-- "addGFX" :: Show a GFX relatively to the target position
|
|
||||||
-- :: (player if target is nil)
|
|
||||||
-- :: {"addGFX", condition, "gfxname", x, y, affectedByDirection, blockProcess}
|
|
||||||
|
|
||||||
-- "sendDamage" :: Send Damage on the whole target Area
|
|
||||||
-- ::
|
|
||||||
-- :: {"sendDamage", condition, damageEffect, accuracy, isSpecial, isAerial}
|
|
||||||
|
|
||||||
-- "sendDamageFromPos" :: Send Damage on a point from Actor position
|
|
||||||
-- ::
|
|
||||||
-- :: {"sendDamageFromPos", condition, dx, dy, damageEffect, accuracy, isSpecial, isAerial, affectedByDirection}
|
|
||||||
|
|
||||||
-- "sendDamageFromCursor" :: Send Damage on a point from Cursor final position
|
|
||||||
-- ::
|
|
||||||
-- :: {"sendDamageFromCursor", condition, dx, dy, damageEffect, accuracy, isSpecial, isAerial, affectedByDirection}
|
|
||||||
|
|
||||||
|
|
||||||
-- "dashForward" :: Dash until your are stopped
|
|
||||||
-- :: {"dashForward", condition, speed, blockProcess}
|
|
||||||
|
|
||||||
-- "jumpBack" :: jump to initial position
|
|
||||||
-- :: {"jumpBack", condition, blockProcess}
|
|
||||||
|
|
||||||
CONDITION TYPES
|
|
||||||
--
|
|
||||||
-- "sentDamage" :: an ennemy have received damage
|
|
||||||
--
|
|
||||||
--
|
|
||||||
|
|
||||||
]]
|
|
||||||
|
|
92
sonic-radiance.love/datas/gamedata/skills/hitcombo.lua
Normal file
92
sonic-radiance.love/datas/gamedata/skills/hitcombo.lua
Normal file
|
@ -0,0 +1,92 @@
|
||||||
|
-- A basic file describing the basic attack, in order to make it customizable one
|
||||||
|
-- day ?
|
||||||
|
|
||||||
|
-- Also serve as a tutoriel for how to create a file attack and choregraphy
|
||||||
|
|
||||||
|
return {
|
||||||
|
name = "hitcombo",
|
||||||
|
fullname = "Hit Combo",
|
||||||
|
cost = 03,
|
||||||
|
description = "Chain punches and strike with a final blow",
|
||||||
|
|
||||||
|
needTarget = true,
|
||||||
|
targetNumber = 1, -- 0 for targeting all ennemies
|
||||||
|
targetEnnemies = true,
|
||||||
|
|
||||||
|
choregraphy = { -- the main attack choregraphy
|
||||||
|
{"setAnimation", "none", "walk", false},
|
||||||
|
{'goTo', "none", "target", -1, 0, 0.3, false},
|
||||||
|
{"wait", "none", 0.15},
|
||||||
|
{"addQTE", "none", {"simplePrompt", {{"A", 1}, {"A", 1}, {"B", 1}}, 0.5}, "target", false},
|
||||||
|
{"wait", "none", 0.15},
|
||||||
|
|
||||||
|
{'playSFX', "none", 'hit'},
|
||||||
|
{'setAnimation', "none", 'hit1start', true},
|
||||||
|
{'sendDamage', "none", 40, "basic", "none", false},
|
||||||
|
{'addGFX',"sentDamage", 'hitGFX', "actor", 0.75, 0, true, false},
|
||||||
|
{'playSFX', "sentDamage", 'hitconnect'},
|
||||||
|
{'setAnimation', "none", 'hit1end', true},
|
||||||
|
|
||||||
|
{'playSFX', "none", 'hit'},
|
||||||
|
{'setAnimation', "none", 'hit2start', true},
|
||||||
|
{'sendDamage', "none", 40, "basic", "none", false},
|
||||||
|
{'addGFX',"sentDamage", 'hitGFX', "actor", 0.75, 0, true, false},
|
||||||
|
{'playSFX', "sentDamage", 'hitconnect'},
|
||||||
|
{'setAnimation', "none", 'hit2end', true},
|
||||||
|
|
||||||
|
{'playSFX', "none", 'hit'},
|
||||||
|
{'setAnimation', "none", 'hit3start', true},
|
||||||
|
{'sendDamage', "none", 40, "basic", "none", false},
|
||||||
|
{'addGFX',"sentDamage", 'hitGFX', "actor", 0.75, 0, true, false},
|
||||||
|
{'playSFX', "sentDamage", 'hitconnect'},
|
||||||
|
{'setAnimation', "none", 'hit3end', true},
|
||||||
|
{'setAnimation', "none", 'idle', false},
|
||||||
|
{'wait', "none", 0.2},
|
||||||
|
{"setAnimation", "none", "walk", false},
|
||||||
|
{'goTo', "none", "start", 0, 0, 0.3, true},
|
||||||
|
{'setAnimation', "none", 'idle', false},
|
||||||
|
},
|
||||||
|
|
||||||
|
onContact = { -- if the attack move and touch multiple ennemies, you can add
|
||||||
|
-- specific effect when you touch the ennemy.
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
--[[
|
||||||
|
CHOREGRAPHY POSSIBLE EFFECTS
|
||||||
|
-- "wait" :: Simply wait before doing the next command
|
||||||
|
-- :: {"wait", condition, duration}
|
||||||
|
|
||||||
|
-- "setAnimation" :: Change the animation of the battler
|
||||||
|
-- {"setAnimation", condition, animation, blockProcess}
|
||||||
|
|
||||||
|
-- "addGFX" :: Show a GFX relatively to the target position
|
||||||
|
-- :: (player if target is nil)
|
||||||
|
-- :: {"addGFX", condition, "gfxname", x, y, affectedByDirection, blockProcess}
|
||||||
|
|
||||||
|
-- "sendDamage" :: Send Damage on the whole target Area
|
||||||
|
-- ::
|
||||||
|
-- :: {"sendDamage", condition, damageEffect, accuracy, isSpecial, isAerial}
|
||||||
|
|
||||||
|
-- "sendDamageFromPos" :: Send Damage on a point from Actor position
|
||||||
|
-- ::
|
||||||
|
-- :: {"sendDamageFromPos", condition, dx, dy, damageEffect, accuracy, isSpecial, isAerial, affectedByDirection}
|
||||||
|
|
||||||
|
-- "sendDamageFromCursor" :: Send Damage on a point from Cursor final position
|
||||||
|
-- ::
|
||||||
|
-- :: {"sendDamageFromCursor", condition, dx, dy, damageEffect, accuracy, isSpecial, isAerial, affectedByDirection}
|
||||||
|
|
||||||
|
|
||||||
|
-- "dashForward" :: Dash until your are stopped
|
||||||
|
-- :: {"dashForward", condition, speed, blockProcess}
|
||||||
|
|
||||||
|
-- "jumpBack" :: jump to initial position
|
||||||
|
-- :: {"jumpBack", condition, blockProcess}
|
||||||
|
|
||||||
|
CONDITION TYPES
|
||||||
|
--
|
||||||
|
-- "sentDamage" :: an ennemy have received damage
|
||||||
|
--
|
||||||
|
--
|
||||||
|
|
||||||
|
]]
|
|
@ -1,35 +0,0 @@
|
||||||
-- A basic file describing the basic attack, in order to make it customizable one
|
|
||||||
-- day ?
|
|
||||||
|
|
||||||
-- Also serve as a tutoriel for how to create a file attack and choregraphy
|
|
||||||
|
|
||||||
return {
|
|
||||||
name = "spinattack",
|
|
||||||
fullname = "Spin Attack",
|
|
||||||
cost = 03,
|
|
||||||
description = "Spin to attack. Roll at the right time for more damages",
|
|
||||||
|
|
||||||
targetNumber = 1, -- 0 for targeting all ennemies
|
|
||||||
targetEnnemies = true,
|
|
||||||
|
|
||||||
choregraphy = { -- the main attack choregraphy
|
|
||||||
{"setAnimation", "none", "walk", false},
|
|
||||||
{"goTo", "none", "target", 0, 0, 0.6, false},
|
|
||||||
{"wait", "none", 0.3},
|
|
||||||
{"setAnimation", "none", "spin", false},
|
|
||||||
{'playSFX', "none", 'spinrelease'},
|
|
||||||
{"waitActorFinished", "none", "goTo"},
|
|
||||||
{"sendDamage", "none", 120, "basic", "none", false},
|
|
||||||
{'addGFX', "sentDamage", 'hitGFX', "target", 0, 0, true, false},
|
|
||||||
{'playSFX', "sentDamage", 'hitconnect'},
|
|
||||||
{'jumpBack', "none", 0.3, true},
|
|
||||||
{"wait", "none", 0.1},
|
|
||||||
{"setAnimation", "none", "walk", false},
|
|
||||||
{'goTo', "none", "start", 0, 0, 0.3, true},
|
|
||||||
{'setAnimation', "none", 'idle', false},
|
|
||||||
},
|
|
||||||
|
|
||||||
onContact = { -- if the attack move and touch multiple ennemies, you can add
|
|
||||||
-- specific effect when you touch the ennemy.
|
|
||||||
},
|
|
||||||
}
|
|
|
@ -25,7 +25,8 @@ require "birb"
|
||||||
|
|
||||||
scenes = require "scenes"
|
scenes = require "scenes"
|
||||||
|
|
||||||
function love.load()
|
function love.load(args)
|
||||||
birb.start("game")
|
print(utils.table.toString(args))
|
||||||
|
birb.start("game", args)
|
||||||
scenes.title()
|
scenes.title()
|
||||||
end
|
end
|
Loading…
Reference in a new issue