Search found 1077 matches
- Mon Apr 03, 2017 4:30 pm
- Forum: Support and Development
- Topic: canvas black & white only?
- Replies: 14
- Views: 12130
Re: canvas black & white only?
OK, thanks for the answer. The culprit is the layering - when I am drawing multiple pixels over each other, the last drawn (color) takes precedence, so I'll have to layer into multiple canvas and then draw ascending by priority. Does layering work fine when putting multiple canvas over each other? ...
- Sun Apr 02, 2017 8:17 pm
- Forum: Support and Development
- Topic: canvas black & white only?
- Replies: 14
- Views: 12130
Re: canvas black & white only?
per default canvas' store RGBA values just like your normal framebuffer/window.
you should remember to set your color to white before drawing the canvas to the screen in your main loop. If that is not the cause of your problem, I think we will need more code to help you out.
you should remember to set your color to white before drawing the canvas to the screen in your main loop. If that is not the cause of your problem, I think we will need more code to help you out.
- Wed Mar 29, 2017 4:28 pm
- Forum: Support and Development
- Topic: How to handle multiple timers
- Replies: 8
- Views: 5881
Re: How to handle multiple timers
In the last example he doesn't start counting at 1, he starts counting at the duration and decrements to 0, which is the proper way to do it IMO. If not the proper way, i do agree that it's easier to code if a variable used as a counter going from someVal down to zero, since wherever you want to im...
- Wed Mar 29, 2017 3:32 pm
- Forum: Support and Development
- Topic: How to handle multiple timers
- Replies: 8
- Views: 5881
Re: How to handle multiple timers
That seems about right ;o though you'd probably reset your timer to 0, no reason to start counting at 1. And I recommend moving the code within your loop into an update function in your base object. And then change the loop to be like: for _, base in ipairs(bases) do base:update(dt) end This way yo...
- Tue Mar 28, 2017 11:38 am
- Forum: Support and Development
- Topic: Strange behavior with LuaJIT
- Replies: 5
- Views: 3744
Re: Strange behavior with LuaJIT
Btw, not related to the thread, but riding along: If anyone knows a nice FFI 101 guide, i'd be happy to know it. Now then.. Cygwin? Doesn't it cross compile Windows apps to Linux operating environment? Well, the luajit page has the ffi api and a tutorial for ffi . It's not really a 101 though.
- Tue Mar 28, 2017 9:13 am
- Forum: Support and Development
- Topic: Strange behavior with LuaJIT
- Replies: 5
- Views: 3744
Re: Strange behavior with LuaJIT
when you say all compiles from Cygwin what do you mean? luajit + the dll + love compiled from cygwin?
i thought compiling love on cygwin was going to be trouble, at least it was on mingw2.
i thought compiling love on cygwin was going to be trouble, at least it was on mingw2.
- Sat Mar 25, 2017 10:20 pm
- Forum: Support and Development
- Topic: New to Love, Lua. love.graphics.rectangle performance question
- Replies: 2
- Views: 2636
Re: New to Love, Lua. love.graphics.rectangle performance question
First, what peterrust said is right: only draw what you need, that should be the easiest fix. If it's static, go ahead and use a Canvas. Second, there are lots of ways to optimize from there: - use a SpriteBatch, a 1px white texture, then scale and tint it - use a Mesh (could get a bit complicated) ...
- Sat Mar 25, 2017 12:21 pm
- Forum: Support and Development
- Topic: error with rectangles
- Replies: 5
- Views: 4590
Re: error with rectangles
Okay here i am, back again xD The error i get is: line 180: Bad argument #2 to 'oldRectangle' (number expected, got nill) well yeah, you are calling 'love.graphics.rectangle' with nil (no value) as the value for x. the error would be the same if you didn't use the DS code you posted (except it woul...
- Sun Mar 19, 2017 5:30 pm
- Forum: Support and Development
- Topic: Love understanding pluralization?
- Replies: 3
- Views: 2806
Re: Love understanding pluralization?
I'm a beginner and am working on reading files right now after finishing my first few test projects. I've not had trouble understanding anything so far but this one I can't seem to understand. Why does love accept "for k, file"? Where is file defined? Does love understand what a file is? ...
- Sun Mar 19, 2017 1:17 pm
- Forum: Support and Development
- Topic: love.update() vs love.draw()
- Replies: 9
- Views: 9363
Re: love.update() vs love.draw()
How do you implement libraries such as hump.gamestate in LOVE? hump looks like it could help a beginner like me figure out how to make multiple "screens". why don't you have a look at the hump.gamestate documentation? It has examples right there: http://hump.readthedocs.io/en/latest/games...