Search found 636 matches

by BrotSagtMist
Sun Sep 19, 2021 5:39 am
Forum: Support and Development
Topic: Drawing one canvas on top of another?
Replies: 3
Views: 4354

Re: Drawing one canvas on top of another?

Uhm. Newimage returns the image, its not drawing it. Maybe you meant: draw(newimage(delaydata)) instead? There is no conversation needed anyway, for most task a canvas can be used like a picture. I gather what you actually want is to: paint a circle to a canvas depending on where the player stands t...
by BrotSagtMist
Sun Sep 19, 2021 3:21 am
Forum: Games and Creations
Topic: Railway Track
Replies: 7
Views: 10875

Re: Railway Track

Is it necessary to get this offset?
You could just draw two lines of different width on top of each other i would say.

For the ties it is also possible to draw them short and thick, may be faster.
This would have been a use case for stipple lines, but that setting was removed.
by BrotSagtMist
Sat Sep 18, 2021 1:45 pm
Forum: Support and Development
Topic: Tricks for slower walking animations on tilemaps?
Replies: 4
Views: 3891

Re: Tricks for slower walking animations on tilemaps?

Your char does not seem to have legs, how else is it supposed to walk if not like a penguin? The hands should swing a bit, dont overdo it, for one game a graphic designer gave me a char that swings its arms like running a marathon, yet it walks, so it constantly looks like a comedy act, running at p...
by BrotSagtMist
Sat Sep 18, 2021 1:04 pm
Forum: Support and Development
Topic: [SOLVED] Bizarre nil issue
Replies: 27
Views: 17920

Re: Bizarre nil issue

You can't just save the output of the math.random call and think "oh, this is going to be the next seed!", it won't work as expected, and since there's no way to get the current seed/internal state of the luaJIT PRNG, you can't save and restore that state in any way whatsoever. My problem...
by BrotSagtMist
Sat Sep 18, 2021 1:26 am
Forum: Support and Development
Topic: [SOLVED] Bizarre nil issue
Replies: 27
Views: 17920

Re: Bizarre nil issue

Creates upvalues every time you use it, slower than just using plain math.random or love.math.random, and love.math.setRandomSeed achieves the same thing with less. Obviously its slower, but the whole point was not to show that loves version is superior but that it is possible to get away without u...
by BrotSagtMist
Fri Sep 17, 2021 7:24 pm
Forum: Support and Development
Topic: [SOLVED] Bizarre nil issue
Replies: 27
Views: 17920

Re: Bizarre nil issue

And yet it returns usable numbers. We are making games, not medical surgery software. This solution would work fine for bots in games, so in practice i would use it if needed. But really, its not that i thought long about it, just meant to counter the "doesn't even have an equivalence" par...
by BrotSagtMist
Fri Sep 17, 2021 1:35 pm
Forum: Support and Development
Topic: [SOLVED] Bizarre nil issue
Replies: 27
Views: 17920

Re: Bizarre nil issue

My point was what? Are you drunk?
I only showed how multiple seeds can be added to luajit, nothing more.

Whats your point? Asking stuff you clearly need no information about? Bragging about pseudoknowledge that no cares about because it practically never matters to anyone?
by BrotSagtMist
Fri Sep 17, 2021 11:51 am
Forum: Support and Development
Topic: wait() doesn't work
Replies: 5
Views: 4406

Re: wait() doesn't work

Where did you get that idea that this exists in the first place?
You probably mean: love.timer.sleep( s )
by BrotSagtMist
Fri Sep 17, 2021 11:46 am
Forum: Support and Development
Topic: [SOLVED] Bizarre nil issue
Replies: 27
Views: 17920

Re: Bizarre nil issue

Code: Select all

function newrandomgenerator(y)
 local trans=y or 1
 return function(x)
  math.randomseed(trans)
  trans=math.random()
  return x and math.ceil(x*trans) or trans
 end
end
by BrotSagtMist
Thu Sep 16, 2021 8:42 pm
Forum: Support and Development
Topic: [SOLVED] Bizarre nil issue
Replies: 27
Views: 17920

Re: Bizarre nil issue

I challenge you to find me a platform where the results differ then.