Search found 269 matches

by RNavega
Fri May 17, 2024 10:28 am
Forum: Support and Development
Topic: Garbage Collector and FFI
Replies: 17
Views: 627

Re: Garbage Collector and FFI

Yeah, and that's my biggest question. How do I keep them alive , they get garbage collected as soon as I start the program. Since you already seem to be keeping references to the things being used (at least the obvious ones), I'd think that the problem might be happening from something not obvious....
by RNavega
Fri May 17, 2024 9:41 am
Forum: Support and Development
Topic: Garbage Collector and FFI
Replies: 17
Views: 627

Re: Garbage Collector and FFI

I mean, I fill some of those buffers only one time while generating the map and then render them every frame. Other buffers are worked with constantly, they get new data every frame, and they still get garbage collected instantly. In your position, I'd check these things: That all FFI objects are k...
by RNavega
Fri May 17, 2024 7:20 am
Forum: Support and Development
Topic: Garbage Collector and FFI
Replies: 17
Views: 627

Re: Garbage Collector and FFI

Come on, that's not the entire code. You have a 'ffi' name in there, so it's missing at least the require("ffi") call. Also, the indentation suggests this is within some block scope which does impact on the lifetime of objects. The only time I had a garbage collection issue like that (quit...
by RNavega
Thu May 16, 2024 5:56 am
Forum: Support and Development
Topic: whats the best way to make general colision detection?
Replies: 5
Views: 240

Re: whats the best way to make general colision detection?

@edu you're asking two different things: "how are collisions usually done in games", and "why is this thing in my game not working". The answer to the first is: usually you approximate the shape of complex objects with simpler geometrical primitives (like the boxes, circles/ellip...
by RNavega
Tue May 14, 2024 5:51 pm
Forum: Support and Development
Topic: Chroma Key Shader
Replies: 2
Views: 845

Re: Chroma Key Shader

I was rethinking about this. There are simpler ways. If you sample the video pixel in a shader, and that video pixel color is an exact match to the chroma key color, then you should discard that pixel (or make it transparent). That should already give you a 98% ideal result. The remaining 2% is rega...
by RNavega
Sat May 11, 2024 7:10 am
Forum: General
Topic: [Help] Techniques for scaling
Replies: 24
Views: 1136

Re: [Help] Techniques for scaling

* To clarify on what this safety padding should be. There's no easier way than importing your PNG texture into Photopea , have a transparent background, then go to Filter > 3D > Texture Dilation and drag the slider until you're satisfied. Then File > Export As > PNG to download the result. No accoun...
by RNavega
Sat May 11, 2024 6:58 am
Forum: General
Topic: [Help] Techniques for scaling
Replies: 24
Views: 1136

Re: [Help] Techniques for scaling

Getting back to the issue of tearing, which I imagine it's these weird lines in your 1440_810.mov video: _.png Have you tried a very slow zooming out effect instead of randomly walking around? I think this would let you find an exact zoom level that makes the problem appear, so you can write it down...
by RNavega
Sat May 11, 2024 6:28 am
Forum: Support and Development
Topic: Garbage Collector and FFI
Replies: 17
Views: 627

Re: Garbage Collector and FFI

If you add a print('Function [X] START') and print('Function [X] END'), with [X] being the function name, at the start and end of the body of each function in your code, and run your program with lovec.exe or with "love.exe --console" so the console appears, inside what function does it cr...
by RNavega
Tue May 07, 2024 2:32 pm
Forum: General
Topic: [Help] Techniques for scaling
Replies: 24
Views: 1136

Re: [Help] Techniques for scaling

I think the inexact 4/3 camera scale at such a low fidelity will mess things up. If your native canvas is really 480 x 270 then you should be able to draw the game screen at that size, without upscaling anything, and having it appear perfectly -- take a screenshot, go to some paint program and paste...
by RNavega
Sun May 05, 2024 12:00 am
Forum: Support and Development
Topic: Question about breakout - ball and paddle collison
Replies: 3
Views: 796

Re: Question about breakout - ball and paddle collison

If that results in a fun behavior then that's golden. I'd also try an alternative where the current bat X speed is added to the ball X speed. This would let the player drag the bat when the ball is about to hit, to make the ball speed up or speed down horizontally, like you can kinda do in air hocke...