Search found 52 matches
- Sun Aug 21, 2022 3:54 pm
- Forum: Support and Development
- Topic: Scaling with all true 16:9 resolutions with limited number of asset resolutions?
- Replies: 1
- Views: 1071
Scaling with all true 16:9 resolutions with limited number of asset resolutions?
I start with a resizable window I then create a drawable area that will fit in the window that is a true (div by 8) 16:9 resolution (but also including 1600x900). This happens everytime window is resized. I then choose a canvas resolution of the 6 different common resolutions I have that is == or > ...
- Wed Mar 11, 2020 9:02 am
- Forum: Support and Development
- Topic: Scaling for 16:9 resolutions
- Replies: 2
- Views: 5221
Scaling for 16:9 resolutions
I'm making a game that I want to always render in 16:9. I will have the window settings be controllable in the game so no maximize/resize buttons on the window itself. I want the game to fit on all screens, but have black borders on different aspect ratios. I also want to be able to scale the game p...
- Mon Mar 09, 2020 5:14 am
- Forum: Support and Development
- Topic: Passing key in function
- Replies: 8
- Views: 7725
Re: Passing key in function
Pefect!!! Yeah I have most functions turn off right after they are ran, inside the for loop i do a check on stack.exe to see if it's true or false, if true ill run the code. my push functions only are ran when needed, everything else is handed by the returned boolean. Thanks so much!!!
- Mon Mar 09, 2020 3:46 am
- Forum: Support and Development
- Topic: Passing key in function
- Replies: 8
- Views: 7725
Re: Passing key in function
Ok I'll look into that later, now my problem is my functions that are stored in the stack are not properly returning values. lets say i have this function ui:menu(var) pseudo create menu var return false end function stack:push(fun) table.insert(stack.fun, fun) end love.load stack:push(function() ui...
- Sat Mar 07, 2020 10:24 pm
- Forum: Support and Development
- Topic: Passing key in function
- Replies: 8
- Views: 7725
Re: Passing key in function
Adding the ... in function() and ui:input() seems to have fixed the issue. What exactly does this do? Is this just a placeholder letting lua know it should have an argument or do the 3 dots actually mean something? Thanks! When used in a function declaration, it indicates that it accepts a variable...
- Sat Mar 07, 2020 1:16 pm
- Forum: Support and Development
- Topic: Passing key in function
- Replies: 8
- Views: 7725
Re: Passing key in function
Adding the ... in function() and ui:input() seems to have fixed the issue. What exactly does this do? Is this just a placeholder letting lua know it should have an argument or do the 3 dots actually mean something? Thanks!
- Sat Mar 07, 2020 7:51 am
- Forum: Support and Development
- Topic: Passing key in function
- Replies: 8
- Views: 7725
Passing key in function
So I have a very complex/optimized idea of dealing with stacks for drawing and inputs but I've hit a barrier. I have declared a function like this function ui:input() do stuff end And then I have that stored into a table function stack:push() table.insert(stack.input, function() ui:input() end) end ...
- Thu Sep 12, 2019 12:58 pm
- Forum: Support and Development
- Topic: Non-SQL server database
- Replies: 3
- Views: 3266
Non-SQL server database
I cannot seem to find any good server databases for use with love2d that do not require external components (like sql servers, etc). I tried to setup FlatDB, but I'd have to rewrite the whole thing because it uses io.open/io.write. I tried switching the basics checks to love.filesystem checks and go...
- Sun Aug 25, 2019 5:58 am
- Forum: Support and Development
- Topic: Code review please
- Replies: 8
- Views: 5899
Re: Code review please
In lua, unlike python, variable scope is global unless explicitly declared to be local. Furthermore, in Python, globals are not actually global, but module-local; however, in Lua, they are really global, i.e. application-wide, and therefore in the same namespace for all modules. Globals are a bit s...
- Sat Aug 24, 2019 12:32 pm
- Forum: Support and Development
- Topic: Code review please
- Replies: 8
- Views: 5899
Re: Code review please
Ok, I wasn't sure if global or local took longer to load or something. What I'm creating is rather simple so having global variables shouldn't be an issue. Thanks!