Search found 726 matches

by grump
Mon May 10, 2021 8:42 pm
Forum: Support and Development
Topic: Garbage going crazy
Replies: 17
Views: 566

Garbage going crazy

When you run this love file, it will display the current garbage collection counter. It goes up pretty fast. The program does basically nothing, just counting a few variables up and down, and it calls a bunch of empty functions. The only thing that should produce garbage is the display of the garbag...
by grump
Mon May 03, 2021 12:39 pm
Forum: Support and Development
Topic: Coordinates for lines vs points (and pixel grid alignment for points)
Replies: 20
Views: 3307

Re: Coordinates for lines vs points (and pixel grid alignment for points)

It's not that difficult or weird actually. Rectangles and lines drawn at 0,0 will be blurry and should be placed at .5,.5 instead because that's how the coordinate system works. Images and text drawn at .5,.5 will be blurry and should be placed at 0,0 instead because that's how the coordinate system...
by grump
Mon May 03, 2021 8:51 am
Forum: Support and Development
Topic: Coordinates for lines vs points (and pixel grid alignment for points)
Replies: 20
Views: 3307

Re: Coordinates for lines vs points (and pixel grid alignment for points)

In the end, it doesn't matter how the underlying hardware works. Oh yes, yes it does x). Oh no, no it doesn't. LÖVE is an abstraction layer over an abstraction layer, over an abstraction layer,... Abstracting these details away in an intuitive way is literally the reason why it exists. The best API...
by grump
Thu Apr 29, 2021 8:22 am
Forum: Support and Development
Topic: Pixilated circle
Replies: 9
Views: 1292

Re: Pixilated circle

Setting the default filter to nearest does not affect already created textures even if you do it in every frame. The correct solution was posted already, you just need to read more carefully.
by grump
Fri Apr 23, 2021 5:26 am
Forum: Support and Development
Topic: FFI: How to store a tcp client object in a more efficient way?
Replies: 10
Views: 2510

Re: FFI: How to store a tcp client object in a more efficient way?

kicknbritt wrote: Thu Apr 22, 2021 11:22 pm 6000 a second for 10 million clients is 60 Gbps.
Nope, that's 480 Gbps. Gbps = Billion bits per second.

I like your ambition. This game is gonna break several world records and will be one for the history books. Good luck!
by grump
Thu Apr 22, 2021 9:52 am
Forum: Support and Development
Topic: FFI: How to store a tcp client object in a more efficient way?
Replies: 10
Views: 2510

Re: FFI: How to store a tcp client object in a more efficient way?

I am shooting for 100,000,000 clients max lmao, that's an ambitious goal. Time to rent a server farm then, because a single machine is not going to handle that. If all of these clients send just one measly byte per second, that's at least 50 Gb/s traffic. The memory required just for these sockets ...
by grump
Wed Apr 21, 2021 2:26 pm
Forum: Support and Development
Topic: Trouble with screenshots
Replies: 5
Views: 1662

Re: Trouble with screenshots

Code: Select all

if obj:getFFIPointer() == nil then print("released") end
For those objects that provide getFFIPointer at least.

For other objects

Code: Select all

if tostring(obj):find('NULL') then print("released") end
If you really need it. Hacky shit. Best to not need it in the first place.
by grump
Wed Apr 21, 2021 10:27 am
Forum: Support and Development
Topic: FFI: How to store a tcp client object in a more efficient way?
Replies: 10
Views: 2510

Re: FFI: How to store a tcp client object in a more efficient way?

I did some researching and it seems like I can set up my own socket lib in c, so I might just do that at some point in the near future. But the socket lib in LÖVE is a C library, and socket userdata are probably lightweight already. Doing better than that is going to be difficult. And I think you w...
by grump
Wed Apr 21, 2021 1:57 am
Forum: Support and Development
Topic: FFI: How to store a tcp client object in a more efficient way?
Replies: 10
Views: 2510

Re: FFI: How to store a tcp client object in a more efficient way?

You can't reference Lua objects through ffi pointers, or store them in ffi-allocated memory. Even if you could, the idea that the same object would then somehow require less memory makes no sense.

What exactly are you trying to do that their size becomes a concern?
by grump
Tue Apr 20, 2021 5:57 am
Forum: Support and Development
Topic: String to access nested table value.
Replies: 7
Views: 1972

Re: String to access nested table value.

Code: Select all

local function saneset(t, path, value)
    local p, k
    for s in path:gmatch('[^.]+') do
        k, p, t = s, t, t[s]
    end
    p[k] = value
end
Can I ask where those JSON files come from? Are you writing them by hand?