Compare commits

...

8 Commits

23 changed files with 72 additions and 49 deletions

View File

@@ -390,7 +390,7 @@ function love.errorhandler(msg)
--Write messages to log file
love.filesystem.append("conf/error.log",
os.date("%Y/%m/%d %A %H:%M:%S\n")..
#ERRDATA.." crash(es) "..SYSTEM.."-"..VERSION_NAME.." scene: "..scn.."\n"..
#ERRDATA.." crash(es) "..SYSTEM.."-"..VERSION.string.." scene: "..scn.."\n"..
table.concat(err,"\n",1,c-2).."\n\n"
)
@@ -432,7 +432,7 @@ function love.errorhandler(msg)
setFont(100)gc_print(":(",100,0,0,1.2)
setFont(40)gc.printf(errorMsg,100,160,SCR.w0-100)
setFont(20)
gc_print(SYSTEM.."-"..VERSION_NAME.." scene:"..(SCN and SCN.cur or"NULL"),100,660)
gc_print(SYSTEM.."-"..VERSION.string.." scene:"..(SCN and SCN.cur or"NULL"),100,660)
gc.printf(err[1],100,360,1260-100)
gc_print("TRACEBACK",100,450)
for i=4,#err-2 do

View File

@@ -4,7 +4,7 @@ local ins,rem=table.insert,table.remove
local debugMesList={}
local debugMesHistory={
"Version: "..VERSION_NAME,
"Version: "..VERSION.string,
os.date("Launched at %Y/%m/%d %H:%M"),
}
local LOG={}

View File

@@ -1,6 +1,8 @@
-- local host="192.168.114.102"
-- local host="127.0.0.1"
local host="hdustea.3322.org"
-- local host="192.168.114.102"
-- local host="krakens.tpddns.cn"
-- local host="hdustea.3322.org"
local host="game.techmino.org"
local port="10026"
local path="/tech/socket/v1"

View File

@@ -1,5 +1,8 @@
VERSION_CODE=1400
VERSION_NAME="Alpha V0.14.0"
VERSION={
code=1401,
string="Alpha V0.14.1",
name="黎明 Dawn",
}
function love.conf(t)
t.identity="Techmino"--Saving folder
t.version="11.1"
@@ -12,7 +15,7 @@ function love.conf(t)
end
local W=t.window
W.title="Techmino "..VERSION_NAME
W.title="Techmino "..VERSION.string
W.icon="media/image/icon.png"
W.width,W.height=1280,720
W.minwidth,W.minheight=640,360

View File

@@ -34,7 +34,7 @@ love.keyboard.setTextInput(false)
love.mouse.setVisible(false)
--Create directories
for _,v in next,{"conf","record","replay"}do
for _,v in next,{"conf","record","replay","cache"}do
local info=fs.getInfo(v)
if not info then
fs.createDirectory(v)
@@ -327,9 +327,9 @@ do
end
USER.username=nil
if STAT.version~=VERSION_CODE then
if STAT.version~=VERSION.code then
newVersionLaunch=true
STAT.version=VERSION_CODE
STAT.version=VERSION.code
FILE.save(STAT,"conf/data","q")
end

View File

@@ -956,7 +956,7 @@ do--function saveRecording()
local fileHead=
os.date("%Y/%m/%d %A %H:%M:%S\n")..
GAME.curModeName.."\n"..
VERSION_NAME.."\n"..
VERSION.string.."\n"..
(USER.username or"Player")
local fileBody=
GAME.seed.."\n"..

View File

