Search found 62 matches

by ChicoGameDev
Thu Feb 28, 2019 6:36 am
Forum: Support and Development
Topic: Canvas + camera shake
Replies: 25
Views: 8708

Re: Canvas + camera shake

Hi grump, Haha yeah it would have helped but I did not simplify that by giving you the full source x). Thanks however for you help. Draw only what is actually visible on the screen for best performance. LÖVE does not perform culling, so it will be done much later in the graphics pipeline, which is s...
by ChicoGameDev
Thu Feb 28, 2019 4:34 am
Forum: Support and Development
Topic: Canvas + camera shake
Replies: 25
Views: 8708

Re: Canvas + camera shake

pgimeno strikes again !

I was totally aware that something stupid was going on, as I said in my first post :
I'm sure it's pretty simple [...]
And it was and again you've learned me something !

Thanks a lot.


Have a wonderful day.



Regards
by ChicoGameDev
Thu Feb 28, 2019 4:22 am
Forum: Support and Development
Topic: Canvas + camera shake
Replies: 25
Views: 8708

Re: Canvas + camera shake

Hello, New day, new ideas and new participants :D Hi pgimeno ! Thank you for your explanation, I go try this right now ! Oops, I see you've dropped the shader. Yes sadly I had to, it asked too much to machines. Actually if you don't have a graphic card the shader was really slow. And since my knowle...
by ChicoGameDev
Wed Feb 27, 2019 8:13 pm
Forum: Support and Development
Topic: Canvas + camera shake
Replies: 25
Views: 8708

Re: Canvas + camera shake

No problem, I thank you already to give some time. I'm not 100% sure I've understand what you mean. But maybe take a quick look when you have the will and motivation, and see if it's not what I'm already doing. For the moment the bigger canvas solution is working wonderfully well ! Thanks. Regards
by ChicoGameDev
Wed Feb 27, 2019 7:15 pm
Forum: Support and Development
Topic: Canvas + camera shake
Replies: 25
Views: 8708

Re: Canvas + camera shake

To come to think of it - you don't need the offscreen space. Why don't you just wiggle the camera position around in each update when it shakes? It doesn't really need to be a special case. What you saying intrigues me ! But I cannot understand what you mean. Or do you mean : put the love.graphics....
by ChicoGameDev
Wed Feb 27, 2019 6:56 pm
Forum: Support and Development
Topic: Canvas + camera shake
Replies: 25
Views: 8708

Re: Canvas + camera shake

I mean it's pretty straightforward - if the lightmap is translated by -offset/2, all its contents will shift by that amount, so you have to compensate for that ;) Yes, now that you say it I feel stupid ... But you know it feels kind of "not nice" x) That's why I thought it was not a good ...
by ChicoGameDev
Wed Feb 27, 2019 6:42 pm
Forum: Support and Development
Topic: Canvas + camera shake
Replies: 25
Views: 8708

Re: Canvas + camera shake

You need to add the (half) offset to all light coordinates. Ah so you are totally aware of that haha. :awesome: Alright I'll implement and see if it will be enough. I did press space to shake it haha. Sorry for not mentioning that too. But when it shakes, I don't see any issues like in the gif. Who...
by ChicoGameDev
Wed Feb 27, 2019 6:27 pm
Forum: Support and Development
Topic: Canvas + camera shake
Replies: 25
Views: 8708

Re: Canvas + camera shake

you could use a lightmap that is large enough to cover the screen area + the maximum shake area I think I try that, do you mean : lightMap = love.graphics.newCanvas(screenWidth + Offset, screenHeight + Offset) and when the draw occurs : love.graphics.draw(lightMap, -( Offset / 2), - (Offset / 2)) I...
by ChicoGameDev
Wed Feb 27, 2019 6:18 pm
Forum: Support and Development
Topic: Canvas + camera shake
Replies: 25
Views: 8708

Re: Canvas + camera shake

Hi grump,

Thanks for participating !

What you say is interesting, I think it's the problem I faced when I tried to add a border to the lightmap. :rofl:


Regards
by ChicoGameDev
Wed Feb 27, 2019 6:09 pm
Forum: Support and Development
Topic: Canvas + camera shake
Replies: 25
Views: 8708

Re: Canvas + camera shake

Hello, Thanks for your participation. Of course I'm drawing multiple layers, and since it's designed to be integrated in a game, there always will be multiple layers. No ? And in your suggestion you want me to add a layer. But it seem a good idea, not sure to find the best way to do that but I'll tr...