Page 20 of 20

Re: Help implementing game logic from fish fillets

Posted: Sat Sep 09, 2023 11:24 am
by glitchapp
Amazing darkfrei! thanks again for the help.

I think I just need to add some of the values of the grid size and windows size but that's exactly the function I need, it is simply an equation but I never created a function to solve it.

Thanks, I will let you know once the problem is solved!

Re: Help implementing game logic from fish fillets

Posted: Sat Sep 09, 2023 11:49 am
by darkfrei
glitchapp wrote: Sat Sep 09, 2023 11:24 am Amazing darkfrei! thanks again for the help.

I think I just need to add some of the values of the grid size and windows size but that's exactly the function I need, it is simply an equation but I never created a function to solve it.

Thanks, I will let you know once the problem is solved!
Normally I solve this problem with excel, it can give the formula by the linear or polynomial trend:
https://www.youtube.com/watch?v=PRlfb8npppU

But it was interesting to make the easy version of it with Lua.

Re: Help implementing game logic from fish fillets

Posted: Sat Sep 09, 2023 12:10 pm
by glitchapp
sure I need time to test but now the solution is really close, I just need to make sure that the provided parameters return the desired values for every given resolution and maze size, I can't test this now but I will do it later, I will probably use xcell which is faster first and then pass the parameters inside the code.

Once this problem is solved all major problems are solved... there are some issues with specific shaders and menus but nothing critical.

Thanks!

Re: Help implementing game logic from fish fillets

Posted: Sat Sep 09, 2023 12:26 pm
by darkfrei
Rounded and simplified inputs, rounded output:

Code: Select all

print ('1:')
local cs1 = calculateQuadraticPolynomialCoefficients(720/1080, 0.375, 1080/1080, 0.5, 1440/1080, 2/3)
print("a1 =", cs1[1])
print("b1 =", cs1[2])
print("c1 =", cs1[3])

print ('x	y1')
local a, b, c = cs1[1], cs1[2], cs1[3]
for i = 1, 6 do
	local h = 360*i/1080
	local y1 = a*h^2 + b*h + c 
	print (h*1080, y1)
end

-- returns:
--a1 =	0.1875
--b1 =	0.0625
--c1 =	0.25
--x	y1
--360.0	0.29166666666667
--720.0	0.375
--1080.0	0.5
--1440.0	0.66666666666667
--1800.0	0.875
--2160.0	1.125

print ('2:')
local cs2 = calculateQuadraticPolynomialCoefficients(720/1080, 0.75, 1080/1080, 1.0, 1440/1080, 4/3)
print("a2 =", cs2[1])
print("b2 =", cs2[2])
print("c2 =", cs2[3])

print ('x	y2')
local a, b, c = cs2[1], cs2[2], cs2[3]
for i = 1, 6 do
	local h = 360*i/1080
	local y1 = a*h^2 + b*h + c 
	print (h*1080, y1)
end

-- returns:
--a2 =	0.375
--b2 =	0.125
--c2 =	0.5
--x	y2
--360.0	0.58333333333333
--720.0	0.75
--1080.0	1.0
--1440.0	1.3333333333333
--1800.0	1.75
--2160.0	2.25

Re: Help implementing game logic from fish fillets

Posted: Wed Sep 11, 2024 12:03 pm
by glitchapp
Hi, I've recently released a mobile port of the game. I'm looking for contributors to solve some issues so feel free to fork it and send your solutions to the problems posted on the issues section: https://codeberg.org/glitchapp/Fish-fil ... ake-mobile
. if you want a minimal version with some assets please download the demo release from releases, the full game is almost 1,9 gb.

The game has been successfully tested on android, postmarket os and sailfish os so far.

For those only interested on the puzzle and who prefer a minimal small version of the game, there is a early minimal version of the game which is only 1mb big and has already touch controls and works, it is called "fish fillets mini".

I hope you enjoy the games on your mobiles or desktops.