@@ -305,7 +305,7 @@ if S then--Statistics
STAT=S
else
STAT={
version=VERSION_CODE,
version=VERSION.code,
run=0,game=0,time=0,frame=0,
key=0,rotate=0,hold=0,
extraPiece=0,finesseRate=0,

View File

@@ -924,7 +924,7 @@ return{
{"gggf",
"gggf kissne",
"name",
"Tetris Research community member.\nPersonal bests: Sprint 22.831 seconds (25.483 seconds on mobile), MPH Sprint 56 seconds, U rank on Tetr.io\nOne of the top players of 20G in China, achieved almost every achievement in TGM3.",
"Tetris Research community member.\nPersonal bests: Sprint 22.831 seconds (25.483 seconds on mobile), MPH Sprint 56 seconds, X rank on Tetr.io\nOne of the top players of 20G in China, achieved almost every achievement in TGM3.",
"https://space.bilibili.com/287769888",
},
{"xb",

View File

@@ -934,7 +934,7 @@ return{
{"gggf",
"gggf kissne t127",
"name",
"【研究群】「T127」\n40行22.831秒(手机25.483)MPH40行56秒tetr.io段位Utop数据约60L85A\n20G规则国内一流玩家拿到了TGM3几乎全部的最终成就(全世界都没几个)\n其他名称:小柒 kissne 127\n还是车车人,几个正作成绩:永EX NM 1B FS 风L NM",
"【研究群】「T127」\n40行22.831秒(手机25.483)MPH40行56秒tetr.io段位X数据约60L95A\n20G规则国内一流玩家拿到了TGM3几乎全部的最终成就(全世界都没几个)\n其他名称:小柒 kissne 127\n还是车车人,几个正作成绩:永EX NM 1B FS 风L NM",
"https://space.bilibili.com/287769888",
},
{"xb",

View File

@@ -73,6 +73,7 @@ return{
getVersionFail="Update detection failed",
oldVersion="Version $1 is now available!",
needUpdate="Newer version required!",
noInternet="Not connected to the network",
notFinished="Coming soon!",
jsonError="JSON error",

View File

@@ -74,6 +74,7 @@ return{
getVersionFail="Echec d'obtention de la dernière version",
oldVersion="La version $1 est disponible !",
-- needUpdate="Newer version required!",
-- noInternet="Not connected to the network",
-- notFinished="Coming soon!",
jsonError="Erreur json",

View File

@@ -73,6 +73,7 @@ return{
getVersionFail="Falha ao detectar uma versão nova",
oldVersion="Versão $1 esta disponível agora!",
-- needUpdate="Newer version required!",
-- noInternet="Not connected to the network",
-- notFinished="Coming soon!",
jsonError="Json error",

View File

@@ -74,6 +74,7 @@ return{
getVersionFail="Error al buscar nuevas versiones.",
oldVersion="¡Está disponible la nueva versión $1!",
needUpdate="¡Nueva versión requerida!",
-- noInternet="Not connected to the network",
notFinished="Próximamente",
jsonError="Error en Json",

View File

@@ -72,7 +72,8 @@ return{
getNoticeFail="拉取公告失败",
getVersionFail="检测新版本失败",
oldVersion="最新版本$1可以下载了!",
needUpdate="此功能需要更新游戏!",
needUpdate="更新游戏!",
noInternet="还未连接到网络",
notFinished="暂未完成,敬请期待!",
jsonError="json错误",

View File

@@ -3,6 +3,7 @@ return{
env={
drop=30,
freshLimit=15,
pushSpeed=5,
garbageSpeed=2,
noMod=true,
bg="space",

View File

@@ -2,6 +2,7 @@ local data=love.data
local ins,rem=table.insert,table.remove
local WS,TIME=WS,TIME
local NET={
connected=false,
allow_online=false,
roomList={},
accessToken=false,
@@ -141,15 +142,13 @@ function NET.storeUserInfo(res)
local user=USERS[res.uid]
if not user then
user={}
user.email=res.email
user.name=res.username
USERS[res.uid]=user
else
user.email=res.email
user.name=res.username
if not user.motto then user.motto=res.motto end
if not user.avatar then user.avatar=res.avatar end
end
user.uid=res.uid
user.email=res.email
user.username=res.username
user.motto=res.motto
user.avatar=res.avatar
--Get own name
if res.uid==USER.uid then
@@ -173,13 +172,13 @@ function NET.fetchRoom()
})
end
end
function NET.createRoom()
function NET.createRoom(roomType,name)
if NET.lock("enterRoom",3)then
WS.send("play",JSON.encode{
action=1,
data={
type="classic",
name=(USER.username or"???").."'s room",
type=roomType,
name=name,
password=nil,
config=dumpBasicConfig(),
}
@@ -247,10 +246,9 @@ function NET.updateWS_app()
else
local res=_parse(message)
if res then
if VERSION_CODE>=res.lowest then
NET.allow_online=true
end
if VERSION_CODE<res.newestCode then
NET.connected=true
NET.allow_online=VERSION.code>=res.lowest
if VERSION.code<res.newestCode then
LOG.print(text.oldVersion:gsub("$1",res.newestName),180,COLOR.sky)
end
LOG.print(res.notice,300,COLOR.sky)

View File

@@ -537,7 +537,7 @@ local function log_user(str)
log(noLog and"CHEATER."or tostring(str))
end
local userG={
_VERSION=VERSION_CODE,
_VERSION=VERSION.code,
assert=assert,error=error,
tonumber=tonumber,tostring=tostring,
select=select,next=next,

View File

@@ -9,7 +9,7 @@ local scene={}
function scene.sceneInit()
BGcolor=rnd()>.026 and{.3,.5,.9}or{.62,.3,.926}
stateInfo=SYSTEM.."-"..VERSION_NAME.." scene:"..ERRDATA[#ERRDATA].scene
stateInfo=SYSTEM.."-"..VERSION.string.." scene:"..ERRDATA[#ERRDATA].scene
errorText=LOADED and text.errorMsg or"An error has occurred during loading.\nError info has been created, and you can send it to the author."
errorShot,errorInfo=ERRDATA[#ERRDATA].shot,ERRDATA[#ERRDATA].mes
if SETTING then SFX.fplay("error",SETTING.voc*.8 or 0)end

View File

@@ -2,7 +2,7 @@ local gc=love.graphics
local scene={}
local verName=SYSTEM.." "..VERSION_NAME
local verName=("%s %s %s"):format(SYSTEM,VERSION.string,VERSION.name)
local tipLength=760
local tip=gc.newText(getFont(30),"")
local scrollX--Tip scroll position
@@ -72,7 +72,10 @@ function scene.keyDown(key)
elseif key=="a"then
if testButton(3)then
if WS.status("user")=="running"then
if not NET.allow_online then
if not NET.connected then
TEXT.show(text.noInternet,640,450,60,"flicker")
SFX.play("finesseError")
elseif not NET.allow_online then
TEXT.show(text.needUpdate,640,450,60,"flicker")
SFX.play("finesseError")
else

View File

@@ -17,7 +17,7 @@ end
scene.widgetList={
WIDGET.newText{name="system", x=750,y=280,fText=SYSTEM,color="white",font=30,align="L"},
WIDGET.newText{name="version", x=950,y=280,fText=VERSION_NAME,color="white",font=30,align="L"},
WIDGET.newText{name="version", x=950,y=280,fText=VERSION.string,color="white",font=30,align="L"},
WIDGET.newButton{name="sprint", x=260,y=480,w=260,font=50,code=function()loadGame("sprint_40l",true)end},
WIDGET.newButton{name="marathon",x=640,y=480,w=260,font=50,code=function()loadGame("marathon_n",true)end},
WIDGET.newButton{name="setting",x=1000,y=400,w=120,fText="...",font=50,code=goScene"setting_game"},

View File

@@ -245,26 +245,20 @@ function scene.draw()
else
for i=1,#PLY_NET do
local p=PLY_NET[i]
gc.setColor(1,1,1)
--Rectangle
gc.setColor(COLOR[p.ready and"G"or"white"])
gc.setLineWidth(4)
gc.rectangle("line",40,65+50*i,1200,50)
gc.rectangle("line",40,67+50*i,1200,42)
--Username
gc.setColor(1,1,1)
setFont(40)
gc.print(p.username,230,60+50*i)
gc.print(p.username,200,60+50*i)
--UID
gc.setColor(.5,.5,.5)
gc.print("#"..p.uid,90,60+50*i)
if p.ready then
gc.setColor(.4,1,.4)
else
gc.setColor(1,1,1)
end
gc.rectangle("fill",50,60+50*i+14,30,30)
gc.print("#"..p.uid,50,60+50*i)
end
end
--New message

View File

@@ -1,4 +1,5 @@
local gc=love.graphics
local kb=love.keyboard
local NET=NET
local scrollPos,selected
@@ -29,7 +30,16 @@ function scene.keyDown(k)
end
elseif k=="n"then
if TIME()-lastCreateRoomTime>16.2 then
NET.createRoom()
NET.createRoom(
kb.isDown("1")and"solo"or
kb.isDown("2")and"classic"or
tonumber(USER.uid)<100 and(
kb.isDown("3")and"r49"or
kb.isDown("4")and"r99"or
kb.isDown("5")and"unlimited"
)or"solo",
(USER.username or"???").."'s room"
)
lastCreateRoomTime=TIME()
else
LOG.print(text.createRoomTooFast,"warn")

View File

@@ -22,6 +22,13 @@ return SPLITSTR([=[
可选虚拟按键颜色; 工程编译到字节码; task-Z(新AI)
录像回放菜单; 跳帧开关; 教学关; 超60帧; 热更新
0.14.1: 黎明 Dawn
改动:
为了更好的游戏体验,手机只能开单挑房,电脑开多人房(不建议),特殊用户可以开更大的房
增加联网对战模式的垃圾行上涨速度
修复:
一些联网对战的bug
0.14.0: 地平线 The Horizon
新增:
重新开放联网对战测试!!!
@@ -31,9 +38,9 @@ return SPLITSTR([=[
新模式:Backfire(四个难度)
新背景:BlackHole(用于Backfire)
新增BGM:echo(用于Backfire), hang out(用于两个小程序)
调整自定义场地的ui可以看到鼠标不同按键对应画笔颜色
调整自定义场地的ui,可以看到鼠标不同按键对应画笔颜色
小程序DTW增加双押功能
新增绘制优化设置(手机开启可能加速,花屏可能关闭解决)
新增绘制优化设置(手机开启可能加速,电脑花屏关闭可能解决)
改动:
错误处理机制大升级,更不容易闪退(CC爆炸除外)
赞助名单移至staff场景并添加动画(已经在榜上的可以来定制颜色!)