Search found 7 matches

by owowow
Thu Aug 18, 2022 5:09 pm
Forum: Support and Development
Topic: Random Generation map error on Mobile
Replies: 14
Views: 1787

Re: Random Generation map error on Mobile

Thanks all, I didn't expect that much people reacted to math.randam... After I changed it to love.math.random, it doesn't show the difference but it would be nice to know when the code went complicated. About getSafeArea(), the main target is on mobile so I will have to take into consideration in th...
by owowow
Tue Aug 16, 2022 6:47 pm
Forum: Support and Development
Topic: Random Generation map error on Mobile
Replies: 14
Views: 1787

Re: Random Generation map error on Mobile

And anyone knows if thats better use love.window.getSafeArea( ) instead of love.graphics.getWidth()/Height()?

Code: Select all

	safex, safey, safew, safeh = love.window.getSafeArea( )
    screensizex=safew
    screensizey=safeh
by owowow
Tue Aug 16, 2022 6:30 pm
Forum: Support and Development
Topic: Random Generation map error on Mobile
Replies: 14
Views: 1787

Re: Random Generation map error on Mobile

@darkfrei, Omg it was so quick and true!! It worked!! so it looks like the problem was the fixed tilesize! Thank you so much! btw, i changed it like this. sorry that previously I forgot to change the part of trees and tree.. and i will change and try with math.random to love.math.random! function lo...
by owowow
Tue Aug 16, 2022 4:47 pm
Forum: Support and Development
Topic: Random Generation map error on Mobile
Replies: 14
Views: 1787

Random Generation map error on Mobile

I was making trees that generated in the tiled map randomly by using table. My code works fine on my PC but when I run it on my Android it crashes when its checking tiles to place new tree. I suspected the problem was because of difference of screen ratio or something and tried some size changes but...
by owowow
Tue Aug 02, 2022 9:28 am
Forum: Support and Development
Topic: How to change value in map table?
Replies: 4
Views: 1282

Re: How to change value in map table?

Thanks! truely thats better! But now I ended like this, for i=0, h-1 do for j=0,w-1 do if (i+y)>0 and (j+x)>0 and (i+y)<=mapsizey and (j+x)<=mapsizex then map[i+y][j+x]=num end end end I also post here my whole sample text code(pls make conf to turn the console window on). It would be appreciated if...
by owowow
Tue Aug 02, 2022 5:51 am
Forum: Support and Development
Topic: How to change value in map table?
Replies: 4
Views: 1282

Re: How to change value in map table?

Thank you! you are right,
such a dumb I was.. thank you very much.

So i went like this, it works as I wanted but it looks bit ugly..

Code: Select all

 for i=y, h+1+y-2 do
        for j=x,w+x-1 do
            map[i][j]=num
        end
   end
by owowow
Mon Aug 01, 2022 10:22 pm
Forum: Support and Development
Topic: How to change value in map table?
Replies: 4
Views: 1282

How to change value in map table?

Recently I started learning love2d and now I am making a collision map in tiles. I want to change only index where some random sized boxes generated in the map table by loop. But somehow I can't get them changed correctly. I am quite a beginner and have no clear understang how tables work.. Could so...