Search found 90 matches

by UnixRoot
Tue May 21, 2024 4:59 pm
Forum: General
Topic: What's everyone working on? (tigsource inspired)
Replies: 1796
Views: 1559543

Re: What's everyone working on? (tigsource inspired)

love 2024-05-19 22-50-44-64.png
love 2024-05-19 22-50-44-64.png (92.12 KiB) Viewed 5777 times
Trying to render procedurally generated, animated clouds and fully destructible terrain that can collapse. It's all per pixel CPU based frame buffer stuff, no GPU involved.
by UnixRoot
Fri May 17, 2024 10:46 am
Forum: Support and Development
Topic: Garbage Collector and FFI
Replies: 18
Views: 1484

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 UnixRoot
Fri May 17, 2024 10:08 am
Forum: Support and Development
Topic: Garbage Collector and FFI
Replies: 18
Views: 1484

Re: Garbage Collector and FFI

That all FFI objects are kept in variables (or tables inside those variables) that exist either in the global scope (the _G table) or the top-level local scope (declaring "local (...)" out in the open, outside any functions). But I already do this. They're stored in top-level local scope ...
by UnixRoot
Fri May 17, 2024 7:40 am
Forum: Support and Development
Topic: Garbage Collector and FFI
Replies: 18
Views: 1484

Re: Garbage Collector and FFI

Come on, that's not the entire code. That's true, but i simply can't post my entire game. After I stored both the FFI pointer and all the objects related to that pointer (the buffer, the data etc) in the same table, and had the table survive for some time, then it worked fine. And how do you keep o...
by UnixRoot
Thu May 16, 2024 11:46 pm
Forum: Support and Development
Topic: Garbage Collector and FFI
Replies: 18
Views: 1484

Re: Garbage Collector and FFI

I paused the project and got back to another unfinished project I had lying around. And you know what? It's the same thing. local imagedata=love.image.newImageData(640,360, "rgba8") local image = love.graphics.newImage(imagedata) local terrainBuffer = ffi.cast('uint32_t*', imagedata:getFFI...
by UnixRoot
Wed May 08, 2024 7:57 am
Forum: Games and Creations
Topic: VELA
Replies: 4
Views: 648

Re: VELA

I've read most of the kickstarter page and I still don't know what this is supposed to be. Ich verstehe nur Bahnhof.
by UnixRoot
Tue May 07, 2024 11:30 pm
Forum: Support and Development
Topic: Garbage Collector and FFI
Replies: 18
Views: 1484

Re: Garbage Collector and FFI

Posting all relevant code (including everywhere the original allocations and the ffi pointers are referenced or used) or uploading a .love file would help Here we go: local vec3 = require("math/vec3") local mat4 = require("math/mat4") local bmpParser = require("bmp_parser&q...
by UnixRoot
Tue May 07, 2024 6:04 pm
Forum: Support and Development
Topic: Garbage Collector and FFI
Replies: 18
Views: 1484

Re: Garbage Collector and FFI

The objects can just be garbage collected because they're recognized as not being used in the future And how can I change that? Also make sure you're using zero-based indexing with FFI arrays. Yup, I'm aware of that We can only throw guesses at the wall with how little information you've provided. ...
by UnixRoot
Tue May 07, 2024 5:32 pm
Forum: Support and Development
Topic: Garbage Collector and FFI
Replies: 18
Views: 1484

Re: Garbage Collector and FFI

Good point, but that's probably not the case. I don't delete any of those objects while still in use. I mean, it crashes instantly.
by UnixRoot
Tue May 07, 2024 4:09 pm
Forum: Support and Development
Topic: Garbage Collector and FFI
Replies: 18
Views: 1484

Garbage Collector and FFI

Hi guys, I have a problem with the garbage collector and my FFI structs and arrays. As soon as I use any FFI stuff, my program crashes instantly or my textures get corrupted. If I disable the garbage collector, the program runs just fine and doesn't even produce any noteworthy garbage. It stays at a...