Search found 2982 matches

by zorg
Thu Sep 17, 2020 6:05 pm
Forum: Support and Development
Topic: 2 if statements
Replies: 3
Views: 189

Re: 2 if statements

One more thing i can think of about how one could logic out stuff wrong: if a == 10 and 20 then -- blah end if a == 10 or 20 then -- blah end These will work too, but not how and why you might think. "10 and 20" and "10 or 20" might be logical in english when you combine it with the question "is the...
by zorg
Wed Sep 16, 2020 2:36 am
Forum: Support and Development
Topic: 'untrusted' code
Replies: 10
Views: 775

Re: 'untrusted' code

Again, my assumption was about clients running (client-side) code/addons locally only; since i don't exactly know how the game works, i didn't envision the possibility of user content being executed on the server.
by zorg
Tue Sep 15, 2020 3:36 pm
Forum: Support and Development
Topic: [Solved] List of lua functions which are not for cross-platform?
Replies: 4
Views: 573

Re: List of lua functions which are not for cross-platform?

set/get fenv modifies the function environment for a code chunk, not the OS's environment; that said, indeed it can be used to redefine the _G global table for specific environments. tbh idk how to answer the second part other than make sure to not allow things that could be used for malicious behav...
by zorg
Tue Sep 15, 2020 10:50 am
Forum: Support and Development
Topic: [Solved] List of lua functions which are not for cross-platform?
Replies: 4
Views: 573

Re: List of lua functions which are not for cross-platform?

Everything that's in the love. table/namespace behaves accordingly to what is said on the wiki. Most of them is in fact cross-platform, since that was a goal for Löve. (including love.filesystem, use that and not lua's io; note it is sandboxed, but there are libraries that solve that issue...) As fo...
by zorg
Tue Sep 15, 2020 9:54 am
Forum: Support and Development
Topic: 'untrusted' code
Replies: 10
Views: 775

Re: 'untrusted' code

I've read the linked discussion on the other forum. EDIT: furthermore if you want to implement server in a server-client model where the actual code is run on the server (unliek currentl wesnoth where umc code is only executed on the client), you need some operating system specific code to limits a ...
by zorg
Tue Sep 15, 2020 9:37 am
Forum: Support and Development
Topic: STI with Bump plugin
Replies: 21
Views: 10452

Re: STI with Bump plugin

Stop double and triple-posting, people; you can edit your posts when no one else said anything after you. :brows:
Also, code tags are your friend, and ours too; i'd rather read code that has syntax highlighting and is aligned in a sensible manner than just text dumps.
by zorg
Sun Sep 13, 2020 8:30 pm
Forum: Support and Development
Topic: Getting a key as a number
Replies: 8
Views: 830

Re: Getting a key as a number

Basic lua question: var = { {}, {}, {} } I want some way to get var[1] to return as the number 1, var[2] to return as the number 2, etc. Is there something built-in to do this, or would I need a complicated function? Simple, don't do that and instead do this: var = { 1, 2, 3 } Debugging shall conti...
by zorg
Sun Sep 13, 2020 8:27 pm
Forum: Libraries and Tools
Topic: Pixel art antialiasing shader
Replies: 5
Views: 1671

Re: Pixel art antialiasing shader

MSAA won't do anything to color transitions -inside- a shape, only the edges of it get affected, as far as i remember.
by zorg
Sun Sep 13, 2020 3:38 am
Forum: Libraries and Tools
Topic: Pixel art antialiasing shader
Replies: 5
Views: 1671

Re: Pixel art antialiasing shader

How about: - Draw image to canvas with nearest filter, scaled up 14x, no rotation (nor translation) - Draw canvas to screen with linear filter, rotated, translated (already using subpixels due to scaling) Should have a similar, cleaner result. (Of course, doing it with a shader is more optimal w.r.t...
by zorg
Thu Sep 10, 2020 12:14 pm
Forum: General
Topic: Why you get bugs & how to fix them [Youtube]
Replies: 4
Views: 1813

Re: Why you get bugs & how to fix them [Youtube]

Tab for indenting, Space for adjusting :P
Still, nice tutorials you're making, good stuff.