Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5f62127f28 |
BIN
SFX/enter.ogg
Normal file
BIN
SFX/enter.ogg
Normal file
Binary file not shown.
2
conf.lua
2
conf.lua
@@ -1,4 +1,4 @@
|
||||
gameVersion="Alpha V0.8.5-"
|
||||
gameVersion="Alpha V0.8.6"
|
||||
function love.conf(t)
|
||||
t.identity="Techmino"--Save directory name
|
||||
t.version="11.1"
|
||||
|
||||
33
dataList.lua
33
dataList.lua
@@ -23,8 +23,22 @@ end
|
||||
-------------------------<Events>-------------------------
|
||||
local function gameOver()
|
||||
local M=curMode
|
||||
if M.score then
|
||||
local R=M.getRank
|
||||
if R then
|
||||
local P=players[1]
|
||||
R=R(P)--new rank
|
||||
if R then
|
||||
local r=modeRanks[M.id]--old rank
|
||||
if R>r then
|
||||
modeRanks[M.id]=R
|
||||
if r==0 then
|
||||
for i=1,#M.unlock do
|
||||
local m=M.unlock[i]
|
||||
modeRanks[m]=modes[m].score and 0 or 6
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
local D=M.score(P)
|
||||
local L=M.records
|
||||
local p=#L--排名数-1
|
||||
@@ -45,22 +59,9 @@ local function gameOver()
|
||||
if L[11]then L[11]=nil end
|
||||
saveRecord(M.saveFileName,L)
|
||||
end
|
||||
local R=M.getRank(P)--new rank
|
||||
if R then
|
||||
local r=modeRanks[M.id]--old rank
|
||||
if R>r then
|
||||
modeRanks[M.id]=R
|
||||
if r==0 then
|
||||
for i=1,#M.unlock do
|
||||
local m=M.unlock[i]
|
||||
modeRanks[m]=modes[m].score and 0 or 6
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end--Save record
|
||||
local function die(P)
|
||||
local function die(P)--Same thing when win/lose,not really die!
|
||||
P.alive=false
|
||||
P.control=false
|
||||
P.timing=false
|
||||
@@ -76,7 +77,7 @@ local function die(P)
|
||||
P.visTime[i][j]=min(P.visTime[i][j],20)
|
||||
end
|
||||
end
|
||||
end--Same thing when win/lose/finish
|
||||
end
|
||||
Event={}
|
||||
function Event.reach_winCheck(P)
|
||||
if P.stat.row>=P.gameEnv.target then
|
||||
|
||||
2
list.lua
2
list.lua
@@ -58,7 +58,7 @@ blockColor={
|
||||
}
|
||||
sfx={
|
||||
"welcome",
|
||||
"click",
|
||||
"click","enter",
|
||||
"error","error_long",
|
||||
--Stereo sfxs(cannot set position)
|
||||
"button","swipe",
|
||||
|
||||
69
main.lua
69
main.lua
@@ -253,13 +253,19 @@ function mouseClick.mode(x,y,k)
|
||||
local _=cam.sel
|
||||
if not cam.sel or x<920 then
|
||||
local __=onMode(x,y)
|
||||
if __ and _~=__ then
|
||||
SFX("click")
|
||||
cam.moving=true
|
||||
_=modes[__]
|
||||
cam.x,cam.y=_.x*cam.k+180,_.y*cam.k
|
||||
if _~=__ then
|
||||
if __ then
|
||||
SFX("click")
|
||||
cam.moving=true
|
||||
_=modes[__]
|
||||
cam.x=_.x*cam.k+180
|
||||
cam.y=_.y*cam.k
|
||||
cam.sel=__
|
||||
else
|
||||
cam.sel=nil
|
||||
cam.x=cam.x-180
|
||||
end
|
||||
end
|
||||
cam.sel=__
|
||||
end
|
||||
cam.keyCtrl=false
|
||||
end
|
||||
@@ -470,9 +476,11 @@ function keyDown.setting_key(key)
|
||||
for y=1,20 do
|
||||
if setting.keyMap[l][y]==key then
|
||||
setting.keyMap[l][y]=""
|
||||
goto L
|
||||
end
|
||||
end
|
||||
end
|
||||
::L::
|
||||
setting.keyMap[s.board][s.kb]=key
|
||||
SFX("reach",.5)
|
||||
s.kS=false
|
||||
@@ -515,31 +523,33 @@ function gamepadDown.setting_key(key)
|
||||
for y=1,20 do
|
||||
if setting.keyMap[l][y]==key then
|
||||
setting.keyMap[l][y]=""
|
||||
goto L
|
||||
end
|
||||
end
|
||||
end
|
||||
::L::
|
||||
setting.keyMap[8+s.board][s.js]=key
|
||||
SFX("reach",.5)
|
||||
s.jS=false
|
||||
elseif key=="start"then
|
||||
s.jS=true
|
||||
SFX("lock",.5)
|
||||
elseif key=="up"then
|
||||
elseif key=="dpup"then
|
||||
if s.js>1 then
|
||||
s.js=s.js-1
|
||||
SFX("move",.5)
|
||||
end
|
||||
elseif key=="down"then
|
||||
elseif key=="dpdown"then
|
||||
if s.js<20 then
|
||||
s.js=s.js+1
|
||||
SFX("move",.5)
|
||||
end
|
||||
elseif key=="left"then
|
||||
elseif key=="dpleft"then
|
||||
if s.board>1 then
|
||||
s.board=s.board-1
|
||||
SFX("rotate",.5)
|
||||
end
|
||||
elseif key=="right"then
|
||||
elseif key=="dpright"then
|
||||
if s.board<8 then
|
||||
s.board=s.board+1
|
||||
SFX("rotate",.5)
|
||||
@@ -647,7 +657,7 @@ function touchMove.play(id,x,y,dx,dy)
|
||||
end
|
||||
end
|
||||
function keyDown.play(key)
|
||||
if key=="escape"and not scene.swapping then
|
||||
if key=="escape"then
|
||||
(frame<180 and back or pauseGame)()
|
||||
return
|
||||
end
|
||||
@@ -745,7 +755,7 @@ local function widgetControl_key(i)
|
||||
widget_sel=select(2,next(Widget[scene.cur]))
|
||||
end
|
||||
elseif i=="space"or i=="return"then
|
||||
if not scene.swapping and widget_sel then
|
||||
if widget_sel then
|
||||
widgetPress(widget_sel)
|
||||
end
|
||||
elseif i=="left"or i=="right"then
|
||||
@@ -769,10 +779,8 @@ local function widgetControl_gamepad(i)
|
||||
widget_sel=select(2,next(Widget[scene.cur]))
|
||||
end
|
||||
elseif i=="start"then
|
||||
if not scene.swapping and widget_sel then
|
||||
if not scene.swapping and widget_sel then
|
||||
widgetPress(widget_sel)
|
||||
end
|
||||
if widget_sel then
|
||||
widgetPress(widget_sel)
|
||||
end
|
||||
elseif i=="dpleft"or i=="dpright"then
|
||||
if widget_sel then
|
||||
@@ -789,8 +797,9 @@ local function widgetControl_gamepad(i)
|
||||
end
|
||||
local lastX,lastY--last clickDown pos
|
||||
function love.mousepressed(x,y,k,t,num)
|
||||
mouseShow=true
|
||||
if devMode>0 then print(x,y)end
|
||||
if t then return end
|
||||
if t or scene.swapping then return end
|
||||
mx,my=xOy:inverseTransformPoint(x,y)
|
||||
if mouseDown[scene.cur]then
|
||||
mouseDown[scene.cur](mx,my,k)
|
||||
@@ -798,16 +807,16 @@ function love.mousepressed(x,y,k,t,num)
|
||||
scene.back()
|
||||
end
|
||||
if k==1 then
|
||||
if widget_sel and not scene.swapping then
|
||||
if widget_sel then
|
||||
widgetPress(widget_sel,mx,my)
|
||||
end
|
||||
end
|
||||
lastX=mx
|
||||
lastY=my
|
||||
mouseShow=true
|
||||
end
|
||||
function love.mousemoved(x,y,dx,dy,t)
|
||||
if t then return end
|
||||
mouseShow=true
|
||||
if t or scene.swapping then return end
|
||||
mx,my=xOy:inverseTransformPoint(x,y)
|
||||
dx,dy=dx/scr.k,dy/scr.k
|
||||
if mouseMove[scene.cur]then
|
||||
@@ -824,10 +833,9 @@ function love.mousemoved(x,y,dx,dy,t)
|
||||
end
|
||||
end
|
||||
end
|
||||
mouseShow=true
|
||||
end
|
||||
function love.mousereleased(x,y,k,t,num)
|
||||
if t then return end
|
||||
if t or scene.swapping then return end
|
||||
mx,my=xOy:inverseTransformPoint(x,y)
|
||||
if mouseUp[scene.cur]then
|
||||
mouseUp[scene.cur](mx,my,k)
|
||||
@@ -837,11 +845,13 @@ function love.mousereleased(x,y,k,t,num)
|
||||
end
|
||||
end
|
||||
function love.wheelmoved(x,y)
|
||||
if scene.swapping then return end
|
||||
if wheelMoved[scene.cur]then wheelMoved[scene.cur](x,y)end
|
||||
end
|
||||
|
||||
function love.touchpressed(id,x,y)
|
||||
mouseShow=false
|
||||
if scene.swapping then return end
|
||||
if not touching then
|
||||
touching=id
|
||||
love.touchmoved(id,x,y,0,0)
|
||||
@@ -853,6 +863,7 @@ function love.touchpressed(id,x,y)
|
||||
end
|
||||
end
|
||||
function love.touchmoved(id,x,y,dx,dy)
|
||||
if scene.swapping then return end
|
||||
x,y=xOy:inverseTransformPoint(x,y)
|
||||
if touchMove[scene.cur]then
|
||||
touchMove[scene.cur](id,x,y,dx/scr.k,dy/scr.k)
|
||||
@@ -873,10 +884,11 @@ function love.touchmoved(id,x,y,dx,dy)
|
||||
end
|
||||
end
|
||||
function love.touchreleased(id,x,y)
|
||||
if scene.swapping then return end
|
||||
x,y=xOy:inverseTransformPoint(x,y)
|
||||
if id==touching then
|
||||
touching=nil
|
||||
if widget_sel and not scene.swapping then
|
||||
if widget_sel then
|
||||
widgetPress(widget_sel,x,y)
|
||||
end
|
||||
widget_sel=nil
|
||||
@@ -890,6 +902,7 @@ function love.touchreleased(id,x,y)
|
||||
end
|
||||
function love.keypressed(i)
|
||||
mouseShow=false
|
||||
if scene.swapping then return end
|
||||
if i=="f8"then devMode=0
|
||||
elseif i=="f9"then devMode=1
|
||||
elseif i=="f10"then devMode=2
|
||||
@@ -926,6 +939,7 @@ function love.keypressed(i)
|
||||
end
|
||||
end
|
||||
function love.keyreleased(i)
|
||||
if scene.swapping then return end
|
||||
if keyUp[scene.cur]then keyUp[scene.cur](i)end
|
||||
end
|
||||
|
||||
@@ -939,6 +953,7 @@ local keyMirror={
|
||||
}
|
||||
function love.gamepadpressed(joystick,i)
|
||||
mouseShow=false
|
||||
if scene.swapping then return end
|
||||
if gamepadDown[scene.cur]then gamepadDown[scene.cur](i)
|
||||
elseif keyDown[scene.cur]then keyDown[scene.cur](keyMirror[i]or i)
|
||||
elseif i=="back"then scene.back()
|
||||
@@ -946,6 +961,7 @@ function love.gamepadpressed(joystick,i)
|
||||
end
|
||||
end
|
||||
function love.gamepadreleased(joystick,i)
|
||||
if scene.swapping then return end
|
||||
if gamepadUp[scene.cur]then gamepadUp[scene.cur](i)
|
||||
end
|
||||
end
|
||||
@@ -1170,8 +1186,6 @@ function love.run()
|
||||
for N,a,b,c,d,e in POLL()do
|
||||
if N=="quit"then
|
||||
destroyPlayers()
|
||||
saveStat()
|
||||
saveSetting()
|
||||
goto END
|
||||
elseif love[N]then
|
||||
love[N](a,b,c,d,e)
|
||||
@@ -1206,7 +1220,7 @@ local F=love.filesystem
|
||||
if F.getInfo("data")then
|
||||
F.write("data.dat",F.read("data"))
|
||||
F.remove("data")
|
||||
end
|
||||
end
|
||||
if F.getInfo("userdata")then
|
||||
F.write("data.dat",F.read("userdata"))
|
||||
F.remove("userdata")
|
||||
@@ -1223,7 +1237,6 @@ end
|
||||
FILE={
|
||||
data=F.newFile("data.dat"),
|
||||
setting=F.newFile("setting.dat"),
|
||||
vk=F.newFile("vk"),
|
||||
}
|
||||
if F.getInfo("data.dat")then loadStat()end
|
||||
if F.getInfo("setting.dat")then
|
||||
@@ -1234,5 +1247,5 @@ else
|
||||
setting.VKSwitch=false
|
||||
end
|
||||
math.randomseed(os.time()*626)
|
||||
swapLanguage(setting.lang)
|
||||
changeLanguage(setting.lang)
|
||||
changeBlockSkin(setting.skin)
|
||||
@@ -34,11 +34,11 @@ return{
|
||||
mStr(P.stat.clear_4,-82,340)
|
||||
end,
|
||||
score=function(P)return{P.stat.row<=200 and P.stat.row or 200,P.stat.time}end,
|
||||
scoreDisp=function(D)return D[1].." Rows "..toTime(D[2])end,
|
||||
scoreDisp=function(D)return D[1].." Lines "..toTime(D[2])end,
|
||||
comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]<b[2]end,
|
||||
getRank=function(P)
|
||||
local L=P.stat.row
|
||||
if L==200 then
|
||||
if L>=200 then
|
||||
local T=P.stat.time
|
||||
return
|
||||
T<=140 and 5 or
|
||||
|
||||
@@ -36,11 +36,11 @@ return{
|
||||
mStr(P.stat.clear_4,-82,340)
|
||||
end,
|
||||
score=function(P)return{P.stat.row<=200 and P.stat.row or 200,P.stat.time}end,
|
||||
scoreDisp=function(D)return D[1].." Rows "..toTime(D[2])end,
|
||||
scoreDisp=function(D)return D[1].." Lines "..toTime(D[2])end,
|
||||
comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]<b[2]end,
|
||||
getRank=function(P)
|
||||
local L=P.stat.row
|
||||
if L==200 then
|
||||
if L>=200 then
|
||||
local T=P.stat.time
|
||||
return
|
||||
T<=150 and 5 or
|
||||
|
||||
@@ -36,11 +36,11 @@ return{
|
||||
mStr(P.stat.clear_4,-82,340)
|
||||
end,
|
||||
score=function(P)return{P.stat.row<=200 and P.stat.row or 200,P.stat.time}end,
|
||||
scoreDisp=function(D)return D[1].." Rows "..toTime(D[2])end,
|
||||
scoreDisp=function(D)return D[1].." Lines "..toTime(D[2])end,
|
||||
comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]<b[2]end,
|
||||
getRank=function(P)
|
||||
local L=P.stat.row
|
||||
if L==200 then
|
||||
if L>=200 then
|
||||
local T=P.stat.time
|
||||
return
|
||||
T<=180 and 5 or
|
||||
|
||||
@@ -35,11 +35,11 @@ return{
|
||||
mStr(P.stat.clear_4,-82,340)
|
||||
end,
|
||||
score=function(P)return{P.stat.row<=200 and P.stat.row or 200,P.stat.time}end,
|
||||
scoreDisp=function(D)return D[1].." Rows "..toTime(D[2])end,
|
||||
scoreDisp=function(D)return D[1].." Lines "..toTime(D[2])end,
|
||||
comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]<b[2]end,
|
||||
getRank=function(P)
|
||||
local L=P.stat.row
|
||||
if L==200 then
|
||||
if L>=200 then
|
||||
local T=P.stat.time
|
||||
return
|
||||
T<=150 and 5 or
|
||||
|
||||
@@ -37,12 +37,12 @@ return{
|
||||
mStr(P.stat.clear_4,-82,340)
|
||||
end,
|
||||
score=function(P)return{P.stat.row<=200 and P.stat.row or 200,P.stat.time}end,
|
||||
scoreDisp=function(D)return D[1].." Rows "..toTime(D[2])end,
|
||||
scoreDisp=function(D)return D[1].." Lines "..toTime(D[2])end,
|
||||
comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]<b[2]end,
|
||||
getRank=function(P)
|
||||
local L=P.stat.row
|
||||
return
|
||||
L==200 and 5 or
|
||||
L>=200 and 5 or
|
||||
L>=100 and 4 or
|
||||
L>=50 and 3 or
|
||||
L>=26 and 2 or
|
||||
|
||||
@@ -54,7 +54,7 @@ return{
|
||||
gc.rectangle("fill",-125,375,90,4)
|
||||
end,
|
||||
score=function(P)return{P.stat.row,P.stat.score}end,
|
||||
scoreDisp=function(D)return D[1].." Rows "..D[2]end,
|
||||
scoreDisp=function(D)return D[1].." Lines "..D[2]end,
|
||||
comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]>b[2]end,
|
||||
getRank=function(P)
|
||||
local L=P.stat.row
|
||||
|
||||
@@ -40,7 +40,7 @@ return{
|
||||
mDraw(drawableText.wave,-82,375)
|
||||
end,
|
||||
score=function(P)return{P.modeData.event,P.stat.row}end,
|
||||
scoreDisp=function(D)return D[1].." Waves "..D[2].." Rows"end,
|
||||
scoreDisp=function(D)return D[1].." Waves "..D[2].." Lines"end,
|
||||
comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]<b[2]end,
|
||||
getRank=function(P)
|
||||
local W=P.modeData.event
|
||||
|
||||
@@ -39,7 +39,7 @@ return{
|
||||
mDraw(drawableText.wave,-82,375)
|
||||
end,
|
||||
score=function(P)return{P.modeData.event,P.stat.row}end,
|
||||
scoreDisp=function(D)return D[1].." Waves "..D[2].." Rows"end,
|
||||
scoreDisp=function(D)return D[1].." Waves "..D[2].." Lines"end,
|
||||
comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]<b[2]end,
|
||||
getRank=function(P)
|
||||
local W=P.modeData.event
|
||||
|
||||
@@ -32,7 +32,7 @@ return{
|
||||
mStr(R>=0 and R or 0,-82,280)
|
||||
end,
|
||||
score=function(P)return{P.stat.row<=100 and P.stat.row or 100,P.stat.time}end,
|
||||
scoreDisp=function(D)return D[1].." Rows "..toTime(D[2])end,
|
||||
scoreDisp=function(D)return D[1].." Lines "..toTime(D[2])end,
|
||||
comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]<b[2]end,
|
||||
getRank=function(P)
|
||||
if P.stat.row<100 then return end
|
||||
|
||||
@@ -32,7 +32,7 @@ return{
|
||||
mStr(R>=0 and R or 0,-82,280)
|
||||
end,
|
||||
score=function(P)return{P.stat.row<=100 and P.stat.row or 100,P.stat.time}end,
|
||||
scoreDisp=function(D)return D[1].." Rows "..toTime(D[2])end,
|
||||
scoreDisp=function(D)return D[1].." Lines "..toTime(D[2])end,
|
||||
comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]<b[2]end,
|
||||
getRank=function(P)
|
||||
if P.stat.row<100 then return end
|
||||
|
||||
@@ -49,7 +49,7 @@ return{
|
||||
mDraw(drawableText.eff,-82,475)
|
||||
end,
|
||||
score=function(P)return{P.modeData.point}end,
|
||||
scoreDisp=function(D)return D[1].." Rows"end,
|
||||
scoreDisp=function(D)return D[1].." Lines"end,
|
||||
comp=function(a,b)return a[1]>b[1]end,
|
||||
getRank=function(P)
|
||||
local L=P.modeData.point
|
||||
|
||||
@@ -37,11 +37,11 @@ return{
|
||||
gc.rectangle("fill",-125,375,90,4)
|
||||
end,
|
||||
score=function(P)return{P.stat.row<=200 and P.stat.row or 200,P.stat.time}end,
|
||||
scoreDisp=function(D)return D[1].." Rows "..toTime(D[2])end,
|
||||
scoreDisp=function(D)return D[1].." Lines "..toTime(D[2])end,
|
||||
comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]<b[2]end,
|
||||
getRank=function(P)
|
||||
local L=P.stat.row
|
||||
if L==200 then
|
||||
if L>=200 then
|
||||
local T=P.stat.time
|
||||
return
|
||||
T<=200 and 5 or
|
||||
|
||||
@@ -46,11 +46,11 @@ return{
|
||||
gc.rectangle("fill",-125,375,90,4)
|
||||
end,
|
||||
score=function(P)return{P.stat.row<=200 and P.stat.row or 200,P.stat.time}end,
|
||||
scoreDisp=function(D)return D[1].." Rows "..toTime(D[2])end,
|
||||
scoreDisp=function(D)return D[1].." Lines "..toTime(D[2])end,
|
||||
comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]<b[2]end,
|
||||
getRank=function(P)
|
||||
local L=P.stat.row
|
||||
if L==200 then
|
||||
if L>=200 then
|
||||
local T=P.stat.time
|
||||
return
|
||||
T<=180 and 5 or
|
||||
|
||||
@@ -50,4 +50,4 @@ return{
|
||||
T<=2200 and 2 or
|
||||
T<=3000 and 1
|
||||
end,
|
||||
}
|
||||
}
|
||||
@@ -48,6 +48,6 @@ return{
|
||||
T<=32 and 4 or
|
||||
T<=40 and 3 or
|
||||
T<=60 and 2 or
|
||||
T<=100 and 1
|
||||
T<=120 and 1
|
||||
end,
|
||||
}
|
||||
@@ -19,7 +19,6 @@ return{
|
||||
env={
|
||||
drop=30,lock=45,
|
||||
freshLimit=10,
|
||||
visible="time",
|
||||
task=function(P)
|
||||
if not P.control then return end
|
||||
P.modeData.counter=P.modeData.counter+1
|
||||
|
||||
@@ -19,7 +19,6 @@ return{
|
||||
env={
|
||||
drop=30,lock=45,
|
||||
freshLimit=10,
|
||||
visible="time",
|
||||
task=function(P)
|
||||
if not P.control then return end
|
||||
P.modeData.counter=P.modeData.counter+1
|
||||
|
||||
@@ -19,7 +19,6 @@ return{
|
||||
env={
|
||||
drop=30,lock=45,
|
||||
freshLimit=10,
|
||||
visible="time",
|
||||
task=function(P)
|
||||
if not P.control then return end
|
||||
P.modeData.counter=P.modeData.counter+1
|
||||
|
||||
@@ -19,7 +19,6 @@ return{
|
||||
env={
|
||||
drop=30,lock=45,
|
||||
freshLimit=10,
|
||||
visible="time",
|
||||
task=function(P)
|
||||
if not P.control then return end
|
||||
P.modeData.counter=P.modeData.counter+1
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
local format=string.format
|
||||
local function tech_check_ultimate(P)
|
||||
if #P.cleared>0 and P.lastClear<10 or P.lastClear==74 then
|
||||
Event.lose(P)
|
||||
@@ -39,15 +40,15 @@ return{
|
||||
mDraw(drawableText.eff,-82,475)
|
||||
end,
|
||||
score=function(P)return{P.stat.row<=200 and P.stat.row or 200,P.stat.time}end,
|
||||
scoreDisp=function(D)return D[1].." Rows "..toTime(D[2])end,
|
||||
scoreDisp=function(D)return D[1].." Lines "..toTime(D[2])end,
|
||||
comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]<b[2]end,
|
||||
getRank=function(P)
|
||||
local L=P.stat.row
|
||||
return
|
||||
L==200 and 5 or
|
||||
L==126 and 4 or
|
||||
L==90 and 3 or
|
||||
L==60 and 2 or
|
||||
L==30 and 1
|
||||
L>=200 and 5 or
|
||||
L>=126 and 4 or
|
||||
L>=90 and 3 or
|
||||
L>=60 and 2 or
|
||||
L>=30 and 1
|
||||
end,
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
local format=string.format
|
||||
local function tech_check_easy(P)
|
||||
if #P.cleared>0 and P.b2b<40 then
|
||||
Event.lose(P)
|
||||
@@ -39,15 +40,15 @@ return{
|
||||
mDraw(drawableText.eff,-82,475)
|
||||
end,
|
||||
score=function(P)return{P.stat.row<=200 and P.stat.row or 200,P.stat.time}end,
|
||||
scoreDisp=function(D)return D[1].." Rows "..toTime(D[2])end,
|
||||
scoreDisp=function(D)return D[1].." Lines "..toTime(D[2])end,
|
||||
comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]<b[2]end,
|
||||
getRank=function(P)
|
||||
local L=P.stat.row
|
||||
return
|
||||
L==200 and 5 or
|
||||
L==126 and 4 or
|
||||
L==90 and 3 or
|
||||
L==60 and 2 or
|
||||
L==30 and 1
|
||||
L>=200 and 5 or
|
||||
L>=126 and 4 or
|
||||
L>=90 and 3 or
|
||||
L>=60 and 2 or
|
||||
L>=30 and 1
|
||||
end,
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
local format=string.format
|
||||
local function tech_check_ultimate(P)
|
||||
if #P.cleared>0 and P.lastClear<10 or P.lastClear==74 then
|
||||
Event.lose(P)
|
||||
@@ -39,15 +40,15 @@ return{
|
||||
mDraw(drawableText.eff,-82,475)
|
||||
end,
|
||||
score=function(P)return{P.stat.row<=200 and P.stat.row or 200,P.stat.time}end,
|
||||
scoreDisp=function(D)return D[1].." Rows "..toTime(D[2])end,
|
||||
scoreDisp=function(D)return D[1].." Lines "..toTime(D[2])end,
|
||||
comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]<b[2]end,
|
||||
getRank=function(P)
|
||||
local L=P.stat.row
|
||||
return
|
||||
L==200 and 5 or
|
||||
L==140 and 4 or
|
||||
L==90 and 3 or
|
||||
L==60 and 2 or
|
||||
L==30 and 1
|
||||
L>=200 and 5 or
|
||||
L>=140 and 4 or
|
||||
L>=90 and 3 or
|
||||
L>=60 and 2 or
|
||||
L>=30 and 1
|
||||
end,
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
local format=string.format
|
||||
local function tech_check_hard(P)
|
||||
if #P.cleared>0 and P.lastClear<10 then
|
||||
Event.lose(P)
|
||||
@@ -39,15 +40,15 @@ return{
|
||||
mDraw(drawableText.eff,-82,475)
|
||||
end,
|
||||
score=function(P)return{P.stat.row<=200 and P.stat.row or 200,P.stat.time}end,
|
||||
scoreDisp=function(D)return D[1].." Rows "..toTime(D[2])end,
|
||||
scoreDisp=function(D)return D[1].." Lines "..toTime(D[2])end,
|
||||
comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]<b[2]end,
|
||||
getRank=function(P)
|
||||
local L=P.stat.row
|
||||
return
|
||||
L==200 and 5 or
|
||||
L==140 and 4 or
|
||||
L==90 and 3 or
|
||||
L==60 and 2 or
|
||||
L==30 and 1
|
||||
L>=200 and 5 or
|
||||
L>=140 and 4 or
|
||||
L>=90 and 3 or
|
||||
L>=60 and 2 or
|
||||
L>=30 and 1
|
||||
end,
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
local format=string.format
|
||||
local function tech_check_ultimate(P)
|
||||
if #P.cleared>0 and P.lastClear<10 or P.lastClear==74 then
|
||||
Event.lose(P)
|
||||
@@ -39,15 +40,15 @@ return{
|
||||
mDraw(drawableText.eff,-82,475)
|
||||
end,
|
||||
score=function(P)return{P.stat.row<=200 and P.stat.row or 200,P.stat.time}end,
|
||||
scoreDisp=function(D)return D[1].." Rows "..toTime(D[2])end,
|
||||
scoreDisp=function(D)return D[1].." Lines "..toTime(D[2])end,
|
||||
comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]<b[2]end,
|
||||
getRank=function(P)
|
||||
local L=P.stat.row
|
||||
return
|
||||
L==200 and 5 or
|
||||
L==126 and 4 or
|
||||
L==80 and 3 or
|
||||
L==50 and 2 or
|
||||
L==20 and 1
|
||||
L>=200 and 5 or
|
||||
L>=126 and 4 or
|
||||
L>=80 and 3 or
|
||||
L>=50 and 2 or
|
||||
L>=20 and 1
|
||||
end,
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
local format=string.format
|
||||
local function tech_check_easy(P)
|
||||
if #P.cleared>0 and P.b2b<40 then
|
||||
Event.lose(P)
|
||||
@@ -39,15 +40,15 @@ return{
|
||||
mDraw(drawableText.eff,-82,475)
|
||||
end,
|
||||
score=function(P)return{P.stat.row<=200 and P.stat.row or 200,P.stat.time}end,
|
||||
scoreDisp=function(D)return D[1].." Rows "..toTime(D[2])end,
|
||||
scoreDisp=function(D)return D[1].." Lines "..toTime(D[2])end,
|
||||
comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]<b[2]end,
|
||||
getRank=function(P)
|
||||
local L=P.stat.row
|
||||
return
|
||||
L==200 and 5 or
|
||||
L==126 and 4 or
|
||||
L==80 and 3 or
|
||||
L==50 and 2 or
|
||||
L==20 and 1
|
||||
L>=200 and 5 or
|
||||
L>=126 and 4 or
|
||||
L>=80 and 3 or
|
||||
L>=50 and 2 or
|
||||
L>=20 and 1
|
||||
end,
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
local format=string.format
|
||||
local function tech_check_ultimate(P)
|
||||
if #P.cleared>0 and P.lastClear<10 or P.lastClear==74 then
|
||||
Event.lose(P)
|
||||
@@ -40,15 +41,15 @@ return{
|
||||
mDraw(drawableText.eff,-82,475)
|
||||
end,
|
||||
score=function(P)return{P.stat.row<=200 and P.stat.row or 200,P.stat.time}end,
|
||||
scoreDisp=function(D)return D[1].." Rows "..toTime(D[2])end,
|
||||
scoreDisp=function(D)return D[1].." Lines "..toTime(D[2])end,
|
||||
comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]<b[2]end,
|
||||
getRank=function(P)
|
||||
local L=P.stat.row
|
||||
return
|
||||
L==200 and 5 or
|
||||
L==150 and 4 or
|
||||
L==100 and 3 or
|
||||
L==70 and 2 or
|
||||
L==40 and 1
|
||||
L>=200 and 5 or
|
||||
L>=150 and 4 or
|
||||
L>=100 and 3 or
|
||||
L>=70 and 2 or
|
||||
L>=40 and 1
|
||||
end,
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
local format=string.format
|
||||
local function tech_check_hard(P)
|
||||
if #P.cleared>0 and P.lastClear<10 then
|
||||
Event.lose(P)
|
||||
@@ -40,15 +41,15 @@ return{
|
||||
mDraw(drawableText.eff,-82,475)
|
||||
end,
|
||||
score=function(P)return{P.stat.row<=200 and P.stat.row or 200,P.stat.time}end,
|
||||
scoreDisp=function(D)return D[1].." Rows "..toTime(D[2])end,
|
||||
scoreDisp=function(D)return D[1].." Lines "..toTime(D[2])end,
|
||||
comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]<b[2]end,
|
||||
getRank=function(P)
|
||||
local L=P.stat.row
|
||||
return
|
||||
L==200 and 5 or
|
||||
L==150 and 4 or
|
||||
L==100 and 3 or
|
||||
L==70 and 2 or
|
||||
L==40 and 1
|
||||
L>=200 and 5 or
|
||||
L>=150 and 4 or
|
||||
L>=100 and 3 or
|
||||
L>=70 and 2 or
|
||||
L>=40 and 1
|
||||
end,
|
||||
}
|
||||
@@ -213,7 +213,7 @@ function Pnt.mode()
|
||||
local M=MM[_]
|
||||
if R[_]then
|
||||
gc.setLineWidth(8)
|
||||
gc.setColor(1,1,1,.15)
|
||||
gc.setColor(1,1,1,.2)
|
||||
for _=1,#M.unlock do
|
||||
local m=M.unlock[_]
|
||||
if R[m]then
|
||||
@@ -223,8 +223,8 @@ function Pnt.mode()
|
||||
end
|
||||
|
||||
local S=M.size
|
||||
local d=((M.x-(cam.x1-180)/cam.k1)^2+(M.y-cam.y1/cam.k1)^2)^.5
|
||||
if d<600 then S=S*(1.3-d*0.0005) end
|
||||
local d=((M.x-(cam.x1+(cam.sel and -180 or 0))/cam.k1)^2+(M.y-cam.y1/cam.k1)^2)^.55
|
||||
if d<500 then S=S*(1.25-d*0.0005) end
|
||||
gc.setColor(modeRankColor[modeRanks[M.id]])
|
||||
if M.shape==1 then--Rectangle
|
||||
gc.rectangle("fill",M.x-S,M.y-S,2*S,2*S)
|
||||
|
||||
21
scene.lua
21
scene.lua
@@ -47,7 +47,7 @@ local sceneInit={
|
||||
end
|
||||
end,
|
||||
mode=function()
|
||||
curBG="none"
|
||||
curBG="glow"
|
||||
BGM("blank")
|
||||
destroyPlayers()
|
||||
mapCam.zoomK=scene.swap.tar=="mode"and 5 or 1
|
||||
@@ -236,7 +236,8 @@ function scene.push(tar,style)
|
||||
end
|
||||
end
|
||||
function scene.pop()
|
||||
scene.seq={}
|
||||
local _=scene.seq
|
||||
_[#_-1]=nil
|
||||
end
|
||||
function scene.swapTo(tar,style)
|
||||
local S=scene.swap
|
||||
@@ -253,15 +254,13 @@ function scene.swapTo(tar,style)
|
||||
end
|
||||
end
|
||||
function scene.back()
|
||||
if not scene.swapping then
|
||||
if backFunc[scene.cur] then backFunc[scene.cur]()end
|
||||
--func when scene end
|
||||
local m=#scene.seq
|
||||
if m>0 then
|
||||
scene.swapTo(scene.seq[m-1],scene.seq[m])
|
||||
scene.seq[m],scene.seq[m-1]=nil
|
||||
--Poll&Back to preScene
|
||||
end
|
||||
if backFunc[scene.cur] then backFunc[scene.cur]()end
|
||||
--func when scene end
|
||||
local m=#scene.seq
|
||||
if m>0 then
|
||||
scene.swapTo(scene.seq[m-1],scene.seq[m])
|
||||
scene.seq[m],scene.seq[m-1]=nil
|
||||
--Poll&Back to preScene
|
||||
end
|
||||
end
|
||||
return scene
|
||||
@@ -20,7 +20,7 @@ end
|
||||
|
||||
function toTime(s)
|
||||
if s<60 then
|
||||
return format("%.2fs",s)
|
||||
return format("%.3fs",s)
|
||||
elseif s<3600 then
|
||||
return format("%dm%.2fs",int(s/60),s%60)
|
||||
else
|
||||
@@ -95,7 +95,7 @@ local drawableTextLoad={
|
||||
"noScore",
|
||||
"highScore",
|
||||
}
|
||||
function swapLanguage(l)
|
||||
function changeLanguage(l)
|
||||
text=require("language/"..langID[l])
|
||||
for S,L in next,Widget do
|
||||
for N,W in next,L do
|
||||
@@ -305,6 +305,7 @@ function loadGame(M)
|
||||
drawableText.levelName:set(M.level[lang])
|
||||
needResetGameData=true
|
||||
scene.swapTo("play","fade_togame")
|
||||
SFX("enter")
|
||||
end
|
||||
function resetPartGameData()
|
||||
gameResult=false
|
||||
@@ -614,8 +615,8 @@ function saveSetting()
|
||||
F:flush()
|
||||
F:close()
|
||||
if _ then
|
||||
TEXT(text.settingSaved,640,360,80,"appear")
|
||||
TEXT(text.settingSaved,370,330,30,"appear")
|
||||
else
|
||||
TEXT(text.settingSavingError..mes,640,360,40,"appear",.4)
|
||||
TEXT(text.settingSavingError.."123",370,350,20,"appear",.3)
|
||||
end
|
||||
end
|
||||
@@ -35,12 +35,19 @@ Future outlook:
|
||||
more FXs & 3d features & animations
|
||||
Encrypt source code(compile to byte code)
|
||||
0.8.6:
|
||||
gamepad can adjust key
|
||||
add SFX when enter game
|
||||
map GUI little adjusted
|
||||
event system little changed(no ctrl when scene swapping)
|
||||
bug fixed(rank system,some mode error when enter)
|
||||
0.8.5-:
|
||||
mode map!Brandly new GUI for mode selecting
|
||||
mode unlock system,not that scary for noob
|
||||
every mode has rank calculating method(may some mistakes/inappropriate number)
|
||||
save 10 best recoreds for each mode
|
||||
can save/share custom map now
|
||||
new mode:Big Bang
|
||||
button appearance changed
|
||||
better widget performence
|
||||
many bug fixed
|
||||
0.8.4:
|
||||
|
||||
@@ -142,7 +142,7 @@ local Widget={
|
||||
stat= newButton(370,460,200,160,C.lightCyan, 43,function()scene.push()scene.swapTo("stat")end, nil,"lang"),
|
||||
lang= newButton(150,610,160,100,C.lightGreen, 45,function()
|
||||
setting.lang=setting.lang%#langName+1
|
||||
swapLanguage(setting.lang)
|
||||
changeLanguage(setting.lang)
|
||||
TEXT(text.lang,370,610,50,"appear",1.6)
|
||||
end,nil,"quit"),
|
||||
quit= newButton(590,460,200,160,C.lightGrey, 55,function()VOICE("bye")scene.swapTo("quit","slowFade")end,nil,"play"),
|
||||
|
||||
Reference in New Issue
Block a user