Search found 103 matches

by Rishavs
Tue Sep 06, 2016 8:43 pm
Forum: Support and Development
Topic: Dead simple threads example
Replies: 12
Views: 11339

Re: Dead simple threads example

thanks to you all, i got my code to work. Still have 1 question though: If I try to use a function call in my thread file, the function name isnt recognized. local smin = 1 local smax = 1000 channel = love.thread.getChannel("test") for i = smin, smax, 1 do print(i .. " > ALL WORK AND ...
by Rishavs
Tue Sep 06, 2016 3:50 pm
Forum: Support and Development
Topic: Assigning element creation order for grid objects
Replies: 7
Views: 3912

Re: Assigning element creation order for grid objects

whoa!
i just flipped x and h in my nested for loops and everything works. I was worried that i will have to redo my every single helper function. o.0
by Rishavs
Tue Sep 06, 2016 3:34 pm
Forum: Support and Development
Topic: Assigning element creation order for grid objects
Replies: 7
Views: 3912

Re: Assigning element creation order for grid objects

crap. you are right. it means i have to write my entire hex code from scratch as all the id generation an such was done for width first loop. Thanks!
by Rishavs
Tue Sep 06, 2016 2:39 pm
Forum: Support and Development
Topic: Dead simple threads example
Replies: 12
Views: 11339

Re: Dead simple threads example

Hmmm

I thought i could do it all in the main file only using
thread = love.thread.newThread( codestring )

Can you check my try in the first post please?
If i reuse the same code but put in a different file, will it work?

Or do i remove the function call and have the raw code in the new file?
by Rishavs
Tue Sep 06, 2016 1:34 pm
Forum: Support and Development
Topic: Dead simple threads example
Replies: 12
Views: 11339

Dead simple threads example

-------------------------------------------------------------- EDIT: If you are looking for the threads example, i am putting that in this section so you dont have to go through other questions and discussions. Here is my default code. if you run it, you can see how the window is unresponsive for a ...
by Rishavs
Tue Sep 06, 2016 12:28 pm
Forum: Support and Development
Topic: Assigning element creation order for grid objects
Replies: 7
Views: 3912

Re: Assigning element creation order for grid objects

Ok. this is much faster, for sure, than iterating through my heavy hexgrid object. :D but i am still not able to get a proper image rendering order in grids. I started adding the hex ids to a simple list and used ipairs to run through it. But my output is still skewed. randTiles.png i did what you s...
by Rishavs
Tue Sep 06, 2016 11:22 am
Forum: Support and Development
Topic: Assigning element creation order for grid objects
Replies: 7
Views: 3912

Re: Assigning element creation order for grid objects

hmmm....

I wanted to keep all my hex attributes in a single object.

But from a rendering POV your solutions seems the simplest and fastest. Will try it rightaway.
Are there other alternative methods?
by Rishavs
Tue Sep 06, 2016 9:24 am
Forum: Support and Development
Topic: Assigning element creation order for grid objects
Replies: 7
Views: 3912

Assigning element creation order for grid objects

Hi [Sorry for the shitty title. Couldn't think of any title.] I am trying to create a simple hex grid using Kenny's hex tiles. For the grid, I need all the tiles to be rendered in proper order: left to right and then the next row. Unfortunately, i am using a hex grid obj insetad of nested for loops ...
by Rishavs
Tue Aug 30, 2016 4:17 pm
Forum: General
Topic: How to add seed to Perlin noise?
Replies: 14
Views: 8844

Re: How to add seed to Perlin noise?

taking your advise i changes my noise to : local elv_merged_noise = 1.00 * love.math.noise ( 1 * (dx + seed), 1 * (dy + seed)) + 0.50 * love.math.noise ( 2 * (dx + seed), 2 * (dy + seed)) + 0.25 * love.math.noise ( 4 * (dx + seed), 4 * (dy + seed)) + 0.13 * love.math.noise ( 8 * (dx + seed), 8 * (dy...
by Rishavs
Mon Aug 29, 2016 7:11 pm
Forum: General
Topic: How to add seed to Perlin noise?
Replies: 14
Views: 8844

Re: How to add seed to Perlin noise?

very interesting idea. Will try it tomorrow and report back.
Thanks!!