Search found 287 matches

by Bigfoot71
Fri Jan 06, 2023 1:02 am
Forum: Support and Development
Topic: [Solved] Need help on a raycasting light shader
Replies: 20
Views: 3627

Re: Need help on a raycasting light shader

I tried to optimize the function I showed above by only loading the new squares in the area and unloading those that are no longer there but it's still slow, I have a loss of 3~4 FPS each time the function is called, so each move (which is much better but still not acceptable)... Here is the functio...
by Bigfoot71
Thu Jan 05, 2023 5:38 pm
Forum: Support and Development
Topic: [Solved] Need help on a raycasting light shader
Replies: 20
Views: 3627

Re: Need help on a raycasting light shader

I had forgotten to specify it, I have already tried by sending only a portion of the map around the character using the Lighter module, however with each movement I lost more than 40 FPS at once (according to tests that I have just redone at the moment it finally comes from the method :addPolygon() ...
by Bigfoot71
Thu Jan 05, 2023 3:58 pm
Forum: Support and Development
Topic: [Solved] Need help on a raycasting light shader
Replies: 20
Views: 3627

Re: Need help on a raycasting light shader

I cannot help with shader, but it's possible to solve it without them (by using meshes): https://love2d.org/forums/viewtopic.php?p=244845#p244845 Thank you for the link, it could be useful for other things, the current problem I have is that the light is made to be diffused in a labyrinth where the...
by Bigfoot71
Thu Jan 05, 2023 2:19 pm
Forum: Support and Development
Topic: [Solved] Need help on a raycasting light shader
Replies: 20
Views: 3627

[Solved] Need help on a raycasting light shader

Hello and happy new year everyone :D I'm coming to you because I'm totally stuck on a shader I'm trying to do. Basically I need a shader which diffuses light according to a given position (the light is in fact only the normal color of the screen which darkens according to the distance compared to th...
by Bigfoot71
Tue Dec 20, 2022 9:52 pm
Forum: Support and Development
Topic: [Solved] Android would double the size of canvases?
Replies: 4
Views: 1395

Re: Android would double the size of canvases?

Possibly DPI of mobile screen (240dpi)? Indeed I have just noticed it, however the DPI is 320 on my device. I'm looking in the Löve documentation but does anyone have a solution to solve this problem? Edit: Problem solved by adding the mention dpiscale = 1 when creating the canvas, like this: local...
by Bigfoot71
Tue Dec 20, 2022 8:15 pm
Forum: Support and Development
Topic: [Solved] Android would double the size of canvases?
Replies: 4
Views: 1395

[Solved] Android would double the size of canvases?

The question may seem weird but basically in one of my projects I create a canvas of 1100x2400, on PC the dimension tells me this size in the console but once on Android I get an error which is: Cannot create texture: pixel height of 4800 is too large for this system. What is the reason for this err...
by Bigfoot71
Wed Dec 14, 2022 8:52 pm
Forum: Support and Development
Topic: Is it possible to use Moonshine in a canvas?
Replies: 1
Views: 3742

Is it possible to use Moonshine in a canvas?

I'm trying to use a moonshine effect in canvas so that I only have to render once, but I always get a black screen... I've tried in lots of different orders, in using multiple canvases, etc. but still the same result, I wonder then is this possible with Moonshine? Here is an example and I put the sa...
by Bigfoot71
Wed Dec 14, 2022 2:25 pm
Forum: Support and Development
Topic: Best way to render a slanted grid in 2D
Replies: 1
Views: 738

Re: Best way to render a slanted grid in 2D

If I don't have a better solution, I think I'll keep this one (I managed to apply a perspective differently but it was obviously not optimized at all). The best solution would obviously be to write a shader, but Playmat's already does the job really well! The only thing to fix with Playmat is to pla...
by Bigfoot71
Wed Dec 14, 2022 3:22 am
Forum: Support and Development
Topic: Can this simple rounding function be more efficient?
Replies: 5
Views: 2583

Re: Can this simple rounding function be more efficient?

I did some tests and it seems to be the fastest one (tests carried out on the phone, to try again on your side): function round(n, mult) mult = mult or 1 return math.floor((n+mult/2)/mult) * mult end I found it here: http://lua-users.org/wiki/SimpleRound My script for comparison tests : local n = -....
by Bigfoot71
Wed Dec 14, 2022 1:12 am
Forum: Support and Development
Topic: I want to create a swing traps like pendulum in platformer games. But can't code properly?
Replies: 5
Views: 1404

Re: I want to create a swing traps like pendulum in platformer games. But can't code properly?

I'm thinking about it thanks to what togFox said and by rereading your post (which I had misinterpreted a little by the way) if you already use love.physics think about updating the world! world = love.physics.newWorld( 0,0 ) function love.update(dt) world:update(dt) end @togFox sorry, my will was n...