Altered particles, added English translation, tweaked physics again.

This commit is contained in:
yaw-man 2023-01-15 18:29:21 -04:00
parent acffdea826
commit ae75751f32
7 changed files with 108 additions and 39 deletions

View File

@ -118,8 +118,8 @@ end
local function Update( score, level ) local function Update( score, level )
if level > 2 then if level > 2 then
drones.bass:setVolume( 0.5 * math.sqrt( score ) ) drones.bass:setVolume( 0.5 * math.sqrt( score ) * (level / 120) )
drones.alto:setVolume( 0.3 * score ) drones.alto:setVolume( 0.3 * score * ( level / 120 ))
end end
end end

View File

@ -61,7 +61,7 @@ OnImpact = function( impact )
pass = true pass = true
state.currentBeat = state.currentBeat + 1 state.currentBeat = state.currentBeat + 1
if state.currentBeat >= 120 then if state.currentBeat >= 119 then
return OnVictory() return OnVictory()
end end
@ -186,7 +186,8 @@ OnVictory = function()
love.draw = function() love.draw = function()
love.graphics.setColor( 1, 1, 1, 1 ) love.graphics.setColor( 1, 1, 1, 1 )
text.Draw( 120 ) text.Draw( 119 )
love.graphics.printf( love.graphics.printf(
"your.time:\n"..totalTime, "your.time:\n"..totalTime,
0, 0.5 * love.graphics.getHeight(), 0, 0.5 * love.graphics.getHeight(),
@ -212,6 +213,7 @@ Draw = function()
wave.Draw( score ) wave.Draw( score )
love.graphics.setColor( 1.0, 1.0, 1.0, 1.0 ) love.graphics.setColor( 1.0, 1.0, 1.0, 1.0 )
love.graphics.draw(particles, 0, 0) love.graphics.draw(particles, 0, 0)
@ -243,12 +245,11 @@ Draw = function()
sitelenpona.Draw( text.words[state.currentBeat] ) sitelenpona.Draw( text.words[state.currentBeat] )
marble.Draw() marble.Draw()
text.Draw( state.currentBeat ) text.Draw( state.currentBeat )
end end
function love.update( dt ) function love.update( dt )
audio.Update( ExtrapolateBeatScore(), state.currentBeat ) audio.Update( ExtrapolateBeatScore(), state.currentBeat )

View File

@ -5,8 +5,8 @@ local oldBuffer = love.graphics.newCanvas()
local newBuffer = love.graphics.newCanvas() local newBuffer = love.graphics.newCanvas()
local oldState, curState, newState local oldState, curState, newState
local FRICTION = 0.05 local INERTIA= 0.03
local MAXSPEED = 4 local MAXSPEED = 3
local ddx, ddy = 0.0, 0.0 local ddx, ddy = 0.0, 0.0
local function State( ) local function State( )
@ -22,8 +22,12 @@ function marble.GetAcceleration( ) return ddx, ddy end
function marble.Integrate( step ) function marble.Integrate( step )
newState.t = love.timer.getTime() newState.t = love.timer.getTime()
newState.dx = (1.0 - FRICTION) * curState.dx + FRICTION * ddx newState.dx = (1.0 - INERTIA
newState.dy = (1.0 - FRICTION) * curState.dy + FRICTION * ddy ) * curState.dx + INERTIA
* ddx
newState.dy = (1.0 - INERTIA
) * curState.dy + INERTIA
* ddy
newState.x = curState.x + newState.dx * step * MAXSPEED newState.x = curState.x + newState.dx * step * MAXSPEED
newState.y = curState.y + newState.dy * step * MAXSPEED newState.y = curState.y + newState.dy * step * MAXSPEED
end end

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@ -4,13 +4,16 @@ local feet = {}
local feetNL = {} local feetNL = {}
local words = {} --Sequence of tables. local words = {} --Sequence of tables.
local poem = {[0] = ""} local poem = {[0] = ""}
local poemLang = { [0] = "" }
local poemLines = {[0] = 0} local poemLines = {[0] = 0}
local mt = { __index = function() return "linja" end } local mt = { __index = function() return "linja" end }
local s = love.filesystem.read( "text/tok.txt" ) local s = love.filesystem.read( "text/tok.txt" )
local smallFont = love.graphics.setNewFont( "text/linja-sike.ttf", 12 ) local enFont = love.graphics.setNewFont( "text/linja-sike.ttf", 18 )
local largeFont = love.graphics.setNewFont( "text/linja-sike.ttf", 32 ) local smallFont = love.graphics.setNewFont( "text/linja-sike.ttf", 24 )
local largeFont = love.graphics.setNewFont( "text/linja-sike.ttf", 64 )
local i = 1 local i = 1
--Split string into feet. --Split string into feet.
@ -53,20 +56,61 @@ local function Draw( beat )
local foot = feet[ beat ] local foot = feet[ beat ]
if beat == 1 then
love.graphics.setColor(1.0, 1.0, 1.0, 1.0) love.graphics.setColor(0.0, 0.0, 0.0, 1.0)
love.graphics.printf( love.graphics.printf( "wasd.space",
foot, 0, 0.5 * love.graphics.getHeight(),
0, (9/10) * love.graphics.getHeight(),
love.graphics.getWidth(), love.graphics.getWidth(),
"center") "center"
)
return
end
love.graphics.setColor(1.0, 1.0, 1.0, 0.5) love.graphics.setColor(1.0, 1.0, 1.0, 0.5)
love.graphics.print( poem[beat], 0, (3 - poemLines[beat]) * 32 ) local lineNumber
if poemLines[beat] < 2 then lineNumber = 0
else lineNumber = 2 - poemLines[beat]
end
love.graphics.printf( poem[beat],
smallFont,
8, lineNumber * smallFont:getHeight(),
love.graphics.getWidth(),
"left"
)
love.graphics.setColor(1.0, 1.0, 1.0, 1.0)
love.graphics.printf( foot,
largeFont,
0, 0.87 * love.graphics.getHeight(),
love.graphics.getWidth(),
"center"
)
love.graphics.setColor(1.0, 1.0, 1.0, 0.5)
love.graphics.printf( poemLang[beat],
enFont,
-8, 0,--(2 - poemLines[beat]) * smallFont:getHeight(),
love.graphics.getWidth(),
"right"
)
end end
s = love.filesystem.read( "text/en.txt" )
i = 1
--Split string into lines.
for line in s:gmatch( ".-\n") do
line = line:gsub("%.", ","):gsub( " ", "." )
poemLang[i] = line
poemLang[i + 1], poemLang[i + 2], poemLang[i + 3] = poemLang[i], poemLang[i], poemLang[i]
i = i + 4
end
local Reset = function() end local Reset = function() end
return { feet = feet, words = words, feetNL = feetNL, Reset = Reset, Draw = Draw } return { feet = feet, words = words, feetNL = feetNL, Reset = Reset, Draw = Draw }

View File

@ -1,10 +1,30 @@
CUT first, i was a person of no speech
MY and could only cry
LIFE and could not share my feelings verbally
INTO communication in crying is quite powerful
PIECES weirdly, people seem to
THIS be able to stay good to me
IS they keep helping me
MY my food comes from good people
LAST my parents are great
RESORT i have two of them. they should
only be concerned with me. many needs
are in my complicated body
often i feel weird!
i want to play a lot
my wish is this: this sand
should become a sturdy house
this strong house should have a room
in there - a me-person is in charge
assertively, this person says:
"my home is great!
ruin shall come not
disappearance shall not be a possibility"
but, opposite of my wishes, this
happened: someone ruined
my big nice house!
this is sad
what baseless cruelty drove them?
i can't understand
i don't want to talk to them
i go to my reliable parents

View File

@ -150,9 +150,9 @@ end
--Apply bandlimited impulse to wave, adjust free parameters according to game state. --Apply bandlimited impulse to wave, adjust free parameters according to game state.
local function OnImpact( impact, level ) local function OnImpact( impact, level )
IMPULSESIZE = 10.0 * math.sqrt( level / 120.0 ) IMPULSESIZE = 1.0 + 9.0 * math.sqrt( level / 120.0 )
SOUNDSPEED = 50.0 - 35 * level / 120 SOUNDSPEED = 25 - 10 * level / 120
DAMPING = 0.03 * ( 1.0 - 0.4 * level / 120 ) DAMPING = 0.02 * ( 1.0 - 0.4 * level / 120 )
--Apply bandlimited impulse. --Apply bandlimited impulse.