Search found 270 matches

by RNavega
Tue May 21, 2024 9:37 pm
Forum: Support and Development
Topic: How do you really tell if your game has a memory leak?
Replies: 18
Views: 559

Re: How do you really tell if your game has a memory leak?

You can run it as fancy loop if you need proof that the construct will eventually crash your computer Regardless of what people want to call this, it does sound problematic as you have to explicitly call collectgarbage() before the program crashes, which isn't obvious if you expect the garbage coll...
by RNavega
Fri May 17, 2024 10:28 am
Forum: Support and Development
Topic: Garbage Collector and FFI
Replies: 17
Views: 719

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: 719

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: 719

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: 289

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: 902

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: 1164

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: 1164

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: 719

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: 1164

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...