Search found 6 matches

by bkwrm
Sun May 15, 2016 10:35 pm
Forum: General
Topic: splitting my code into multiple lua files using filesystem.load
Replies: 6
Views: 5559

Re: splitting my code into multiple lua files using filesystem.load

Thank you! Every example I've seen showed using modules like a function library basically. A lot of what you are showing me I already knew, I just had no idea you could run a module from top to bottom, this changes things a lot :) EDIT: Just tested this, it does run the update and draw functions on ...
by bkwrm
Sun May 15, 2016 2:19 am
Forum: General
Topic: splitting my code into multiple lua files using filesystem.load
Replies: 6
Views: 5559

Re: splitting my code into multiple lua files using filesystem.load

I will have to fiddle with that when I get home from work, I thought everything in a module though had to be inside a function, and than you called those functions as you needed them? You never ran the module from top to bottom, you only ran the function as you called them from the main.lua. Does it...
by bkwrm
Sat May 14, 2016 11:59 pm
Forum: General
Topic: splitting my code into multiple lua files using filesystem.load
Replies: 6
Views: 5559

Re: splitting my code into multiple lua files using filesystem.load

Thanks for the reply, I already am using require a lot to organize my functions (collisions, menu options, and so on). I was under the impression that require was mostly used to support the main file though? Like your example is loading a table with the map settings, which is a perfect use for requi...
by bkwrm
Sat May 14, 2016 10:20 pm
Forum: General
Topic: splitting my code into multiple lua files using filesystem.load
Replies: 6
Views: 5559

splitting my code into multiple lua files using filesystem.load

So my main lua file is used as a main menu, graphics settings and so on. What I would like to be able to do is to have each level as it's own main lua file that I than transfer control to. I do use require for various functions, but for my own sanity I would like to split up the main game as much as...
by bkwrm
Wed Mar 09, 2016 1:33 am
Forum: Libraries and Tools
Topic: push - a resolution-handling library
Replies: 80
Views: 162919

Re: push: a resolution-handling library

Oh wow thanks, I will probably convert over to that. Right now I've just copy pasted your function over and made my edits, this will neaten the code a bit.
by bkwrm
Mon Mar 07, 2016 11:11 pm
Forum: Libraries and Tools
Topic: push - a resolution-handling library
Replies: 80
Views: 162919

Re: push: a resolution-handling library

Thank you for this, screen resolution handling is always the biggest headache for me when starting a new language (2 weeks in atm). I do have one question though, how would I go about enabling msaa, vsync, and the like? The normal method ...sort of works: realWidth, realHeight = love.graphics.getDim...