Search found 1949 matches

by raidho36
Sat Dec 14, 2019 9:11 am
Forum: Games and Creations
Topic: Benham Disk Color Illusion
Replies: 0
Views: 72

Benham Disk Color Illusion

I threw together a Benham Disk simulation, which creates color illusion by alternating black and white at specific patterns, physically made as a spinning wheel with bands on it. By adjusting wheel speed, band thickness and band length just right, a spinning wheel will create illusion of the bands b...
by raidho36
Sat Dec 14, 2019 3:45 am
Forum: Support and Development
Topic: how would vanilla love2d draw unto a image(NOT A CANVAS)
Replies: 6
Views: 249

Re: how would vanilla love2d draw unto a image(NOT A CANVAS)

ya I would like it i'm not doing gui right now I was making a json entity config framework. also idk if it would run faster or not but I hate lua's if..end syntax with a passion I find it ugly and unreadable. I also like using C# for its object oriented syntax. in lua you have to mess with metatabl...
by raidho36
Fri Dec 13, 2019 6:00 am
Forum: Support and Development
Topic: how would vanilla love2d draw unto a image(NOT A CANVAS)
Replies: 6
Views: 249

Re: how would vanilla love2d draw unto a image(NOT A CANVAS)

For rendering purposes you don't need to do this conversion, you can just render the canvas itself as if it was an image. Do you really need a canvas for this? You can just render all of your GUI details every frame, it's no big deal especially if it gets spritebatched. Off topic; wouldn't regular L...
by raidho36
Mon Dec 09, 2019 6:10 am
Forum: Support and Development
Topic: How to use local variables in games properly?
Replies: 4
Views: 265

Re: How to use local variables in games properly?

Passing around values: local function do_many_things ( foo, bar ) do_things ( foo, 1, 2, 3 ) do_other_things ( bar, 'a', 'b', 'c' ) end do_many_things ( table1, table2 ) Making local duplicates: local mmax, mmin, mabs = math.max, math.min, math.abs local function do_math ( value ) return mmax ( mmin...
by raidho36
Sun Dec 08, 2019 11:27 pm
Forum: Support and Development
Topic: How to use local variables in games properly?
Replies: 4
Views: 265

Re: How to use local variables in games properly?

You simply declare everything that doesn't needs to be globally accessible as local. That's it. Pass around values through function arguments if you need to. Making local duplicates of global variables helps with performance (but they don't track global variable changes). Don't go nuts with generati...
by raidho36
Sun Dec 08, 2019 11:16 pm
Forum: Support and Development
Topic: Are sprite batches the solution to my low FPS?
Replies: 2
Views: 180

Re: Are sprite batches the solution to my low FPS?

Overdraw doesn't by itself causes slowdowns, it's just usually every pixel is only rendered once (ideally) so in 1080p monitor you only have to process 2 million pixels per frame, but if you overdraw then this goes up by a multiple of overdraw passes, so with just a handful of fullscreen overdraws y...
by raidho36
Sun Dec 08, 2019 11:12 am
Forum: Support and Development
Topic: Running love2d programs with intellij idea [closed]
Replies: 5
Views: 268

Re: Running love2d programs with intellij idea

Well this has clearly nothing to do with your config because your argument #2 (A1) is nil, as appears in Menu.lua @ line 292. Pay attention to error messages, they tell you exactly what went wrong. You can make error messages point to specific mistakes in your code by adopting defensive programming ...
by raidho36
Sat Dec 07, 2019 9:44 pm
Forum: Support and Development
Topic: Running love2d programs with intellij idea [closed]
Replies: 5
Views: 268

Re: Running love2d programs with intellij idea

You must pass game directory as an argument, setting working directory does nothing.
by raidho36
Sat Dec 07, 2019 9:39 pm
Forum: Support and Development
Topic: setRequirePath() correct usage
Replies: 3
Views: 203

Re: setRequirePath() correct usage

Basically, you shouldn't touch require path, you should instead organize your project to work with default settings. This way you avoid ridiculous scenarios where the user has to install specific package managers to install specific Lua libraries in specific filesystem locations. Yes this means you ...
by raidho36
Sat Dec 07, 2019 9:33 pm
Forum: General
Topic: Lua function declarations
Replies: 6
Views: 282

Re: Lua function declarations

pixelfixation wrote:
Sat Dec 07, 2019 12:31 am
In Lua what is the difference between these two function declarations.
None.