Search found 947 matches

by grump
Tue Dec 28, 2021 1:47 pm
Forum: Support and Development
Topic: WebSocket on love-android
Replies: 4
Views: 2141

Re: WebSocket on love-android

I don't know much about Heroku or any of those libraries, but I'm pretty sure your local server doesn't use TLS, while Heroku most probably does, as any respectable web service should. WebSockets over TLS are strongly encrypted; the Lua library does not support that. I don't think a pure Lua impleme...
by grump
Sat Dec 25, 2021 10:25 pm
Forum: Support and Development
Topic: love.graphics.rectangle pixel snapping
Replies: 5
Views: 2597

Re: love.graphics.rectangle pixel snapping

The shader method is slow if you draw a lot of boxes, because sending uniforms for every box prevents batching. That can be avoided with instanced rendering, but it's quite a bit of code.
by grump
Sat Dec 25, 2021 5:38 pm
Forum: Support and Development
Topic: love.graphics.rectangle pixel snapping
Replies: 5
Views: 2597

Re: love.graphics.rectangle pixel snapping

The simplest solution that doesn't require any additional code or tricks and saves draw calls: enable MSAA with 2 or more samples, either for all rendering or just for a Canvas. See https://love2d.org/wiki/love.window.setMode or https://love2d.org/wiki/love.graphics.newCanvas
by grump
Wed Dec 22, 2021 11:16 am
Forum: Support and Development
Topic: Contents of array gets reset for some reason...
Replies: 4
Views: 3100

Re: Contents of array gets reset for some reason...

Not a huge fan of playing debugger for other people, but this was glaringly obvious by looking at it, so I make an exception just for you:

You're passing currentnodeid to placewirenode in love.mousepressed, when you should be passing currentwireid instead.
by grump
Tue Dec 21, 2021 4:43 pm
Forum: General
Topic: Beginner friendly book about Lua?
Replies: 30
Views: 18592

Re: Beginner friendly book about Lua?

When I was first learning Lua years ago, I stumbled across a PDF warning about premature optimization and it gave some compelling examples of how premature optimization (in this case, creating a Local out of every (math?) function call) not only didn't help, but actually slowed things down. I teste...
by grump
Mon Dec 20, 2021 10:46 pm
Forum: General
Topic: Beginner friendly book about Lua?
Replies: 30
Views: 18592

Re: Beginner friendly book about Lua?

A word of caution about the use locals! tip on page 17 - that's only actually helpful when you're making a truly huge number of function calls (1 million in the example given). Creating local variables comes with its own overhead, and in most cases there is absolutely no noticeable performance diff...
by grump
Sun Dec 19, 2021 10:50 pm
Forum: Libraries and Tools
Topic: Slab - An Immediate Mode GUI Library In Lua
Replies: 98
Views: 271353

Re: Slab - An Immediate Mode GUI Library In Lua

Hi everyone, I am the new maintainer of Slab, here to announce the latest release v0.9.0! I want to like this lib, I really do. But there's several issues that keep me from using it. The top three being: - Clicks get dropped when the app runs slow. This makes the lib unfit for use in released proje...
by grump
Fri Dec 17, 2021 5:38 pm
Forum: Games and Creations
Topic: Physics determinism test
Replies: 15
Views: 13042

Re: Physics determinism test

Works the same in both. Interestingly, the result is different (chaotic, as expected) in versions 0.9 and 0.10 Thanks for testing! I don't really care about the older versions, although it would be interesting to know what's causing the difference. Here's another, more interesting one just for shit...
by grump
Fri Dec 17, 2021 2:26 pm
Forum: Games and Creations
Topic: Physics determinism test
Replies: 15
Views: 13042

Re: Physics determinism test

This one scales and centers, should look correct on phones. I also didn't call physics.setMeter before. So it should still spell out "HELLO!" but it looks different from the first version.
by grump
Fri Dec 17, 2021 12:54 pm
Forum: Games and Creations
Topic: Physics determinism test
Replies: 15
Views: 13042

Re: Physics determinism test

pgimeno wrote: Fri Dec 17, 2021 10:20 am For the phone I had to add this line to love.draw:

Code: Select all

love.graphics.scale(math.min(love.graphics.getWidth()/800,love.graphics.getHeight()/600))
Ah. I guess on phones you always have to check what size the "window" is? Is love.resize being called in this situation?