Search found 39 matches

by SirRanjid
Thu Jan 11, 2018 11:39 am
Forum: Support and Development
Topic: Multicore/Threading help?
Replies: 7
Views: 8799

Re: Multicore/Threading help?

The snowflakes-eyecandy example was just an easy example i made up without testing mostly to get the concept right. Reading that it probably works serves it's purpose. But how is it unoptimal? Unoptimal in the sense of rather don't use threads here or can I actually improve the code above to be fast...
by SirRanjid
Thu Jan 11, 2018 7:38 am
Forum: Support and Development
Topic: Multicore/Threading help?
Replies: 7
Views: 8799

Re: Multicore/Threading help?

Ok thanks for this addition. Now I don't understand why I got to copy tables in lua as they're always passed by reference. How exactly do I retrieve passed variables on the other thread? I mean I pass them with Thread:start(arg_1,...,arg_n) ...meh found it as note didn't think it would be as easy as...
by SirRanjid
Wed Jan 10, 2018 7:53 pm
Forum: Support and Development
Topic: Multicore/Threading help?
Replies: 7
Views: 8799

Re: Multicore/Threading help?

Wow. Thanks for that explanation. I think I kinda get it. But all have essentially the same idea. Data is copied. One way to do this is by creating a queue or stack which points at data. By doing so we first copy the data and then simply push the reference onto the stack. That's what's happening her...
by SirRanjid
Wed Jan 10, 2018 3:01 pm
Forum: Support and Development
Topic: Multicore/Threading help?
Replies: 7
Views: 8799

Multicore/Threading help?

Hello I tried wrapping my mind around outsourcing tasks to other threads for efficiency reasons. But I never made something like it before and I can't get the basic concept to work in my mind. Suppose having stuff drawn that shuld be calculated on another thread. My intuition would be like(semi-pseu...
by SirRanjid
Thu Dec 28, 2017 11:44 am
Forum: Support and Development
Topic: 2d arrays of arbitrary size
Replies: 6
Views: 7855

Re: 2d arrays of arbitrary size

A bit more optimized would be having a table like you mentioned that stores chunks of predefined sized 2d tables which use ivans method. bigtable = { [x64] = { [y64]= {["x64y64"] = {[x+y*64] = {<TILE>}}} } } Just load/generate chunks from that bigtable as you need them for rendering. This ...
by SirRanjid
Tue Dec 26, 2017 12:48 pm
Forum: Support and Development
Topic: Make speed constant no matter the FPS
Replies: 5
Views: 4059

Re: Make speed constant no matter the FPS

My guess would be you're using the dt of the update function inside the draw.
by SirRanjid
Mon Dec 25, 2017 11:34 am
Forum: Support and Development
Topic: Noborder Window Size
Replies: 1
Views: 1226

Noborder Window Size

So I have a simple Border/Noborder toggle button which works but I'd rather have the noborder-window the size of the normal window + the border. https://love2d.org/imgmirrur/T7ugSpG.gif?1 Is there a way to get the size of the widow border? Or at least a smarter solution than measuring it for any os?
by SirRanjid
Wed Dec 20, 2017 6:16 pm
Forum: Support and Development
Topic: shader that leaves trails behind objects like like lightworld does
Replies: 7
Views: 4978

Re: shader that leaves trails behind objects like like lightworld does

I've just come to a similar problem here's my try on it: First create some canvases in an array (i just used 10) local tcvs = {} local tcvsp = 1 --moving array index for I = 1 , 10 do tcvs[I] = love.graphics.newCanvas( ) end Then in the draw functionI do something like this (the functions lack love....
by SirRanjid
Fri Dec 15, 2017 4:34 pm
Forum: Support and Development
Topic: Saving a game
Replies: 6
Views: 6235

Re: Saving a game

I've made a more general purpose data save/load script, which relies on serpent (MIT license) as serializer. Here you can find it. Basic usage: (nm is the name of the data table and the savefile like %appdata%/data/<nm>.txt) GAME.EZF:CreateNewData(nm[,tbl]) --creates a new data table for data to sto...
by SirRanjid
Wed Dec 06, 2017 10:05 pm
Forum: General
Topic: What's everyone working on? (tigsource inspired)
Replies: 1791
Views: 1496122

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

Buttons and stuff have dynamic sizes so I made the window small for a small video size...



GIF: https://love2d.org/imgmirrur/WwJOZNu.mp4