Compare commits

...

6 Commits

Author SHA1 Message Date
MrZ_26
373c8a8a5f 版本推进 2022-04-04 05:29:54 +08:00
MrZ_26
2207f7e414 添加少许魔法
框架跟进
2022-04-04 05:25:42 +08:00
MrZ_26
984bb7d6a6 词典调整 2022-04-04 04:57:20 +08:00
Richard969
664afb0bb3 Added a mino list in Zictionary (#679) 2022-04-04 04:53:02 +08:00
MrZ_26
716a08b31d 着色器技术飞跃
框架跟进
2022-04-03 02:41:49 +08:00
MrZ_26
a6c63c41b6 限制着色器们输入的时间范围防止精度问题导致掉帧(略暴力,会导致一个背景连续40分钟左右后会闪烁一次) 2022-04-03 00:40:21 +08:00
40 changed files with 125 additions and 140 deletions

View File

@@ -10,8 +10,6 @@ Powered by LÖVE, © 20062022 LÖVE Development Team.
Lua is free software distributed under the terms of the MIT license. Copyright © 19942022 by Lua.org, PUC-Rio.
SIMPLE LOVE LIGHTS is under a MIT License. Created by Dylan Hunn.
json.lua is copyrighted by rxi. © 2022 rxi.
IBM Plex is copyrighted by the International Business Machines Corporation. IBM and IBM Plex are trademarks of IBM Corp, registered in many jurisdictions worldwide. IBM Plex is licensed under the SIL Open Font License, Version 1.1.

View File

@@ -190,9 +190,6 @@ Z.setDebugInfo{
{"Voices",VOC.getQueueCount},
{"Audios",love.audio.getSourceCount},
}
Z.setOnResize(function(w,_)
SHADER.warning:send('w',w*SCR.dpi)
end)
do--Z.setOnFocus
local function task_autoSoundOff()
while true do
@@ -288,6 +285,15 @@ IMG.init{
xiaoyaCH='media/image/characters/xiaoya.png',
xiaoyaOmino='media/image/characters/xiaoya_Omino.png',
mikuCH='media/image/characters/miku.png',
z={
character='media/image/characters/z_character.png',
screen1='media/image/characters/z_screen1.png',
screen2='media/image/characters/z_screen2.png',
particle1='media/image/characters/z_particle1.png',
particle2='media/image/characters/z_particle2.png',
particle3='media/image/characters/z_particle3.png',
particle4='media/image/characters/z_particle4.png',
},
electric='media/image/characters/electric.png',
hbm='media/image/characters/hbm.png',

Binary file not shown.

After

Width:  |  Height:  |  Size: 131 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 418 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 693 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 458 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 491 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View File

@@ -5,19 +5,15 @@ local shader=SHADER.aura
local t
function back.init()
t=math.random()*2600
t=math.random()*260
BG.resize(SCR.w,SCR.h)
end
function back.resize(_,h)
shader:send('w',SCR.W)
shader:send('h',h*SCR.dpi)
end
function back.update(dt)
t=t+dt
t=(t+dt)%2600
end
function back.draw()
gc.clear(.08,.08,.084)
shader:send('t',t)
shader:send('phase',t)
gc.setShader(shader)
gc.rectangle('fill',0,0,SCR.w,SCR.h)
gc.setShader()

View File

@@ -5,18 +5,14 @@ local shader=SHADER.grad1
local t
function back.init()
t=math.random()*2600
back.resize()
end
function back.resize()
shader:send('w',SCR.W)
t=math.random()*260
end
function back.update(dt)
t=t+dt
t=(t+dt)%2600
end
function back.draw()
gc.clear(.08,.08,.084)
shader:send('t',t)
shader:send('phase',t)
gc.setShader(shader)
gc.rectangle('fill',0,0,SCR.w,SCR.h)
gc.setShader()

View File

@@ -5,18 +5,15 @@ local shader=SHADER.grad2
local t
function back.init()
t=math.random()*2600
t=math.random()*260
BG.resize(nil,SCR.h)
end
function back.resize(_,h)
shader:send('h',h*SCR.dpi)
end
function back.update(dt)
t=t+dt
t=(t+dt)%2600
end
function back.draw()
gc.clear(.08,.08,.084)
shader:send('t',t)
shader:send('phase',t)
gc.setShader(shader)
gc.rectangle('fill',0,0,SCR.w,SCR.h)
gc.setShader()

View File

@@ -5,19 +5,15 @@ local shader=SHADER.rgb1
local t
function back.init()
t=math.random()*2600
t=math.random()*260
BG.resize(SCR.w,SCR.h)
end
function back.resize(_,h)
shader:send('w',SCR.W)
shader:send('h',h*SCR.dpi)
end
function back.update(dt)
t=t+dt
t=(t+dt)%2600
end
function back.draw()
gc.clear(.08,.08,.084)
shader:send('t',t)
shader:send('phase',t)
gc.setShader(shader)
gc.rectangle('fill',0,0,SCR.w,SCR.h)
gc.setShader()

View File

@@ -5,19 +5,15 @@ local shader=SHADER.rgb2
local t
function back.init()
t=math.random()*2600
t=math.random()*260
BG.resize(SCR.w,SCR.h)
end
function back.resize(_,h)
shader:send('w',SCR.W)
shader:send('h',h*SCR.dpi)
end
function back.update(dt)
t=t+dt
t=(t+dt)%2600
end
function back.draw()
gc.clear(.08,.08,.084)
shader:send('t',t)
shader:send('phase',t)
gc.setShader(shader)
gc.rectangle('fill',0,0,SCR.w,SCR.h)
gc.setShader()

View File

@@ -785,6 +785,11 @@ return{
"term",
"Soft Drop Factor\n\nA way to define soft drop speed as a multiple of natural falling speed. In guideline games, the soft drop is usually 20x the speed of natural falling, i.e., it has an SDF of 20. Techmino does not use SDF to define soft drop speed.",
},
{"Shape & Names",
"mino",
"term",
"Z"..CHAR.mino.Z.." S"..CHAR.mino.S.." J"..CHAR.mino.J.." L"..CHAR.mino.L.." T"..CHAR.mino.T.." O"..CHAR.mino.O.." I"..CHAR.mino.I.." Z5"..CHAR.mino.Z5.." S5"..CHAR.mino.S5.." P"..CHAR.mino.P.." Q"..CHAR.mino.Q.." F"..CHAR.mino.F.." E"..CHAR.mino.E.." T5"..CHAR.mino.T5.." U"..CHAR.mino.U.." V"..CHAR.mino.V.." W"..CHAR.mino.W.." X"..CHAR.mino.X.." J5"..CHAR.mino.J5.." L5"..CHAR.mino.L5.." R"..CHAR.mino.R.." Y"..CHAR.mino.Y.." N"..CHAR.mino.N.." H"..CHAR.mino.H.." I5"..CHAR.mino.I5.." I3"..CHAR.mino.I3.." C"..CHAR.mino.C.." I2"..CHAR.mino.I2.." O1"..CHAR.mino.O1,
},
{"Bag7 generator",
"bag7bag randomgenerator",
"term",
@@ -1099,11 +1104,11 @@ return{
"Go to console, type “rm -s replay“ and then press enter/return.\nTake effect immediately.",
},
{"Delete cache",
"delete cache",
"delete cache",
"command",
"Go to console, type “rm -s cache” and then press enter/return.\nTake effect immediately.",
},
--English
{"SFX",
"soundeffects",

View File

@@ -785,6 +785,11 @@ return{
"term",
"Soft Drop Factor\n\nA way to define soft drop speed as a multiple of natural falling speed. In guideline games, the soft drop is usually 20x the speed of natural falling, i.e. it has an SDF of 20. Techmino does not use SDF to define soft drop speed.",
},
{"Shape & Names",
"mino",
"term",
"Z"..CHAR.mino.Z.." S"..CHAR.mino.S.." J"..CHAR.mino.J.." L"..CHAR.mino.L.." T"..CHAR.mino.T.." O"..CHAR.mino.O.." I"..CHAR.mino.I.." Z5"..CHAR.mino.Z5.." S5"..CHAR.mino.S5.." P"..CHAR.mino.P.." Q"..CHAR.mino.Q.." F"..CHAR.mino.F.." E"..CHAR.mino.E.." T5"..CHAR.mino.T5.." U"..CHAR.mino.U.." V"..CHAR.mino.V.." W"..CHAR.mino.W.." X"..CHAR.mino.X.." J5"..CHAR.mino.J5.." L5"..CHAR.mino.L5.." R"..CHAR.mino.R.." Y"..CHAR.mino.Y.." N"..CHAR.mino.N.." H"..CHAR.mino.H.." I5"..CHAR.mino.I5.." I3"..CHAR.mino.I3.." C"..CHAR.mino.C.." I2"..CHAR.mino.I2.." O1"..CHAR.mino.O1,
},
{"Bag7 generator",
"bag7bag randomgenerator",
"term",

View File

@@ -804,6 +804,11 @@ return{
"term",
"Soft Drop Factor软降速度因子倍率\n部分游戏中的软降机制就是在按住软降键时方块受到的重力变为原来的若干倍SDF就是这个变大的倍数。\n基本所有官块和TETR.IO使用这个机制但本游戏不使用。",
},
{"方块名称",
"mino",
"term",
"Z"..CHAR.mino.Z.." S"..CHAR.mino.S.." J"..CHAR.mino.J.." L"..CHAR.mino.L.." T"..CHAR.mino.T.." O"..CHAR.mino.O.." I"..CHAR.mino.I.." Z5"..CHAR.mino.Z5.." S5"..CHAR.mino.S5.." P"..CHAR.mino.P.." Q"..CHAR.mino.Q.." F"..CHAR.mino.F.." E"..CHAR.mino.E.." T5"..CHAR.mino.T5.." U"..CHAR.mino.U.." V"..CHAR.mino.V.." W"..CHAR.mino.W.." X"..CHAR.mino.X.." J5"..CHAR.mino.J5.." L5"..CHAR.mino.L5.." R"..CHAR.mino.R.." Y"..CHAR.mino.Y.." N"..CHAR.mino.N.." H"..CHAR.mino.H.." I5"..CHAR.mino.I5.." I3"..CHAR.mino.I3.." C"..CHAR.mino.C.." I2"..CHAR.mino.I2.." O1"..CHAR.mino.O1,
},
{"Bag7出块",
"bag出块 bag7bag",
"term",

View File

@@ -315,7 +315,6 @@ return{
Cold_Clear [MinusKelvin]
json.lua [rxi]
profile.lua [itraykov]
simple-love-lights [dylhunn]
]],
support="Support the author",
WidgetText={

View File

@@ -186,7 +186,6 @@ return{
Cold_Clear [MinusKelvin]
json.lua [rxi]
profile.lua [itraykov]
simple-love-lights [dylhunn]
]],
support="Apoyen al Autor",
WidgetText={

View File

@@ -282,7 +282,6 @@ return{
Cold_Clear [MinusKelvin]
json.lua [rxi]
profile.lua [itraykov]
simple-love-lights [dylhunn]
]],
support="Aider le créateur",
WidgetText={

View File

@@ -317,7 +317,6 @@ return{
Cold_Clear [MinusKelvin]
json.lua [rxi]
profile.lua [itraykov]
simple-love-lights [dylhunn]
]],
support="Dukung pencipta",
WidgetText={

View File

@@ -317,7 +317,6 @@ return{
Cold_Clear [MinusKelvin]
json.lua [rxi]
profile.lua [itraykov]
simple-love-lights [dylhunn]
]],
support="Support the Author",
WidgetText={

View File

@@ -304,7 +304,6 @@ return{
Cold_Clear [MinusKelvin]
json.lua [rxi]
profile.lua [itraykov]
simple-love-lights [dylhunn]
]],
support="Support author",
WidgetText={

View File

@@ -316,7 +316,6 @@ return{
Cold_Clear [MinusKelvin]
json.lua [rxi]
profile.lua [itraykov]
simple-love-lights [dylhunn]
]],
support="支持作者",
WidgetText={

View File

@@ -314,7 +314,6 @@ return{
Cold_Clear [MinusKelvin]
json.lua [rxi]
profile.lua [itraykov]
simple-love-lights [dylhunn]
]],
support="供养作者!",
WidgetText={

View File

@@ -316,7 +316,6 @@ return{
Cold_Clear [MinusKelvin]
json.lua [rxi]
profile.lua [itraykov]
simple-love-lights [dylhunn]
]],
support="支持作者",
WidgetText={

View File

@@ -75,6 +75,21 @@ function scene.keyDown(key,isRep)
end
function scene.draw()
--Character
gc.push('transform')
local t=love.timer.getTime()
gc.setColor(1,1,1)
gc.translate(906,456)
gc.scale(.6)
GC.draw(IMG.z.character)
GC.draw(IMG.z.screen1, -91, -157+16*math.sin(t))
GC.draw(IMG.z.screen2, 120, -166+16*math.sin(t+1))
gc.setColor(1,1,1,.7+.3*math.sin(.6*t)) GC.draw(IMG.z.particle1, -50, 42+6*math.sin(t*0.36))
gc.setColor(1,1,1,.7+.3*math.sin(.7*t)) GC.draw(IMG.z.particle2, 110+6*math.sin(t*0.92), 55)
gc.setColor(1,1,1,.7+.3*math.sin(.8*t)) GC.draw(IMG.z.particle3, -54+6*math.sin(t*0.48), -248)
gc.setColor(1,1,1,.7+.3*math.sin(.9*t)) GC.draw(IMG.z.particle4, 133, -305+6*math.sin(t*0.40))
gc.pop()
gc_setColor(COLOR.Z)
--Scroller
@@ -89,23 +104,25 @@ function scene.draw()
if selected>2 then gc_print(bgmList[selected-2],322,350-50)end
if selected<#bgmList-1 then gc_print(bgmList[selected+2],322,350+110)end
--Title
if BGM.nowPlay then
GC.draw(TEXTURE.title,562,180,nil,.42)
local a=-t%2.3/2.3
gc_setColor(1,1,1,math.min(a,1))
GC.draw(TEXTURE.title_color,562,180,nil,.42+.062-.062*a)
end
--Music player
gc.draw(TEXTURE.title,840,220,nil,.5,nil,580,118)
if BGM.nowPlay then
local t=TIME()
setFont(45)
GC.shadedPrint(BGM.nowPlay,710,508,'left',2)
gc_setColor(sin(t*.5)*.2+.8,sin(t*.7)*.2+.8,sin(t)*.2+.8)
gc_print(BGM.nowPlay,710,508)
setFont(35)
gc_setColor(1,sin(t*2.6)*.5+.5,sin(t*2.6)*.5+.5)
gc_print(author[BGM.nowPlay]or"MrZ",670,465)
local a=-t%2.3/2
if a<1 then
gc_setColor(1,1,1,a)
gc.draw(TEXTURE.title_color,840,220,nil,.5+.062-.062*a,.5+.126-.126*a,580,118)
end
setFont(20)
gc_setColor(COLOR.Z)
local cur=BGM.playing:tell()

View File

@@ -1,4 +1,4 @@
extern float a;
vec4 effect(vec4 color,Image tex,vec2 tex_coords,vec2 scr_coords){
return vec4(1.,1.,1.,sign(Texel(tex,tex_coords).a)*a);
uniform float a;
vec4 effect(vec4 color,sampler2D tex,vec2 texCoord,vec2 scrCoord){
return vec4(1.,1.,1.,sign(texture2D(tex,texCoord).a)*a);
}

View File

@@ -1,42 +1,14 @@
#define PI 3.1415926535897932384626
extern float w,h;
extern float t;
vec4 effect(vec4 color,Image tex,vec2 tex_coords,vec2 scr_coords){
float x=scr_coords.x/w;
float y=scr_coords.y/h;
float dx,dy;
uniform float phase;
vec4 effect(vec4 color,sampler2D tex,vec2 texCoord,vec2 scrCoord){
float x=scrCoord.x/love_ScreenSize.x;
float y=scrCoord.y/love_ScreenSize.y;
vec3 V=vec3(0.);
V.r=V.r+smoothstep(1.26,0.,length(vec2(0.5+cos(phase*3.*0.26)*0.4-x,0.5-sin(phase*3.*0.62)*0.4-y)));
V.g=V.g+smoothstep(1.26,0.,length(vec2((0.5+cos(phase*3.*0.32)*0.4)-x,(0.5-sin(phase*3.*0.80)*0.4)-y)));
V.b=V.b+smoothstep(1.26,0.,length(vec2((0.5-cos(phase*3.*0.49)*0.4)-x,(0.5+sin(phase*3.*0.18)*0.4)-y)));
V.rg+=vec2(smoothstep(0.626,0.,length(vec2((0.5+cos(phase*0.53)*0.4)-x,(0.5-sin(phase*0.46)*0.4)-y))));
V.rb+=vec2(smoothstep(0.626,0.,length(vec2((0.5+cos(phase*0.98)*0.4)-x,(0.5+sin(phase*0.57)*0.4)-y))));
V.gb+=vec2(smoothstep(0.626,0.,length(vec2((0.5-cos(phase*0.86)*0.4)-x,(0.5-sin(phase*0.32)*0.4)-y))));
dx=0.5+cos(t*3.*0.26)*0.4-x;
dy=0.5-sin(t*3.*0.62)*0.4-y;
dx=sqrt(dx*dx+dy*dy);
V.r=V.r+smoothstep(1.26,0.,dx);
dx=(0.5+cos(t*3.*0.32)*0.4)-x;
dy=(0.5-sin(t*3.*0.80)*0.4)-y;
dx=sqrt(dx*dx+dy*dy);
V.g=V.g+smoothstep(1.26,0.,dx);
dx=(0.5-cos(t*3.*0.49)*0.4)-x;
dy=(0.5+sin(t*3.*0.18)*0.4)-y;
dx=sqrt(dx*dx+dy*dy);
V.b=V.b+smoothstep(1.26,0.,dx);
dx=(0.5+cos(t*0.53)*0.4)-x;
dy=(0.5-sin(t*0.46)*0.4)-y;
dx=sqrt(dx*dx+dy*dy);
V.rg+=vec2(smoothstep(0.626,0.,dx));
dx=(0.5+cos(t*0.98)*0.4)-x;
dy=(0.5+sin(t*0.57)*0.4)-y;
dx=sqrt(dx*dx+dy*dy);
V.rb+=vec2(smoothstep(0.626,0.,dx));
dx=(0.5-cos(t*0.86)*0.4)-x;
dy=(0.5-sin(t*0.32)*0.4)-y;
dx=sqrt(dx*dx+dy*dy);
V.gb+=vec2(smoothstep(0.626,0.,dx));
dx=1.626*max(max(V.r,V.g),V.b);
return vec4(V/dx,0.4);
return vec4(V/max(max(V.r,V.g),V.b)/1.626,0.4);
}

View File

@@ -1,10 +1,10 @@
extern float k,b;
vec4 effect(vec4 color,Image tex,vec2 tex_coords,vec2 scr_coords){
vec4 texcolor=Texel(tex,tex_coords);
uniform float k,b;
vec4 effect(vec4 color,sampler2D tex,vec2 texCoord,vec2 scrCoord){
vec4 texcolor=texture2D(tex,texCoord);
return vec4(
(b+texcolor.r*k)*color.r,
(b+texcolor.g*k)*color.g,
(b+texcolor.b*k)*color.b,
(texcolor.r*k+b)*color.r,
(texcolor.g*k+b)*color.g,
(texcolor.b*k+b)*color.b,
texcolor.a*color.a
);
}

View File

@@ -1,10 +1,10 @@
extern float k,b;
vec4 effect(vec4 color,Image tex,vec2 tex_coords,vec2 scr_coords){
vec4 texcolor=Texel(tex,tex_coords);
uniform float k,b;
vec4 effect(vec4 color,sampler2D tex,vec2 texCoord,vec2 scrCoord){
vec4 texcolor=texture2D(tex,texCoord);
return vec4(
(b+texcolor.r*k)*color.r,
(b+texcolor.g*k)*color.g,
(b+texcolor.b*k)*color.b,
(texcolor.r*k+b)*color.r,
(texcolor.g*k+b)*color.g,
(texcolor.b*k+b)*color.b,
texcolor.a*color.a
);
}

View File

@@ -1,9 +1,9 @@
extern float t,w;
vec4 effect(vec4 color,Image tex,vec2 tex_coords,vec2 scr_coords){
float x=scr_coords.x/w;
uniform float phase;
vec4 effect(vec4 color,sampler2D tex,vec2 texCoord,vec2 scrCoord){
float x=scrCoord.x/love_ScreenSize.x;
return vec4(
.8-x*.6,
.3+.2*sin(t),
.3+.2*sin(phase),
.15+x*.7,
.4
);

View File

@@ -1,10 +1,10 @@
extern float t,h;
vec4 effect(vec4 color,Image tex,vec2 tex_coords,vec2 scr_coords){
float y=scr_coords.y/h;
uniform float phase;
vec4 effect(vec4 color,sampler2D tex,vec2 texCoord,vec2 scrCoord){
float y=scrCoord.y/love_ScreenSize.y;
return vec4(
.8-y*.6,
.2+y*.4,
.3+.1*sin(t),
.3+.1*sin(phase),
.4
);
}

View File

@@ -1,5 +1,5 @@
vec4 effect(vec4 color,Image tex,vec2 tex_coords,vec2 scr_coords){
vec4 texcolor=Texel(tex,tex_coords);
vec4 effect(vec4 color,sampler2D tex,vec2 texCoord,vec2 scrCoord){
vec4 texcolor=texture2D(tex,texCoord);
return vec4(
pow(texcolor.r+.26,.7023),
pow(texcolor.g+.26,.7023),

View File

@@ -1,11 +1,11 @@
extern float t,w,h;
vec4 effect(vec4 color,Image tex,vec2 tex_coords,vec2 scr_coords){
float x=scr_coords.x/w;
float y=scr_coords.y/h;
uniform float phase;
vec4 effect(vec4 color,sampler2D tex,vec2 texCoord,vec2 scrCoord){
float x=scrCoord.x/love_ScreenSize.x;
float y=scrCoord.y/love_ScreenSize.y;
return vec4(
.8-y*.7+.2*sin(t/6.26),
.2+y*.5+.15*sin(t/4.),
.2+x*.6-.1*sin(t/2.83),
.8-y*.7+.2*sin(phase/6.26),
.2+y*.5+.15*sin(phase/4.),
.2+x*.6-.1*sin(phase/2.83),
.4
);
}

View File

@@ -1,11 +1,11 @@
extern float t,w,h;
vec4 effect(vec4 color,Image tex,vec2 tex_coords,vec2 scr_coords){
float x=scr_coords.x/w;
float y=scr_coords.y/h;
uniform float phase;
vec4 effect(vec4 color,sampler2D tex,vec2 texCoord,vec2 scrCoord){
float x=scrCoord.x/love_ScreenSize.x;
float y=scrCoord.y/love_ScreenSize.y;
return vec4(
.8-y*.8-.1*sin(t/6.26),
.4+.1*sin(t/4.)*(y+2.)/(y+5.),
abs(.7-x*1.4+y*.5*sin(t/16.)),
.8-y*.8-.1*sin(phase/6.26),
.4+.1*sin(phase/4.)*(y+2.)/(y+5.),
abs(.7-x*1.4+y*.5*sin(phase/16.)),
.4
);
}

View File

@@ -1,6 +1,6 @@
extern float w,level;
vec4 effect(vec4 color,Image tex,vec2 tex_coords,vec2 scr_coords){
float dx=abs(scr_coords.x/w-0.5);
uniform float level;
vec4 effect(vec4 color,sampler2D tex,vec2 texCoord,vec2 scrCoord){
float dx=abs(scrCoord.x/love_ScreenSize.x-0.5);
float a=(dx*2.6-.626)*level;
return vec4(1.,0.,0.,a);
}

View File

@@ -3,6 +3,11 @@ return[=[
R E M A K E
0.17.3: 矿井 Mine
改动:
一点魔法
代码:
升级着色器相关(aura背景表现应该好多了)
移除一个没用到的库(虽然也没一点点大)
修复:
修复Master-G一些问题
一些背景相关的问题 #672

View File

@@ -1,5 +1,5 @@
return{
["apkCode"]=437,
["apkCode"]=438,
["code"]=1703,
["string"]="V0.17.3",
["room"]="ver A-7",