Search found 1863 matches

by raidho36
Thu Sep 19, 2019 1:40 pm
Forum: Support and Development
Topic: [Bump Physics] How to use this?
Replies: 5
Views: 86

Re: [Bump Physics] How to use this?

The "other.isCoin" etc. is simply a flag defined in the table, set to true or false. The "other" is set to whichever other table (object) is in collision with current object. So you have some object that's a coin, and it has "self.isCoin = true" in it. Same for an object that's an exit and an object...
by raidho36
Wed Sep 18, 2019 11:51 pm
Forum: Support and Development
Topic: a super fast AABB collision detection ( Minkowski Sums )
Replies: 11
Views: 280

Re: a super fast AABB collision detection ( Minkowski Sums )

The Minkowski difference reduces rectangle-rectangle interaction to point-rectangle interaction, which IMO is easier to process and reason through. It helps, for example, with swept collision checking, as you only have to check a line segment against each box, rather than a moving box. My point was...
by raidho36
Wed Sep 18, 2019 11:48 pm
Forum: Support and Development
Topic: How to make save files that can be overwritten
Replies: 1
Views: 57

Re: How to make save files that can be overwritten

You serialize your data into a string, and dump that string into a file. Loading is the same process in reverse. There are serialization libraries that take Lua tables at the input when saving, and produce Lua tables at the output when loading. Headline question is about files that one cannot overwr...
by raidho36
Wed Sep 18, 2019 9:42 pm
Forum: General
Topic: Concatenation and garbage
Replies: 5
Views: 149

Re: Concatenation and garbage

Also the same thing happens in table.concat function. Note however that all of this is implementation-defined.
by raidho36
Wed Sep 18, 2019 9:21 pm
Forum: Support and Development
Topic: a super fast AABB collision detection ( Minkowski Sums )
Replies: 11
Views: 280

Re: a super fast AABB collision detection ( Minkowski Sums )

D0NM wrote:
Wed Sep 18, 2019 11:47 am
the pros is it returns the PENETRATION vector (like HC Collider does).
It helps u resolving a collision with 1 line of code.
It computes this vector in the same fashion as regular AABB collision routine would. As I said, it's the same old method but with 1 extra step.
by raidho36
Wed Sep 18, 2019 11:39 am
Forum: General
Topic: Concatenation and garbage
Replies: 5
Views: 149

Re: Concatenation and garbage

pgimeno wrote:
Wed Sep 18, 2019 11:32 am
Don't worry about garbage generation when concatenating many pieces of a string in a single statement.
That's a bold statement considering that you don't actually know whether concatenating strings like this produce garbage or not.
by raidho36
Wed Sep 18, 2019 11:25 am
Forum: Support and Development
Topic: a super fast AABB collision detection ( Minkowski Sums )
Replies: 11
Views: 280

Re: a super fast AABB collision detection ( Minkowski Sums )

Seems like a roundabout way to do regular AABB collision testing. Instead of testing coordinates against each other directly, it computes differential between coordinates and tests all of them against zero.
by raidho36
Wed Sep 18, 2019 11:19 am
Forum: Support and Development
Topic: is it necessary to "free" texture data / love.graphics.Image ?
Replies: 8
Views: 216

Re: is it necessary to "free" texture data / love.graphics.Image ?

Wiki does tell about this. Maybe you missed it because you were focused on whatever you were looking for.
by raidho36
Wed Sep 18, 2019 8:54 am
Forum: Support and Development
Topic: is it necessary to "free" texture data / love.graphics.Image ?
Replies: 8
Views: 216

Re: is it necessary to "free" texture data / love.graphics.Image ?

Since in the Lua side the memory used by UserData is very small, many objects can accumulate until GC is triggered. This implies that Lua would trigger GC sooner if it knew about object sizes, but that's not the case. Plain Lua objects that take up a lot of memory don't trigger GC any quicker than ...
by raidho36
Tue Sep 17, 2019 9:30 pm
Forum: Support and Development
Topic: is it necessary to "free" texture data / love.graphics.Image ?
Replies: 8
Views: 216

Re: is it necessary to "free" texture data / love.graphics.Image ?

It will be freed automatically once Lua garbage-collects discarded items. You can manually release the associated memory, but it's not strictly necessary. Keep in mind that ImageData resides in RAM and Texture resides in VRAM.