Search found 42 matches

by yal2du
Sun Apr 24, 2022 1:55 am
Forum: Support and Development
Topic: Love graphics taking a lot of memory
Replies: 23
Views: 5656

Re: Love graphics taking a lot of memory

I inserted the following snippet at the top of main.lua of dust_reloaded from https://love2d.org/forums/download/file.php?id=20052 (i'm not sure if that is representative of current codebase though) and similarly instrumented getSource pront = print function love.keypressed( key, scancode, isrepeat ...
by yal2du
Sat Apr 23, 2022 9:59 pm
Forum: Support and Development
Topic: Love graphics taking a lot of memory
Replies: 23
Views: 5656

Re: Love graphics taking a lot of memory

Gunroar:Cannon() wrote: Wed Apr 20, 2022 10:08 am
pgimeno wrote: Wed Apr 20, 2022 12:45 am How are you measuring the "C (graphical memory)"?
With love.graphics.getStats (the texture memory).
Are you (or the gooi ui lib employed) rendering to any other canvases? love.graphics.getStats().texturememory reports that usage as well.
by yal2du
Sat Apr 23, 2022 9:27 pm
Forum: Support and Development
Topic: Love graphics taking a lot of memory
Replies: 23
Views: 5656

Re: Love graphics taking a lot of memory

I want to see if I can at least clear all image data then load all images from scratch in reloading the images. Are the images returned from game:getAsset being used directly, or are they assigned to other variables (that may not be properly cleared). Contrived example: -- used directly sometable =...
by yal2du
Sat Apr 23, 2022 5:35 pm
Forum: Support and Development
Topic: Getting local IP address using UDP?
Replies: 12
Views: 5062

Re: Getting local IP address using UDP?

-- Nuttin' but engrish stringz Note that this will only work on an English installation of Windows as these texts are translated. System locale could be an issue with any os and non-ascii encoding formats could be a problem as well (lua 5.1 string library doesn't handle anything beyond 8-bit clean)...
by yal2du
Fri Apr 22, 2022 11:57 pm
Forum: Support and Development
Topic: Getting local IP address using UDP?
Replies: 12
Views: 5062

Re: Getting local IP address using UDP?

It is only one line of native love code: local socket = require 'socket' -- socket is native to LOVE but needs a REQUIRE local HOST_NAME = socket.dns.gethostname() local HOST_IP_ADDRESS = socket.dns.toip(HOST_NAME) That works well if the machine has a single network interface configured; just note ...
by yal2du
Fri Apr 22, 2022 8:21 pm
Forum: Support and Development
Topic: Is multi-thread a ram hog, or is this a memory leak?
Replies: 5
Views: 1657

Re: Is multi-thread a ram hog, or is this a memory leak?

(100k new entries / thread ) * (4 bytes / entry) * 9 threads * 60 Hz * 2 ≃ 432 MB/s of new *fragmented* allocations, not even including other interthread communication overhead ... kind of curious how well other interpreted languages' allocators and garbage collectors hold up to that sort of pressur...
by yal2du
Fri Apr 22, 2022 7:29 pm
Forum: Support and Development
Topic: Getting local IP address using UDP?
Replies: 12
Views: 5062

Re: Getting local IP address using UDP?

tested under win10 and lmde5 do local function os_capture(cmd, raw) local f = assert(io.popen(cmd, 'r')) local s = assert(f:read('*a')) f:close() if raw then return s end s = string.gsub(s, '^%s+', '') s = string.gsub(s, '%s+$', '') s = string.gsub(s, '[\n\r]+', ' ') return s end local oss = love.sy...
by yal2du
Fri Apr 22, 2022 4:38 pm
Forum: Support and Development
Topic: Getting local IP address using UDP?
Replies: 12
Views: 5062

Re: Getting local IP address using UDP?

... I get from "ipconfig" on Windows / "ip a" on Linux, but I would like to automate this process ... Parse the output of ipconfig looking for adapter(s) with a default gateway, then give user those choices to connect. -- see code next post -- https://stackoverflow.com/questions...
by yal2du
Mon Feb 21, 2022 12:25 am
Forum: Support and Development
Topic: Problem debugging dll code I made for love2d projects
Replies: 8
Views: 4768

Re: Problem debugging dll code I made for love2d projects

I've written some native code for two of my projects (using the Nim bindings to Lua's C API), and I compiled it into dll files... Whenever there's an error on the native code and it crashes my project, the error doesn't get printed out to the console. It's like the stdout that Love2d/lua use to pri...
by yal2du
Thu Feb 03, 2022 5:19 pm
Forum: Support and Development
Topic: Présentation + how to reset opengl context ?
Replies: 4
Views: 4366

Re: Présentation + how to reset opengl context ?

I am currently developing on a fairly old computer running an Ubuntu 16 and not even having opengl 2.0. It does have extensions, however, so I have shaders but with limitations etc. Oh, and I don't have an Internet connection at home. I also have an Android much more recent. Wait a second, I just r...