Search found 29 matches
- Tue Dec 14, 2021 10:06 pm
- Forum: Libraries and Tools
- Topic: Groverburger's 3D Engine (g3d) v1.5.2 Release
- Replies: 218
- Views: 491830
Re: Groverburger's 3D Engine (g3d) v1.4 Release
Given your art style, wouldn't a simple "discard" in the pixel shader be enough to avoid writing over objects behind ? (alpha test kind if transparency)
- Mon Dec 06, 2021 7:26 pm
- Forum: Support and Development
- Topic: Globals and singleton
- Replies: 10
- Views: 6606
- Mon Dec 06, 2021 6:37 pm
- Forum: Support and Development
- Topic: Globals and singleton
- Replies: 10
- Views: 6606
Re: Globals and singleton
If you made self.CurrentState the actual state instead of a string with the state's name, you could do away with the ifs. That's a good point. I just kept my code snippet simple to simplify the discussion around. I have other stuff planned in the state update function. You could also return a fully...
- Mon Dec 06, 2021 5:35 pm
- Forum: Support and Development
- Topic: Globals and singleton
- Replies: 10
- Views: 6606
Re: Globals and singleton
If the variables stop being global, in order to do something with them in other places, you need to pass them as parameters. That's what I was referring to. Can't I just return my object like this and use the requires ? Taking advantage of the caching. Simplified example: main.lua local SPLASH = re...
- Mon Dec 06, 2021 1:42 pm
- Forum: Support and Development
- Topic: Globals and singleton
- Replies: 10
- Views: 6606
Re: Globals and singleton
Noted on the require. Makes sense after reading how that function works . :) the require() line will tell you where it is defined, and the parameter passing will tell you where it is modified. I'm not sure what you mean by parameter passing ? You mean to the function from the global in case I have a...
- Mon Dec 06, 2021 12:50 pm
- Forum: Support and Development
- Topic: Globals and singleton
- Replies: 10
- Views: 6606
Globals and singleton
I'm prepping up the global structure of my game and I was wondering what would be the most optimal approach given the layout of code I would like to use. I have read a bit about how Lua handles Globals and they way require works, but I'm wouldn't mind some additional feedback. I feel like my approac...
- Sat Nov 20, 2021 7:48 pm
- Forum: Support and Development
- Topic: Shader caching ?
- Replies: 6
- Views: 5359
Re: Shader caching ?
Yeah, it's likely very premature in my case anyway. ![Smile :)](./images/smilies/ms-smile.png)
Thank you for the additional details !
![Smile :)](./images/smilies/ms-smile.png)
Thank you for the additional details !
- Sat Nov 20, 2021 5:55 pm
- Forum: Support and Development
- Topic: Shader caching ?
- Replies: 6
- Views: 5359
Re: Shader caching ?
LÖVE caches the parse results of vertex and pixel shader code in memory while it's running (so there is a form of caching there) - it avoids a bit of work if you have a lot of different pixel shaders which all use the same vertex shader, for example. It does not save anything to disk on its own acr...
- Sat Nov 20, 2021 8:25 am
- Forum: Support and Development
- Topic: Shader caching ?
- Replies: 6
- Views: 5359
Shader caching ?
Heya, I have been evaluating Löve these last few days to see if it could fit my needs (and so far it's really promising). Looking around the API and the Github repository I didn't find an explicit answer to a question I have. I did a little search on the forum as well but I didn't find anything rele...